Skip to content

[v17] Show device trust status in Connect#49577

Merged
gzdunek merged 1 commit intobranch/v17from
gzdunek/backport-49508/v17
Nov 29, 2024
Merged

[v17] Show device trust status in Connect#49577
gzdunek merged 1 commit intobranch/v17from
gzdunek/backport-49508/v17

Conversation

@gzdunek
Copy link
Copy Markdown
Contributor

@gzdunek gzdunek commented Nov 29, 2024

Backport #49508 to branch/v17

Manual backport because of a conflict in the generated protobuf file.

Changelog: Teleport Connect now shows whether it is being used on a trusted device or if enrollment is required for full access

* 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`

(cherry picked from commit 095b0a3)
@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from avatus November 29, 2024 13:46
@gzdunek gzdunek added this pull request to the merge queue Nov 29, 2024
Merged via the queue into branch/v17 with commit 77e1e5b Nov 29, 2024
@gzdunek gzdunek deleted the gzdunek/backport-49508/v17 branch November 29, 2024 14:04
@doggydogworld doggydogworld mentioned this pull request Dec 3, 2024
@fheinecke fheinecke mentioned this pull request Mar 18, 2025
@fheinecke fheinecke mentioned this pull request Apr 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants