Extend kubectl auth can-i support for kubernetes_resources RBAC rules#26425
Extend kubectl auth can-i support for kubernetes_resources RBAC rules#26425
kubectl auth can-i support for kubernetes_resources RBAC rules#26425Conversation
6266007 to
363db21
Compare
|
Edit: the rolev5 was fixed, I removed the part about it. If I understand correctly, before the change:
after the change:
The following rolev6 which was not providing any access will start to work. kind: role
metadata:
name: kube-access
version: v6
spec:
allow:
kubernetes_labels:
'region': '*'
'platform': 'minikube'
kubernetes_groups:
- developers
kubernetes_users:
- minikube
deny: {}I understand this is intended and provides a better user experience, but this was not a bug and might be a surprise if users who had no access suddenly can hit any resource after a Teleport update. I think we should not change the v5 behaviour at all, for the v6 behaviour change I would be more comfortable with introducing a v7. It's awkward to have to bump the version again, but as a security company I think we must to strictly follow versioning constraints to avoid exposing our user's infrastructure. |
|
@hugoShaka the rolev5 was a typo. |
4fd16a1 to
4edcb24
Compare
RoleV6's kubernetes_resourceskubectl auth can-i support for kubernetes_resources RBAC rules
4edcb24 to
c453d03
Compare
8181658 to
f534bfc
Compare
There was a problem hiding this comment.
I'm not sure this heuristic is robust enough: depluralizeResource("ingress") will have a weird behaviour.
If you don't think we need to fix this now, can you add a warning in types.KubernetesResourcesKinds to ensure we don't introduce support for a resource ending with an s without changing the logic here?
There was a problem hiding this comment.
Right now we only support pods and once we support other options I will have a conversion table
f534bfc to
7f67a72
Compare
|
Would you mind adding |
…ules This PR extends Teleport capabilities of `kubectl auth can-i` to support evaluation of `kubernetes_resources`. It also changes the error message to be clear to the users what's the cause of the error and adds a warning when users try to edit invalid roles.
7f67a72 to
05e931e
Compare
This PR extends the Teleport capabilities of
kubectl auth can-ito supportevaluation of
kubernetes_resources.It also changes the error message to be clear to the users what's the
cause of the error and adds a warning when users try to edit invalid
roles.