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

Fix missing identity in certs logic #10673

Merged
merged 8 commits into from
Mar 3, 2022
Merged

Conversation

Joerger
Copy link
Contributor

@Joerger Joerger commented Feb 28, 2022

This PR fixes the missing identity in cert logic to only check if the roles extension is missing, rather than roles or traits. This logic was originally intended from discerning legacy certs from standard certs.

There are many supported use cases where traits will be nil in standard certs, such as in Teleport plugins where the user+role is created from a yaml file, and checking the roles alone is sufficient for differentiating legacy certs.

Closes #10081

@Joerger Joerger force-pushed the joerger/traits-non-null-fix branch from 69ee54e to 16d8aff Compare February 28, 2022 19:35
@Joerger Joerger changed the title Update missing identity in cert logic Encode empty roles/traits into certifivates Feb 28, 2022
@Joerger Joerger force-pushed the joerger/traits-non-null-fix branch from 4a443b5 to c7871e3 Compare March 1, 2022 00:51
@Joerger Joerger changed the title Encode empty roles/traits into certifivates Fix missing identity in certs logic Mar 1, 2022
@Joerger Joerger marked this pull request as ready for review March 1, 2022 01:03
lib/services/role.go Outdated Show resolved Hide resolved
lib/services/role.go Show resolved Hide resolved
@Joerger Joerger requested a review from rosstimothy March 1, 2022 17:48
Copy link
Contributor

@rosstimothy rosstimothy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like this might be breaking TestAuthorizeWithLocksForLocalUser

@Joerger Joerger requested a review from rosstimothy March 3, 2022 21:31
@Joerger Joerger merged commit 8d71ba0 into master Mar 3, 2022
@Joerger Joerger deleted the joerger/traits-non-null-fix branch March 3, 2022 22:22
Joerger added a commit that referenced this pull request Mar 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

access plugin credentials cause unexpected auth server WARN message
3 participants