-
Notifications
You must be signed in to change notification settings - Fork 766
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: restrict access to secrets #1009
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. I would assume $
is required for safe null checks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello @jnonino,
Thank you for your contribution.
The PR looks good. I'll test it.
In the mean time WDYT about renaming accessibleSecrets
by secretResourceNames
?
Hi @darkweaver87, I'll change the name of the field. I was actually expecting feedback about it 😄 |
Linking with issue traefik/traefik#7097 in Traefik repo as the discussion is relevant to the change added in this PR. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@jnonino , it looks like our bot is not able to merge this PR because it can't rebase on master and push to your branch. Would you mind to rebase it ? |
@jnonino any chance that you can rebase this PR ? |
Done!!! Sorry for the delay |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
With
still present in roles.yaml, this
poses no restriction, since the Or what am I missing? |
What does this PR do?
This PR aims to allow to users to restrict the secrets accesible by Traefik on the Kubernetes cluster. For this reason, I have added a new field into RBAC configuration
secretResourceNames
. By default, that value is an empty list ([]
) and the behaviour is the same as before this change, all secrets are accesible from Traefik.When that field contains one or more secret names, then only those secrets are the ones accessible from Traefik.
Motivation
Access to secrets without limits raises a security concern and Traefik should have access only to the secrets it requires to work properly, for example TLS certificates stored in secrets and used by Traefik. All other secrets in the cluster should not be accessible.
This was raised in the issue 1006.
More
make test
and all the tests passed