Skip to content

[v13] Get accessInfo based on user on access request drop#31136

Merged
ravicious merged 1 commit intobranch/v13from
ravicious/v13/backport-31068
Aug 29, 2023
Merged

[v13] Get accessInfo based on user on access request drop#31136
ravicious merged 1 commit intobranch/v13from
ravicious/v13/backport-31068

Conversation

@ravicious
Copy link
Copy Markdown
Member

Backport #31068.

Changelog: tsh request drop behavior was restored to pre-v13.3.5 state where after dropping an access request, the role list will be based on the current role list of the user on the backend, not on the login state (as introduced in #30628).


The backport doesn't include the integration test because the test was for a feature that's not included in v13.

That's how it used to be before user login state was introduced. When
dropping a resource access request, we want to restore certs back to the
state before the access request was assumed, so that the user access is
not limited only to select resources. In the past, this was done by
calculating accessInfo from a plan user object.

This approach had the side effect of refreshing the role list of the user
based on the current backend state without the need to provide credentials
again. Teleport Connect used this side effect to make the setup of Connect
My Computer interaction-free.

Theoretically, it'd be beneficial for `tsh request drop` to use login state
rather than the current backend state, as it'd make it impossible to "escalate"
privileges by refreshing the list of roles without authenticating again.
However, this brakes the setup of Connect My Computer as it expects
GenerateUserCerts to return a role list based on a current user role list.

This commit reverts that change. An alternative would be to change Connect
My Computer setup to require a one-time relogin midway through.
@ravicious ravicious added this pull request to the merge queue Aug 29, 2023
Merged via the queue into branch/v13 with commit a209345 Aug 29, 2023
@ravicious ravicious deleted the ravicious/v13/backport-31068 branch August 29, 2023 15:17
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.

5 participants