Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[v17] Show device trust status in Connect #49577

Merged
merged 1 commit into from
Nov 29, 2024

Conversation

gzdunek
Copy link
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)
@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
46 checks passed
@gzdunek gzdunek deleted the gzdunek/backport-49508/v17 branch November 29, 2024 14:04
@doggydogworld doggydogworld mentioned this pull request Dec 3, 2024
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