[v14] Fix downgrade logic of KubernetesResources to Role v6#36009
Merged
tigrato merged 1 commit intobranch/v14from Dec 22, 2023
Merged
[v14] Fix downgrade logic of KubernetesResources to Role v6#36009tigrato merged 1 commit intobranch/v14from
KubernetesResources to Role v6#36009tigrato merged 1 commit intobranch/v14from
Conversation
`KubernetesResources` were improperly downgraded when they grant access to all resources. In that case, the role was downgraded to something that can't be used to access Kubernetes clusters but they could have been downgraded to a `Role` v6 with the same permissions as the `KubernetesResources`. This commit fixes the downgrade logic to downgrade to a `Role` v6 with the same permissions as the `KubernetesResources`. A role v7 with ```json kubenretes_labels: '*': '*' kubernetes_resources: - kind: pod name: '*' namespace: '*' verbs: - '*' ``` Is downgraded to a role v6 with ```json kubenretes_labels: '*': '*' kubernetes_resources: - kind: pod name: '*' namespace: '*' ``` Signed-off-by: Tiago Silva <tiago.silva@goteleport.com>
Contributor
|
The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with |
AntonAM
approved these changes
Dec 22, 2023
espadolini
approved these changes
Dec 22, 2023
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 #35991 to branch/v14
Changelog: Fix downgrade logic of KubernetesResources to Role v6