-
Notifications
You must be signed in to change notification settings - Fork 119
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
fix: use temp dir for secret data #1290
Conversation
Also tested manually by replacing ops in a running charm venv with the content of this branch. |
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.
Yes, I like this approach a lot better, thanks! The code reads a lot more simply, and it's nice to avoid keeping N files open. If you've done manual testing, I'm good with this.
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.
Did a quick check (Juju 3.6, LXD) and all seems good here too. Agreed that this approach seems generally nicer.
Change the mechanism used to pass secret values from ops to hook tools from command line to files in temporary directory. Removes the 2MB total secret size limit imposed by command line length Hook tool calls juju agent which in turn reads these files, I've confirmed with the Juju team that juju agent and charm code are run as the same user.
Fixes CVE-2024-41129 |
Change the mechanism used to pass secret values from ops to hook tools from command line to files in temporary directory.
Removes the 2MB total secret size limit imposed by command line length
Hook tool calls juju agent which in turn reads these files, I've confirmed with the Juju team that juju agent and charm code are run as the same user.