Skip to content

[v12] Fix access to leaf resources #25862

Merged
rosstimothy merged 1 commit intobranch/v12from
tross/backport-25694/v12
May 8, 2023
Merged

[v12] Fix access to leaf resources #25862
rosstimothy merged 1 commit intobranch/v12from
tross/backport-25694/v12

Conversation

@rosstimothy
Copy link
Copy Markdown
Contributor

Backport #25694 to branch/v12

@github-actions github-actions Bot added backport size/md tsh tsh - Teleport's command line tool for logging into nodes running Teleport. labels 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
@rosstimothy rosstimothy force-pushed the tross/backport-25694/v12 branch from 90d7ef4 to e7c61c8 Compare May 8, 2023 22:51
@rosstimothy rosstimothy enabled auto-merge May 8, 2023 23:01
@r0mant r0mant mentioned this pull request May 8, 2023
1 task
@rosstimothy rosstimothy added this pull request to the merge queue May 8, 2023
Merged via the queue into branch/v12 with commit 568495b May 8, 2023
@rosstimothy rosstimothy deleted the tross/backport-25694/v12 branch May 8, 2023 23:37
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport size/md tsh tsh - Teleport's command line tool for logging into nodes running Teleport.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants