-
Notifications
You must be signed in to change notification settings - Fork 288
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
CA-371790: Restrict the permissions on pool tokens #4857
CA-371790: Restrict the permissions on pool tokens #4857
Conversation
006b62a
to
e939b3c
Compare
|
We first need to get the stdext change reviewed/committed and added to xs-opam. |
You also need a |
e939b3c
to
5164cb9
Compare
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, please wait to merge until xs-opam includes the necessary code to make the code compile
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.
I don't like that users of the function can dictate the permissions, please undo those changes and instead change the implementation of the function to hardcode it:
let write_to_file = Xapi_stdext_unix.Unixext.write_string_to_file ~perms:0o600
Is this based on the argument that we already know that we want to store a secret and hence need most restrictive permissions? Which |
Yes, since it's a secrets the permissions need to be more stringent. Currently it's on SecretString's user to use the safe permissions, this is risky since it's done a optional parameter which might be elided. Even if it wasn't I don't think it should be a decision at all as it should always use the safe choice, hence why it only makes sense to encode it in |
Signed-off-by: Steven Woods <steven.woods@citrix.com>
5164cb9
to
53215ea
Compare
Depends on the changes in xapi-project/stdext#69