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

[v16] Show device trust status in Connect #49578

Merged
merged 2 commits 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 and a small spacing difference in IdentityList.tsx. Accepted version from master and verified in storybook.

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)
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-49578.d212ksyjt6y4yg.amplifyapp.com

@public-teleport-github-review-bot public-teleport-github-review-bot bot removed the request for review from avatus November 29, 2024 13:47
@gzdunek gzdunek added this pull request to the merge queue Nov 29, 2024
Merged via the queue into branch/v16 with commit 5256d65 Nov 29, 2024
45 checks passed
@gzdunek gzdunek deleted the gzdunek/backport-49508/v16 branch November 29, 2024 14:05
@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