-
Notifications
You must be signed in to change notification settings - Fork 40.1k
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
Added SecretFileMode for specifying mounted secrets file permissions. #7908
Conversation
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed, please reply here (e.g.
|
@soltysh This needs another case in the secrets e2e |
@soltysh I think that new case case be, create different files with different modes and use the mount tester binary to check them. You can only check one file's mode with the current mount tester so it will probably 1 case per non-standard mode |
Unless there is a good reason to rush this, I'd like to put a hold on this On Thu, May 7, 2015 at 3:09 PM, Paul Morie notifications@github.com wrote:
|
I'm actually thinking now that #7925 is what we ought to be talking about. Once we have security and volumes sorted there shouldn't be any need to control permissions -- secrets in volumes should always be 0400, owned by the uid in the pod's security context, and have the selinux context set correctly. |
That was my first take in resolving #4789, just to set by default 0400 on mounted secrets. Still that kind of action generates risk that since we mount those as root, only root will have access to it. I then started chatting with @pmorie about that and we came up with this solution. I'll then wait for #7925 and its output. |
@@ -450,6 +452,16 @@ type GitRepoVolumeSource struct { | |||
type SecretVolumeSource struct { | |||
// Name of the secret in the pod's namespace to use | |||
SecretName string `json:"secretName"` | |||
// Modes describes access permissions to be applied per Secret's data key while mounting | |||
Modes []SecretFileMode `json:"modes"` |
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.
Does this really need to be per-key?
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.
You may want to mount each data's value with different permissions.
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.
Create multiple secrets.
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.
If we provide users with option to put multiple data we should allow them to define different permissions as well. On the other hand I can think of that as a grouping factor, where you'd group kind of "similar" data into one secret. Before doing any changes I'll wait for the outcome from #7925 @erictune mentioned.
Not sure if this is still active? If it isn't, it can be closed. At any rate, I don't think there will be time to complete review of this prior to the pre-v1 code freeze. |
I'm closing this until this gets sorted out, but everything seems that it'll be done differently. |
This came as a result of discussion in #4789.
@pmorie @jimmidyson PTAL.