[v12] Fix access to leaf resources #25862
Merged
rosstimothy merged 1 commit intobranch/v12from May 8, 2023
Merged
Conversation
r0mant
approved these changes
May 8, 2023
zmb3
approved these changes
May 8, 2023
* Add leaf resource test cases to TestGenerateUserSingleUseCert Updates TestGenerateUserSingleUseCert to test certificate generation for kube and db resources in a leaf cluster. * Fix access to leaf resources The MFA required check added to the Auth server in #24250 is now only performed if the `RouteToCluster` indicates that the request is for the local cluster and not a remote cluster. When the root cluster checks if mfa is required to a resource in another cluster it would always return a not found error since the resource didn't exist in the root backend. This results in the behavior described in #25619. This step is now skipped for any resources in another cluster to allow certificates for remote cluster resources to be generated by the root. `tsh` detects that a resource is a leaf cluster and will first call `proto.AuthService/IsMFARequired` on the leaf cluster before requesting certificates from the root cluster to prevent a user from being prompted to complete an MFA ceremony if one is not required. Closes #25619 * Add desktop and app test case to TestGenerateUserSingleUseCert
90d7ef4 to
e7c61c8
Compare
rosstimothy
added a commit
that referenced
this pull request
May 9, 2023
* Add leaf resource test cases to TestGenerateUserSingleUseCert Updates TestGenerateUserSingleUseCert to test certificate generation for kube and db resources in a leaf cluster. * Fix access to leaf resources The MFA required check added to the Auth server in #24250 is now only performed if the `RouteToCluster` indicates that the request is for the local cluster and not a remote cluster. When the root cluster checks if mfa is required to a resource in another cluster it would always return a not found error since the resource didn't exist in the root backend. This results in the behavior described in #25619. This step is now skipped for any resources in another cluster to allow certificates for remote cluster resources to be generated by the root. `tsh` detects that a resource is a leaf cluster and will first call `proto.AuthService/IsMFARequired` on the leaf cluster before requesting certificates from the root cluster to prevent a user from being prompted to complete an MFA ceremony if one is not required. Closes #25619 * Add desktop and app test case to TestGenerateUserSingleUseCert
rosstimothy
added a commit
that referenced
this pull request
May 12, 2023
* Add leaf resource test cases to TestGenerateUserSingleUseCert Updates TestGenerateUserSingleUseCert to test certificate generation for kube and db resources in a leaf cluster. * Fix access to leaf resources The MFA required check added to the Auth server in #24250 is now only performed if the `RouteToCluster` indicates that the request is for the local cluster and not a remote cluster. When the root cluster checks if mfa is required to a resource in another cluster it would always return a not found error since the resource didn't exist in the root backend. This results in the behavior described in #25619. This step is now skipped for any resources in another cluster to allow certificates for remote cluster resources to be generated by the root. `tsh` detects that a resource is a leaf cluster and will first call `proto.AuthService/IsMFARequired` on the leaf cluster before requesting certificates from the root cluster to prevent a user from being prompted to complete an MFA ceremony if one is not required. Closes #25619 * Add desktop and app test case to TestGenerateUserSingleUseCert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport #25694 to branch/v12