Commit Graph
2059 Commits
Author SHA1 Message Date
Noah Stride 9cd5d79439 Add JoinMethodBitBucket to JoinMethods validation slice (#49454)
* Add "BitBucket" to "SupportedJoinMethods"

* Alphabetize slice
2024-11-26 16:05:56 +00:00
STeve (Xin) Huang 3c6df87061 GitHub Proxy part 1: github integration resource (#48999)
* github integration resource

* fix lib/web

* revert withSecrets

* use static credentials

* address review comments

* fix ut
2024-11-23 20:09:35 +00:00
Erik Tate a8bff10c86 adding SSHPortForwarding config to RoleOptions (#49165) 2024-11-22 20:20:12 +00:00
Pawel Kopiczko 1a6f8d4c8a Add request.reason.mode to role conditions (proto only) (#49256)
This changes the proto type (+validation) only to declutter the original PR https://github.com/gravitational/teleport/pull/49124

The real changes are in

- api/proto/teleport/legacy/types/types.proto
- api/types/access_request.go
- lib/auth/auth_with_roles.go
- lib/auth/auth_with_roles_test.go

The rest is all generated.
2024-11-22 12:33:03 +00:00
Tim Buckleyandrosstimothy dee7a6f981 Machine ID: Add bitbucket join method for Bitbucket Pipelines joining (#48724)
* Add `bitbucket` join method for Bitbucket Pipelines joining

This adds a new `bitbucket` join method that Machine ID bots can use
to authenticate to Teleport from Bitbucket Pipelines CI runs.

* Add unit tests for bitbucket joining

This also fully adds `deployment_environment_uuid` which was found to
be missing.

* Fix imports

* Update tf docs

* Docs update

* Update generated TF resources

* Attempt to work around docs linter

* Add provision token tests

* Remove pipeline_uuid and step_uuid from protos

Also, fix deploment_environment_uuid field name.

* Remove references to removed fields in tests

* Switch to go-oidc/v3 and remove now-redundant nbf check

* Fix go.mod imports for the TF provider

* Fix event-handler go.mod

* Address review feedback; add 15s timeout to fetch provider metadata

* Update lib/bitbucket/token_validator.go

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

* Fix build after constant rename

---------

Co-authored-by: rosstimothy <39066650+rosstimothy@users.noreply.github.com>
2024-11-21 23:05:58 +00:00
Nic Klaassen 75c2cef688 improve error message when v17 tctl reads v16 tsh profile (#49305) 2024-11-21 21:52:05 +00:00
Edoardo Spadolini bcbfa8192e Get rid of math/rand in favor of math/rand/v2 (#49294)
* Get rid of math/rand in favor of math/rand/v2

* Update retryutils to use rand.N

* Update e ref
2024-11-21 12:57:32 +00:00
Trent Clarke 9317c0ef2d Add IdentityCenter resources to App (#49170)
IdentityCenter accounts are exposed to the Teleport UI as applications,
with each app containing the list of AWS permission sets available on
the corresponding account.

This change adds the necessary additions to the App protobuf types
to carry the Identity Center information.
2024-11-21 00:01:18 +00:00
Michael b9ec350199 Remove DeviceView from ListDevicesByUser (#49209)
Originally, we included the `View` field in order to add the Owner
property to safeguard the returned details of a device ensure the owner
matched the caller. However, this ended up not being conditionally used
(we would never _not_ use it) so we can remove it from the request.
2024-11-20 21:29:49 +00:00
Marco Dinis b5e738238e DiscoveryConfig Status: add summary fields for RDS and EKS (#48985)
This PR adds two new fields which will contain the summary of RDS and
EKS auto enrollment for a given DiscoveryConfig.
2024-11-19 10:10:02 +00:00
Marco Dinis ce92071cc4 Add Integration and DiscoveryConfig as labels to auto discovered RDS/EKS (#48986)
* Add Integration and DiscoveryConfig as labels to auto discovered RDS/EKS

This PR adds two new labels to RDS and EKS resources:
- Integration
- DiscoveryConfig

Those labels help identify which Integration and DiscoveryConfig were
used to auto enroll the resources.

* remove unused code

* add missing discovery config labels for GCP and Azure
2024-11-18 19:46:57 +00:00
Noah Stride c72a4f2be6 Support for joining Actions in un-reachable GitHub Enterprise Servers via Static JWKS (#48973)
* Add JWKS based validator for github tokens

* Extend proto

* Update auth srvr github join impl to support static jwks

* Ignore govet

* initialize with jwks validator

* Update docs

* Update terraform shizz

* Regenerate various things
2024-11-15 12:32:55 +00:00
Michael 195726d1e6 Add ListDevicesByUser protos (#48993)
These support the upcoming service to allow users to see a list of their
own registered devices in the web UI account settings page.
2024-11-14 18:26:12 +00:00
Edoardo Spadolini 0f3d691a79 Periodically check connectivity between peer proxies (#48838)
* Add ping RPC to grpc proxy peering

* Periodically check connectivity between peer proxies

* Replace deprecated jitter functions
2024-11-13 17:46:14 +00:00
Zac Bergquist 2298901e61 Enhance the tctl notifications command (#48829)
- Add the ability create notifications with a custom TTL
  (previously we relied on the server-provided default of 30 days)
- Add the ability to create notifications with custom labels
- Add (non-system) labels to the `tctl notifications ls` output
- Add the ability to filter by label when listing notifications

Closes #48631
2024-11-13 17:24:38 +00:00
Edoardo Spadolini a92e49fc74 Use thread-local RNGs for jitters (#48860)
* Use math/rand/v2's thread-local RNG for jitters

* Replace NewJitter() with DefaultJitter

* Replace NewFullJitter() with FullJitter

* Replace NewHalfJitter() with HalfJitter

* Replace NewSeventhJitter() with SeventhJitter

* Inline jitters in lib/utils/diagnostics/latency

* Replace var jitters in lib/utils with proxy functions

* Replace utils.HalfJitter with retryutils.HalfJitter

* Replace utils.FullJitter with retryutils.FullJitter

* Replace utils.SeventhJitter with retryutils.SeventhJitter

* Replace sharded jitters with thread-local ones

* Remove NewSeventhJitter reference in integrations
2024-11-13 16:35:09 +00:00
Edoardo SpadoliniandAlan Parra 5c2bbfd6b7 Preparation for the QUIC proxy peering implementation (#48836)
* Move the QUIC proxy peering envvar check to lib/config

* Move lib/proxy/clusterdial to lib/peer/dial

* Move peer.clientConn to lib/proxy/peer/internal

* Require QUIC peering label to be set to "yes"

* Move peer TLS verification funcs to lib/proxy/peer/internal

* Move QUICServer to lib/proxy/peer/quic

* Avoid stuttering in lib/proxy/peer/quic

* Remove useless quic.ServerConfig.CipherSuites param

* Fix log style in proxy.peer.quic

* Move duplicatePeerMsg into the function scope

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

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-11-13 16:06:01 +00:00
Yassine Bounekhla fa0d8b8cc6 add sticky mode support to sidenav (#48326) 2024-11-13 00:35:50 +00:00
Gabriel Corado 1c1ec67f0a Add session_type and format to session.recording.access audit event event (#47309)
* feat: add `session_type` and `format` to session recording access event

* chore(metadata): change conditional
2024-11-12 21:02:40 +00:00
Brian Joerger 169128dc17 feat: SSO MFA - Moderated Sessions (#48646)
* Add sso client redirect url to maintain session rpc.

* Handle sso client redirect URL in maintain session presence RPC.

* Add client implementation of SSO MFA for moderated sessions.

* Cleanup.
2024-11-12 20:08:50 +00:00
Nic Klaassen 47502620e2 feat: PuTTY PPK support for non-RSA keys (#48650)
The commit adds support for Ed25519 and ECDSA keys to PuTTY PPK files
generated by tsh. It also adds support for Ed25519 and ECDSA trusted
host CAs.
2024-11-12 20:03:19 +00:00
ac9520ffe0 Using discovery service poll_interval for access graph sync (#48556)
* Using discovery service poll_interval for access graph sync

* Adding a new poll_interval field to access graph sync config

* Update lib/srv/discovery/access_graph.go

Co-authored-by: Ryan Clark <ryan.clark@goteleport.com>

* Adding default poll interval

* Make fix-imports

* Updating derived functions for config

* Apply suggestions from code review

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

* Followup from PR comments

* Applying protobuf tags to avoid conversion

* Removing conversion

* Regen grpc from rebase

* Adding warning message and checking for nil config

---------

Co-authored-by: Ryan Clark <ryan.clark@goteleport.com>
Co-authored-by: Tiago Silva <tiago.silva@goteleport.com>
2024-11-12 20:01:50 +00:00
rosstimothy 1f94d93abe Enrich audit events with server information (#48475)
Subsystem events did not include ServerMetadata, which results in
any events generated for agentless hosts to contain limited
information. For example, any sftp subsystem requests made in
response to tsh scp for agentless nodes provided information about
the proxy forwarding the requests, but no information about the
target host.

Additionally, the way ServerMetadata information was being populated
by using the ServerContext overrode only a subset of the information
that was available. This lead to SessionData events emitted when
an sftp operation was completed not populating any relevant information
about agentless nodes either. To avoid this going forward, the
GetServerMetadata receiver has been removed from ServerContext and
instead the TargetMetadata must be used from the appropriate SSH
server, which already populates the relevant information without
omitting any.
2024-11-12 18:07:18 +00:00
Sakshyam Shah 3757080c6d feat: identity center and provisioning service gRPC client with deleteAllxxx methods (#48714)
* feat: identity center and provisioning service gRPC client with deleteAllxxx methods

* DeleteAllPermissionSets

* run make fix-imports
2024-11-12 16:57:47 +00:00
Trent Clarke 32b18a4977 Adds KindIdentityCenter umbrella resource kind (#48730)
* Adds `KindIdentityCenter` umbrella resource kind

The Identity Center integration manages several resource types,
and specifying individal condition statements for each kind is
both unwieldy and unnecessary - anyone that can manipulate one
of these resources should be able to manilpate them all in the
same way.

In order to simplify things, this patch introduces an umbrella
`KindIdentityCenter` that will represent _any_ `KindIdentityCenter*`
resource in Role conditions and RBAC checks.

* Update constants.go

* Update Implicit role to use Umbrella kind

Updates the default implicit rules to refrence the new `KindIdentityCenter`
resource kind. Also updates comments on the covered  `KindIdentityCenter*`
kinds with a reminder to user `KindIdentityCenter` in RBAC checks.

* Update constants.go
2024-11-12 12:02:14 +00:00
Tiago Silva 0ebaf189f8 [entraid] store entra appId in plugin settings (#48754)
* [entraid] store entra `appId` in plugin settings

This PR stores the Entra ID appID of the application used for SSO in Entra ID plugin settings.
This field filled in a best effort scenario and might be empty for old Entra Plugins.
Newly created plugins will make the field mandatory.

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

* handle code review comments

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
2024-11-12 10:00:47 +00:00
Brian JoergerandMarco Dinis 2d77d1cfd9 SSO MFA - fail gracefully when the Proxy is down (#48641)
* Allow SSO MFA to fail gracefully on the client when the Proxy is down.

* Update api/mfa/ceremony.go

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>

---------

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>
2024-11-09 02:09:55 +00:00
Marco Dinis 29568bdf64 Fix EKS Discover flow fields (#48665)
At a previous PR we added two new fields in the UI and backend, but
failed to add them to the layers in between (grpc service).

This PR adds them and also fixes a typo on the EndpointPublicAccess
field name.
2024-11-08 15:33:38 +00:00
Sakshyam Shah 4979b1ea7a Add PluginAWSICStatusV1 to record group import status (#48551)
* MatchByOriginAWSIdentityCenterLabel func

* add PluginAWSICStatusV1

* Error -> Failed
2024-11-07 15:44:26 +00:00
Brian Joerger b7c0e79fed Remove delayed closing of yubikey connection to prevent the connection from leaking after program execution. (#48414) 2024-11-06 20:11:02 +00:00
Brian Joerger 313acfa181 feat: SSO MFA - WebUI backend implementation (#47832)
* Add SSO MFA ceremony support to WebUI per-session MFA.

* Add display name to SSO MFA device; Add SSO MFA device to SSO challenge.

* Camel case json tags for front end.

* Add sso channel ID for front end broadcast channel logic.

* Fix backwards compatiblity issue; fix error message.

* Fix test.

* Fallback to connector id if display name isn't set.

* Fix test.

* Resolve comment.

* Use uuid.NewRandom.

* go mod tidy
2024-11-06 01:43:41 +00:00
Brian Joerger 0927b6f768 Teleport Connect allow SSO hostname (#48035)
* Add SSO provider URLs to ping response.

* Add SSOHostname to profile.

* Add SSOHostname to teleterm cluster.

* Add SSO hostname to connect's proxy host allow list.

* Fix lint.

* Address comments.

* Document use of SSOHostname in the profile.

* Use sso host, not hostname.

* Ping with connector.

* Resolve comments.
2024-11-05 18:43:20 +00:00
Hugo Shaka e85c7c2495 enforce conditional updates on AutoUpdate* + rename typos (#48240)
* enforce conditaional updates on AutoUpdate* + rename typos

* fix tests
2024-11-04 18:36:16 +00:00
Edward Dowling 95b8489ab4 Add proto definitions and plugin spec Microsoft Teams no code integration (#46640)
* Add proto definitions for MsTeams no code integration

* Add access monitoring rule and hosted support to msteams plugin

* Fix linting

* Fix go sum mismatch caused by msteams dependency

* Fix linting in access monitoring rules
2024-11-04 14:46:23 +00:00
Alan Parra 69c28e672f chore: Bump api/ modules (#48320)
* chore: Bump api/ modules

* Tidy other modules
2024-11-02 12:24:53 +00:00
Alex McGrathandMaxim Dietz fa97b8f90d feat: Allow including Access Lists as nested members and owners (#38738)
- Recursively check for accesslist membership

- Allow adding/removing/listing included access lists in acl commands

- Add a recursive test

- Use dynamic access lists structure from RFD

- Resolve proto changes

- Exclude 'list' members from Access List memberCount

- Calc Access List member count with members of type 'list' excluded,
  return seperately to front end

- Update examples/integrations

- Update crd docs

- Update tf docs

- Perform calculation of inherited roles/traits to AccessList service in
  order to utilize cache and minimize number of requests.

- Grant Okta integration RO for Access Lists

- Update AccessListMember-* events

- Include count for inherited grants

- Include MembershipKind of affected member(s)

- Emit inherited grants / members' MembershipKind for AccessListMember-*
  events

- Update notified owners for Access Requests

- Ensure dynamic owners are notified for Access Requests

- Ensure dynamic owners are notified via Slack integration

- Optionally pass an AbortSignal to `fetchAccessLists` in Web UI

- Replace usages of `services.IsAccessListOwner/IsAccessListMember` with
  equivelant funcs from `Hierarchy`

- Remove final references to AccessListMembershipChecker

- Don't allow ACL deletion when member/owner in other lists

- Guard Access List deletion behind membership/ownership checks for List

- Expose Hierarchy func to recursively get all members

- Tidy UserLoginStateGenerator logic involving ACL Membership/Ownership

Co-authored-by: Maxim Dietz <maxim.dietz@goteleport.com>
2024-11-01 22:07:36 +00:00
Lisa Kim a132be09d2 Add a new role.allow.request field called kubernetes_resources (#47173)
* Add a new role.allow.request field called kubernetes_resources

* Fix lint: update terraform docs
2024-11-01 03:47:00 +00:00
Grzegorz Zdunek 47494db923 Sign a hashed message in hardware key warmup call (#48206)
Otherwise, signing may fail with "input must be a hashed message" error.
2024-10-31 22:09:39 +00:00
Vadym Popov c1f368e6f7 Add audit logs for auto update resources (#48218) 2024-10-31 18:07:42 +00:00
Vadym Popov 9d2b5c5fe9 Client auto updates integration for {tctl,tsh} (#47815)
* Client auto updates integration for tctl/tsh

* Add version validation
Fix recursive version check for darwin platform
Fix cleanup for multi-package support

* Fix identifying tools removal from home directory

* Replace ToolsMode with ToolsAutoUpdate

* Reuse insecure flag for tests

* Fix CheckRemote with login

* Fix windows administrative access requirement
Update must be able to be canceled, re-execute with latest version or last updated
Show progress bar before request is made

* Fix update cancellation for login action
Address review comments

* Add signal handler with stack context cancellation

* Use copy instead of hard link for windows
Fix progress bar if we can't receive size of package

* Replace with list in order to support manual cancel

* Download archive package to temp directory

* Decrease timeout for client tools proxy call
2024-10-31 17:09:24 +00:00
Maxim Dietz a0540c5afe feat: Update AccessList Proto with new fields, add utils (#47828)
- Add Hierarchy utils for nested AccessList validation and handling
- Update AccessList Protos with new fields
- Update AccessList and AccessListMember types and converters with new
  fields
2024-10-30 20:00:49 +00:00
Andrew LeFevre 1589413a56 emit an audit event with file transfer statistics when an SFTP session is completed (#48051)
* emit an audit event with file transfer statistics when an SFTP session is completed

* remove unused SFTP event codes, don't embed os.File

* send oneof events to parent process to make event unmarshaling easier to reason about

* protect tracked files with mutex
2024-10-30 18:52:20 +00:00
Brian Joerger 3d3ee992b2 Fix SAMLForceAuthn marshalling (#48098)
* Marshal SAMLForceAuthn to/from string/bool.

* Use any; Move to api/types/saml.go; add test.
2024-10-30 18:29:35 +00:00
Bernard Kim 3922335948 Extend email plugin settings api (#48048)
* Extend email plugin settings api

* Update tctl collections cmd

* Update AllPluginTupes list

* Add starttlsPolicy to docs

* Include start TLS policy configuration

* Add port validation rule

* Fix test

* Address feedback

- Set enum 0 as UNSPECIFIED
- Update enum names

* Use string instead of enum
2024-10-30 16:50:19 +00:00
Michelle Bergquist 6e1189da89 Use cloud anonymization key (#46819)
- When present, is used to anonymize events
2024-10-30 03:11:23 +00:00
Przemko RobakowskiandZac Bergquist dddd9ea5a2 Fix update and list for DynamicWindowsDesktops (#48046)
* proto

* Fix update for DynamicWindowsDesktops

* fix test server

* fix test

* fix test

* fix test

* Update api/proto/teleport/dynamicwindows/v1/dynamicwindows_service.proto

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

* update proto

* fix tests

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
2024-10-29 22:18:27 +00:00
Brian JoergerandAlan Parra 5e7bdb2a15 feat: SSO MFA - Add SSO MFA ceremony (#46982)
* Add SSOMFACeremony to MFA prompt; Add SSOMFACeremonyConstructor to MFA ceremony.

* Set SSO MFA ceremony from client configuration.

* Close sso mfa redirector once mfa ceremony is complete.

* Refactor sso mfa ceremony.

* Add SSOMFACeremonyConstructor.

* Add tests.

* Add --mfa-mode=sso support; Add cli prompt UX changes.

* Remove unused field, fix test.

* Resolve comments.

* Remove convoluted context closing logic for sso redirector.

* Fix test.

* Update lib/client/sso/ceremony.go

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

---------

Co-authored-by: Alan Parra <alan.parra@goteleport.com>
2024-10-29 21:23:46 +00:00
Alan Parra e22aad362e Warn users about upcoming OTP for session MFA deprecation (#48096) 2024-10-29 20:02:27 +00:00
Stephen Levine 3220ffad77 [teleport-update] Use new webapi fields to find version (#47961)
* Adapt teleport-update to new webapi endpoints

* feedback
2024-10-29 19:03:31 +00:00
Tiago SilvaandMarco Dinis 768a0bd684 [entraid] add setup script for offline clusters. (#47863)
* [entraid] add setup script for offline clusters.

This PR adds a cli configuration for Entra ID where it's possible to default to system credentials instead of relying on OIDC for authentication in EntraID. OIDC is not always a possibility specially when the cluster is private and not internet acessible.

The UX is the following:

```text

Step 1: Run the Setup Script

1. Open **Azure Cloud Shell** (Bash) using **Google Chrome** or **Safari** for the best compatibility.
2. Upload the setup script using the **Upload** button in the Cloud Shell toolbar.
3. Once uploaded, execute the script by running the following command:
   $ bash entraid.sh

**Important Considerations**:
- You must have **Azure privileged administrator permissions** to complete the integration.
- Ensure you're using the **Bash** environment in Cloud Shell.
- During the script execution, you'll be prompted to run 'az login' to authenticate with Azure. **Teleport** does not store or persist your credentials.
- **Mozilla Firefox** users may experience connectivity issues in Azure Cloud Shell; using Chrome or Safari is recommended.

Once the script completes, type 'continue' to proceed, 'exit' to quit: continue

Step 2: Input Tenant ID and Client ID

With the output of Step 1, please copy and paste the following information:
Enter the Tenant ID: 1056b571-0390-4b08-86c8-2edba8d9ae79
Enter the Client ID: 1056b571-0390-4b08-86c8-2edba8d9ae79

Successfully created EntraID plugin "name".
```

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

* move function to api

* handle code review comments

* Apply suggestions from code review

Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>

* fix url

* enable group claims

* add godoc

* handle code review comments

* fix gomod

---------

Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Co-authored-by: Marco Dinis <marco.dinis@goteleport.com>
2024-10-29 17:51:58 +00:00