Commit Graph
1452 Commits
Author SHA1 Message Date
Michael 265b58cb7e Apply new logos based on license (#41294) 2024-05-15 19:09:33 +00:00
Marco Dinis 5b411d73a5 Join Script: add apt repo for Ubuntu 24.04 (#40960) 2024-05-15 15:03:27 +00:00
rosstimothy e95f3d3ed5 Start using authclient.Client/ClientI/NewClient (#41539)
Consumes the new auth client created in #41460. The changes introduced
were performed with a series of gofmt rewrite rules.

```bash
$ find ./lib/auth -type f -name '*.go' -exec gofmt -w -l -r "ClientI -> authclient.ClientI" {} \;
$ find ./lib/auth -type f -name '*.go' -exec gofmt -w -l -r "Client -> authclient.Client" {} \;
$ find ./lib/auth -type f -name '*.go' -exec gofmt -w -l -r "NewClient -> authclient.NewClientI" {} \;
$ find . -type f -name '*.go' -exec gofmt -w -l -r "auth.ClientI -> authclient.ClientI" {} \;
$ find . -type f -name '*.go' -exec gofmt -w -l -r "auth.Client -> authclient.Client" {} \;
$ find . -type f -name '*.go' -exec gofmt -w -l -r "auth.NewClient -> authclient.NewClient" {} \;
```
2024-05-15 14:09:14 +00:00
Marco Dinis c90bf7e9a4 AWS OIDC App Access: add PublicAddr to App (#41543)
* AWS OIDC App Access: add PublicAddr to App

This PR adds a missing field to the App created to handle the AWS App
Access when using the AWS OIDC credentials
The PublicAddr is required and was not being set.

* fix identation
2024-05-15 07:11:50 +00:00
Brian Joergerandrosstimothy 9ecd2943a7 MFA for SAML IdP: Add mfa check to CheckAccessToSAMLIdP (#41441)
* Add per-session MFA check to CheckAccessToSAMLIdP helper method.

* Update test.

* Add additional method needed to authorize requests in the Proxy service.

* Address comment.

* Apply suggestions from code review

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2024-05-14 20:12:20 +00:00
Michael 6b0797adba Update shared access requests components for e changes (#41333) 2024-05-14 17:55:57 +00:00
rosstimothy 67f499a457 Refactor auth client code into lib/auth/authclient (#41460)
This starts separating the lib/auth client and server code into
distinct packages to reduce the dependency tree of client tools.
For the time being aliases were left to all things moved into
lib/auth/authclient to reduce the changeset and ensure code still
compiles. Future changes will be built off this to convert code
to use lib/auth/authclient where applicable, this was intentionally
left to a minimum amount of changes to facilitate backports.
2024-05-14 13:28:06 +00:00
rosstimothy 24d06502ff Prevent web ui SSH connections from leaking (#41501)
The session closing in TerminalHandler.Close did not always close
established ssh sessions if the client closed the web socket
at any point between the new browser tab being opened and the session
being established. In these cases the SSH connection was leaked for
the duration of the Proxy process. To ensure sessions are always
terminated a check to see if the client closed the web socket was
added prior to writing the session metadata and after the shell
is established for the ssh session.
2024-05-14 11:26:21 +00:00
Trent Clarke fbd0091b9b SCIM only okta (#41125)
* Changes required for implementing a standalone (i.e. without Okta Sync compatibility) SCIM service in teleport.e.

Includes:

 * `tctl plugins delete` and `tctl plugins create scim` tooling
 * Moving some constants from teleport.e to OSS
 * Protobuf message types for standalone SCIM settings
 * UI updates for rendering SCIM users

Changelog: Added plugin management tooling to tctl

* Adds validation to SCIM settigs

* Linter fixup

* linter appeasement
2024-05-14 08:36:11 +00:00
Edoardo Spadolini 33e80cd8f2 Support dynamic SSH host signers (#41227)
* Add a host signers callback to sshutils.Server

* Lift host signers callback into regular.Server

* Lift host signers callback into reversetunnel.Server
2024-05-13 13:11:44 +00:00
Lisa Kim 2fbbe6caac Web: Remove legacy app access support (#41243) 2024-05-10 19:41:15 +00:00
39478f3570 Add backend handler for Web UI kube exec functionality. (#41144)
* Add backend handler for Web UI kube exec functionality.

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* Log error on sending it to websockete connection.

* Remove duplicate user key creation.

* Use scoped context.

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>

* Use local site cache.

* Simplify creating rest kube rest config.

Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>

* Don't set stdErr on pod execution options, if it's interactive shell.

* Don't use public proxy addr when getting kubeconfig server address/name.

* Don't set stdErr on stream options if it's interactive shell.

* Provide local host CA to podHandler directly, instead of access point.

* Add integration test for kube exec handler.

* Use read deadline instead of closing reader.

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2024-05-10 19:10:57 +00:00
Alex McGrath 65459e872e Remove support for disabling second factor authentication (#40956)
* dont allow disabling second factor

* update docs for 2fa change

* add environmental variable to work around disabled 2fa

* check if its cloud

* update todos

* add a test

* introduce insecure test mode

* fixes for tests
2024-05-10 11:57:34 +00:00
Gavin Frazar 9723fd096f cleanup after db ca split (#41351)
* remove database client CA event filter injection

* remove tctl database client CA fetch fallback

* remove sqlserver database client CA fetch fallback

* remove database client CA migration

* cleanup tests and mocks
2024-05-09 19:51:27 +00:00
Marco DinisandEdward Dowling 0aaf1b21c3 AWS OIDC: Script to configure EC2 Auto Discover with SSM (#41053)
* AWS OIDC: Script to configure EC2 Auto Discover with SSM

There's a new teleport command that adds an inline policy which enables
the AWS OIDC Integration to handle EC2 Auto Discover using the script
mode (SSM).
It also adds the SSM Document used in the teleport installation.

There's also a new endpoint which returns the one off script that uses
that command.

* Update lib/integrations/awsoidc/ec2_ssm_iam_config.go

Co-authored-by: Edward Dowling <EdwardDowling@users.noreply.github.com>

---------

Co-authored-by: Edward Dowling <EdwardDowling@users.noreply.github.com>
2024-05-09 17:20:27 +00:00
Lisa Kim 8cdf69c62d Validate application URL extracted from request route /web/launch/<app-url> (#41236)
* Validate application URL extracted from /web/launch/<app-url>

Prevents overwriting or setting new CSP directives.

Validating prevents this because a valid CSP directive
requires spaces between values and spaces are not valid
in URL (encoded or not).

Invalid CSP directives or its values gets ignored by the browser.

* Address CR

* Use accurate wording
2024-05-08 03:43:23 +00:00
Marco André Dinis ac1a2986d9 Use AWS OIDC Integration for AWS App Access (#40555)
* Use AWS OIDC Integration for AWS App Access

This PR enables the usage of the AWS OIDC Integration when proxying
access to AWS.

When a request comes, it generates the AWS OIDC credentials to proxy the
request directly to AWS.

This removes the requirement for an AppService with local credentials.

* rename var

* remove dependency on lib/srv
2024-05-06 09:33:25 +00:00
Bartosz Leper c341bd2dc5 Add authentication method status indicators to the account settings page (#40904)
* Add authentication method status indicators to the account settings page

* Review

* Review
2024-05-02 17:00:15 +00:00
Michael 80f314a550 Add DisableIncludeRequestableRequests to UIConfig (#41064) 2024-05-02 16:53:13 +00:00
Marco André Dinis dcb5e435b5 API for creating AppServer that uses AWS OIDC Integration (#40581)
* API for creating AppServer that uses AWS OIDC Integration

This PR adds two new APIs:
- web api endpoint
- `tctl create` for AppServers

This allows the client to create AppServer which use the integration
credentials.

This also updates the `editor` role so that they are able to upsert the
AppServer.

* return ui.App after creation

* improve comment
2024-05-02 15:28:16 +00:00
Justinas Stankevičius 68886bb8ef Entra ID integration boilerplate (#40998)
* Add e imports for MS Graph SDK

* Add ability to sign Entra ID OIDC JWTs, rework KID handling

- Synthesize Key IDs for our JWT keys. For backwards compatibility, also
  include the same keys with an empty `kid` in JWKS.
- Sign AWS OIDC tokens with a `kid=""` header claim,
  rather than omitting the `kid` claim altogether.
  See comment for details.

* Add validation for Entra ID plugin

* Fix typo in assertion function name

* Update the OIDC JWKS test to expect the same key twice

* Add Entra ID plugin type constant

* go mod tidy

* Fix expected JWKS size in integration test

* Add basic tests for KeyID

* Move Azure auth settings from Plugin to Integration

* Address review comments

* Add a unit test to ensure KeyID compatibility

* Add license header to token_generator.go

* Rename validation function per new conventions
2024-05-02 13:44:32 +00:00
Lisa Kim ca07d66b2f Add yaml parsing and yamilfying access monitoring rule in webapi (#40936)
* Add yaml parsing and yamilfying access monitoring rule in webapi

* Extract resource without CheckAndSetDefault validator
2024-05-01 17:50:57 +00:00
Michael f97e82e73e Add includeRequestable param to unified params (#41075) 2024-05-01 16:08:21 +00:00
Michael 15109b9691 Add DeviceTrust badge when session upgraded (#41029) 2024-04-30 21:44:52 +00:00
Alan Parra 72780dce68 fix: Forbid SSO users from logging in using passwordless (#41062)
* Save the WebAuthn UserHandle in the mock Key

* Simplify passwordless tests

* fix: Forbid SSO users from logging in using passwordless

* Rename tests to TestPasswordlessProhibitedForSSO
2024-04-30 19:07:57 +00:00
Alan Parra 15354e196e fix: Enforce allow_passwordless server-side (#41023) 2024-04-30 14:39:19 +00:00
ddbd9eefed Replace isTeam with new flags (#39794)
* Add new flags to modules

* Add deprecated comments to isTeam

* Make support flag an enum

* Add a TODO instead of deprecating flag right away

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

* Add gogoproto.jsontag to new fields

* remove meaning from enum zero value

* Reuse proto.SupportType instead of suping

* Replace isTeam for new flags in web app

* Update proto file: rename enum 0 value to unspecified;fix json tag casing

* Reuse proto file instead of aliasing it

* undo removing method by accident

* Add MobileDeviceManagement field to web config struct

* Improve comments

* Fix tests

* Simplify lockedFeatures object

* Include JoinActiveSessions in the web config object

* Remove more instances of isTeam

* Apply suggestions from code review - improve comments

Co-authored-by: Michelle Bergquist <11967646+michellescripts@users.noreply.github.com>

* Use consistent comments to remove isTeam

* Update godocs comments

* Revert removign `isTeam` from stories it still should

* Fix godoc typo

Co-authored-by: Michelle Bergquist <11967646+michellescripts@users.noreply.github.com>

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
Co-authored-by: Michelle Bergquist <11967646+michellescripts@users.noreply.github.com>
2024-04-30 11:54:17 +00:00
Michael d129b1d3c7 Include requiresRequest flag for searchAsRoles requests (#40328) 2024-04-29 17:21:43 +00:00
Marco André Dinis 0ab0909367 Use HandshakeContext instead of Handshake for TLS Connections set up (#40588) 2024-04-29 07:31:31 +00:00
Alan Parra 14f4ef5cb2 fix: Only evict sessions on device extensions upgrades (#40878) 2024-04-26 13:56:34 +00:00
Jakub Nyckowski 987995de4e Remove Assist command execution and chat feature (#40806)
* Remove Assist command execution and chat feature

The changes remove tests and related code for command execution in the assist package and web command handling.

* Remove Teleport Assist chat from CHANGELOG.md

The changes in this commit reflect the removal of the Teleport Assist chat from the CHANGELOG documentation of Teleport version 16. The Assist feature continues to be available in the SSH Web Terminal and Audit Monitoring.

* Remove assist chat from the test plan
2024-04-25 18:08:07 +00:00
Zac Bergquist 8cd1c429f5 Fix up some poor wording (#40832)
Closes #40294
Closes #39172
2024-04-23 22:01:41 +00:00
Lisa Kim 13371900d2 Web: Add access monitoring rule acl (#40444) 2024-04-23 16:48:14 +00:00
Isaiah Becker-Mayer b878fd077d Cleanup regular.Server (#40723)
* remove unused default shell setting

* remove unused nodeWatcher

* remove unused caGetter

* cosmetic
2024-04-22 21:17:10 +00:00
Grzegorz Zdunek 22a3389152 Correctly filter out system roles (#40545)
* Correctly filter out system roles

* Move `SkipSystemRoles` check above `SearchKeywords` check

* Add tests
2024-04-22 10:04:26 +00:00
Marco André Dinis dc5975ea37 AWS OIDC: IAM set up for AWS App Access (#40575)
* AWS OIDC: IAM set up for AWS App Access

AWS App Access using AWS OIDC Integration requires a new policy in the
AWS OIDC Role.
This PR adds a one-off script that executes the configuration command
that adds said policy.

* improved comments, remove dead code, improve logging

* improve comment and http client var name

* move back to interface

* remove default client

* rename role to rolename

* enable fips endpoint support

* restrict target roles by their tags

* use true for tag value
2024-04-19 14:56:44 +00:00
Brian Joerger 9479f7fa53 Remove extraneous App Session watch logic (#40092)
* Remove WaitforAppSession logic.

* Remove WaitForSnowflakeSession logic.

* Decrease log severity of web session cache readthrough to debug.
2024-04-17 19:03:59 +00:00
Brian JoergerandRafał Cieślak 1868f51186 MFA for App access (WebUI) (#40077)
* Implement web isMFARequired for App access.

Pass mfa challenge response in web createAppSession request.

* Update web/packages/teleport/src/services/apps/apps.ts

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

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2024-04-15 17:40:20 +00:00
Alan Parra 87f2bdcce8 Implement the /webapi/devices/webconfirm handler (#40531) 2024-04-15 13:17:59 +00:00
Zac Bergquist 41d514bbb7 player: fix seeking during dead time (#38914)
* player: fix seeking during dead time

This addresses a bug in the new player API where the player does
not respond to seeking during large periods of "dead time."
For example, if there is 30 seconds of dead time between two events,
the player is effectively in a 30 second sleep. Attempting to change
the position of playback during this 30-second period works, but is
not observed until the sleep completes.

With this change, the sleep period is canceled when the user seeks
to a new position.

Fixes #38560

* Improve UX when the user seeks while paused

Restart the stream in this case rather than trying to keep server
and client state in sync.

* Fix

* Update desktop player

* Lint/test fixes

* increase timeout

* Use a real clock for the new test
2024-04-10 22:59:46 +00:00
Tiago SilvaandAlan Parra c4b99cf2ee Expose DiscoveryConfig.Status through webapi (#40312)
* Expose `DiscoveryConfig.Status` through webapi

This PR exposes `DiscoveryConfig.Status` field through webapi.

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>

* add unit tests

* Apply suggestions from code review

Co-authored-by: Alan Parra <alan.parra@goteleport.com>

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-04-10 21:40:33 +00:00
Ryan Clark 3c26f17860 Handle access graph preferences being nil (#40413) 2024-04-10 16:08:13 +00:00
Ryan ClarkandRafał Cieślak f13fee902b Support redirecting to TAG on first login (#40156)
* Support redirecting to TAG on first login

* Update api/proto/teleport/userpreferences/v1/access_graph.proto

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

* Add support for highlighting a navigation item

* Add godoc

* Re-run make grpc

---------

Co-authored-by: Rafał Cieślak <rafal.cieslak@goteleport.com>
2024-04-10 13:22:20 +00:00
Bartosz Leper 06fce3f449 Keep track of whether the user has a real password set (#39576)
* Keep track of whether the user has a real password set

* lint

* Some comments

* Fix TestCreateResources

* Fix e/ link

* Review

* Review

* Review

* Use early return on error in DeletePassword

* Fix the broken teleterm test
2024-04-10 10:28:05 +00:00
Grzegorz Zdunek d12d714f1e Switch ListRoles to the paginated API (#40165)
* Switch "get roles" endpoint to the paginated version

* Use the paginated API in the roles screen

* Use the paginated API in the locks screen

* Switch select components for roles to an async version

* Do not break backward compatibility of list roles endpoint

* Allow the new web UI to handle old response types

* Disable pagination buttons in the serverside table when loading data

* Add TODO item about rename

* Add `UrlListRolesParams`

* Remove pagination config

* Remove unused `UrlIntegrationExecuteRequestParams`
2024-04-09 07:23:55 +00:00
rosstimothy 451bad2d4b Prevent moderated session tests from blocking on read forever (#40227)
Exposes SetReadDeadline on the terminal web socket so that the
test helper `waitForOutput` can set it to unblock reads if the
timeout is exceeded. While this alone should not fix any
flaky tests it should allow tests failures to occur prior to
the 10m test timeout and isolate at which parts of the test things
are becoming stuck.

Updates #36061 and #30892
2024-04-08 21:59:20 +00:00
Zac Bergquist 63afd5f277 Clean up some TODOs (#40001)
There were some playback APIs that I was hoping could be deprecated
for v16, but it turns out they are still used by Teleport Assist.
2024-04-07 23:34:58 +00:00
Marco André Dinis 31e56026f0 AWS OIDC set up: S3 is optional (#39912)
* AWS OIDC set up: support set up that doesnt use S3 location

* be explicit about always having the public keys being served at the proxy
2024-04-03 10:55:49 +00:00
Zac Bergquist d22fdcf70e docs: remove unnecessary dsacls command for AD service account (#40089)
This command fails and was mistakenly left behind during some
Teleport 15 updates.

Closes #39289
2024-04-02 13:36:28 +00:00
Brian Joerger 4690eeab10 Keep App Session secrets secret (#39853)
* Don't reveal app session secrets to users.

* Fix panic in WebSessionV2.WithoutSecrets.

* Use client's key for azure jwt tokens

Proxy verifies and signs jwt tokens

Ensure backwards compatibility

* Remove unused GetAppSession methods.

* Move azure jwt token resigning logic into the session transport's
rewriteRequest method with an improved Azure app check

Fix GetAppSession backward compatibility check

* Add test.

* Address lint comments.

* Address parseBearerToken comment.

* apply suggestion about indentation.
2024-03-29 23:31:31 +00:00