Commit Graph
12 Commits
Author SHA1 Message Date
rosstimothy 95d6d0fee1 Migrate GetCertAuthority to gRPC (#22624)
The HTTP client created by `auth.NewClient` has an idle timeout of
30s and each instance periodically gets cert authorities in
`TeleportProcess.syncRotationStateCycle`. If there has been no
activity when the ticker expires then the request will result in a
brand new connection to Auth to be established. This can cause a
spikes in open file descriptors on the Proxy when there are a large
number of instances connected via a tunnel.

To prevent periodic dialing when retrieving cert authorities the
endpoint has been migrated to the new Trust gRPC service. For now
only the get endpoint has been migrated but the rest of the CRUD
operations for cert authorities should be migrated from the HTTP
api to the gRPC service as well.
2023-03-10 14:32:34 +00:00
Gabriel CoradoandRafał Cieślak bc63dddd7b Verify if proxy can handle application requests when creating session (#20418)
* feat(app): ensure there are healthy app services when creating session

* Apply suggestions from code review

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>

* chore: code review updates

* refactor(app): preflight connection before creating session

* chore(web): change error message

* reafactor(app): change redirect to launcher rule

* refactor(app): rename preflight connection to health check app server

* refactor(apiserver): rename preflight connection

* refactor(apiserver): rename preflight connection

* refactor(apiserver): remove health check property

* test(appaccess): adjust new http status codes returned

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2023-02-10 10:42:55 +00:00
Ryan ClarkandZac Bergquist f2fbe92dcb Change the application access authentication flow (#17592)
* Change the application access auth flow to use a CORS POST request

* Remove auth state cookie

* Close the response body in tests

* Change the CSP to allow cross origin requests to the application

* Change the cookies to lax mode

* Update lib/web/app/handler_test.go

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* Fix the proxy URL in tests

* Update webassets ref

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2023-01-12 21:57:01 +00:00
Gavin Frazar 4330e43cc9 security: Prevent app access authz bypass 2022-12-28 09:24:02 -08:00
Jakub Nyckowski 0ee91f6c37 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
Michael b4bfd0b719 moved redirect path param to RawQuery and added escaping (#15628)
* moved redirect path param to RawQuery and added escaping

* fixed test description
2022-08-29 11:23:21 -05:00
Michael 4280f814ae pass and preserve a path parameter during the app authentication (#13832)
* pass and preserve a path parameter during the app access authentication process

* added missing semicolons

* more javascript formatting

* removed incorrect path redirect. replace URL with URL.Path

* added a test for HasName

* added another test for default path

* ensure path param is valid path

* build url without string concat
2022-06-30 19:49:46 -05:00
Gabriel Corado be760bbe60 Dial only application servers that serve the requested application (#12217)
* feat(reversetunnel): add a dial counter on fake remote site

* refactor(app): change `MatchHealthy` to close connections

* refactor(app): change `MatchAll` order to not dial all servers

* refactor(app): only close connection when dial succeeds
2022-04-28 16:09:43 +00:00
Brian Joerger 9b8b9d6d0c rollback - Upgrade api version. (#7751) 2021-07-30 15:34:19 -07:00
Brian Joerger c040aca4c1 Upgrade api version. (#7609) 2021-07-28 13:51:21 -07:00
Brian Joerger 7bff7c41bd Remove API aliases (#6983) 2021-06-04 13:29:31 -07:00
Andrej Tokarčík ee7693f41d Prevent AAP login CSRF with OAuth-style state tokens 2021-03-01 22:14:10 +01:00