Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App Access should include query string when redirecting an unauthenticated user #16278

Closed
programmerq opened this issue Sep 9, 2022 · 1 comment
Labels
application-access bug c-stz Internal Customer Reference

Comments

@programmerq
Copy link
Contributor

programmerq commented Sep 9, 2022

Expected behavior:

As of #13832, app access will preserve the path portion of a URL through the login process when an unauthenticated user tries to access an app access URL. This should include both the path and any query string, but it currently discards the query string.

Current behavior:

When accessing the URL as an unauthenticated user, the first thing teleport does is issue a redirect to the /web/launch for the app, and it includes the path as a query string. The ?query=bar from the initial URL is not included in the redirect.

Request URL: https://aaptest5.teleport.example.com/somefolder/foo?query=bar -> location: https://teleport.example.com:443/web/launch/aaptest5.teleport.example.com?path=%2Fsomefolder%2Ffoo

If I manually add in the URL escaped query string, the rest of the login flow works and preserves it the rest of the way through:

https://teleport.example.com:443/web/launch/aaptest5.teleport.example.com?path=%2Fsomefolder%2Ffoo%3Fquery%3Dbar

I believe this means that this can be fixed with a one-line change to simply add an escaped ? and URL.Query.

https://github.com/gravitational/teleport/blob/v10.2.0/lib/web/app/handler.go#L387

Bug details:

  • Teleport version: all 10.x.y versions, 9.3.10 and newer, 8.3.16 and newer.
  • Recreation steps: attempt to access an application access app with a path and query string. observe that only the path is preserved.
  • Debug logs: n/a

gz#6770

@programmerq programmerq added bug good-starter-issue Good starter issue to start contributing to Teleport application-access time-to-value c-stz Internal Customer Reference labels Sep 9, 2022
@zmb3
Copy link
Collaborator

zmb3 commented Sep 9, 2022

Closing as duplicate of #15998

@zmb3 zmb3 closed this as not planned Won't fix, can't repro, duplicate, stale Sep 9, 2022
@zmb3 zmb3 removed good-starter-issue Good starter issue to start contributing to Teleport time-to-value labels Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
application-access bug c-stz Internal Customer Reference
Projects
None yet
Development

No branches or pull requests

2 participants