Commit Graph
8 Commits
Author SHA1 Message Date
Forrest b9232c3013 transition ssh enforcement to sshca.Identity (#51468) 2025-02-04 18:01:53 +00:00
rosstimothy 47c021650c Convert lib/devicetrust to use slog (#50458) 2024-12-19 22:41:37 +00:00
Grzegorz Zdunek 095b0a329a Show device trust status in Connect (#49508)
* Check if device is trusted

* Move `TrustedDeviceRequirement` enum to a separate file and generate TS definitions for it

Generating TS definitions for the entire legacy/types/types.proto would result in 50K lines of generated code, and the bundle size would increase by ~20% (around 1 MB).

* Extract function to calculate device trust requirement that can be used both by the server and the client

Important: it now uses `GetEnforcementMode` instead of `GetEffectiveMode`. The check for OSS module is performed on the server-side anyway.

* Check what is device trust requirement based on cluster config and user roles

* Show device trust status in UI

* Remove `types.` prefix

* Improve godocs

* Bring back `getRoles func() ([]types.Role, error)`

* Simplify `TestHasDeviceTrustExtensions`

* Clean up and improve `TestCalculateTrustedDeviceRequirement`

* Move `CalculateTrustedDeviceRequirement` and tests to a separate file

* Add colors to shield icons

* Declare variables where they are used

* Extract a component to display device trust status for better readability

* Correctly reference `lib/client.ProfileStatus.Extensions`

* Set group limit to 8

* Make `switch` exhaustive

* Regenerate protos

* `make fix-license`
2024-11-29 10:11:30 +00:00
Alan Parra 4d9fab6962 fix: Enforce device trust on OSS processes (#46940)
* fix: Enforce device trust on OSS processes

* Fix TestSessionController_AcquireSessionContext
2024-09-27 14:13:32 +00:00
Alan Parra a469c4ce2b feat!: Apply role device mode to App Access (#35274)
* Apply role device mode to App Access

* nit: Don't capture traces on guard errors

* Consistently return ErrTrustedDeviceRequired

* Surface device error trust error for apps

* Reply with a custom message for device trust errors

* Review: Remove the DisableDeviceAuthorization field

* Review: Refactor device trust message into its own method

* Review: Wrap guard errors

* Review: Simplify device error message
2023-12-04 17:53:30 +00:00
fheinecke b178b8b732 Updated Teleport codebase to AGPL3 license (#35259)
Signed-off-by: Fred Heinecke <fred.heinecke@goteleport.com>
2023-12-01 17:48:14 +00:00
Alan Parra 8ef8324b8c Enable role-based device authz for DB, k8s and SSH (#20640)
* Expose device verification methods in lib/devicetrust/authz

* Set device fields in auth.Context.GetAccessState

* Enable role-based device verification for SSH

* Enable role-based device verification for DBs

* Add TODO for better SSH error messages

* Do not override device error on lib/kube/proxy

* Run gci
2023-01-27 21:11:01 +00:00
Alan Parra ecf9e5c7d1 Enforce device extensions for SSH access (#19574)
Add device-aware authorization for SSH access, including both long-lived and
single-use certificates.

If the device trust mode is set to "required", then the presence of the
corresponding extensions is enforced. (Requires Teleport Enterprise.)

Adds logic related to TLS validation and single-use certificates as well, where
appropriate. TLS device-aware validation is not wired into Teleport yet, but
will be in follow up PRs.

gravitational/teleport.e#514
2022-12-21 22:54:13 +00:00