-
Notifications
You must be signed in to change notification settings - Fork 24
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
plugincontainer: Support mlock #94
Conversation
…where the container won't have IPC_LOCK
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.
Looks mostly good. One question in the main()
.
I appreciate all of the automated tests, as it is a pain to get all of the combinations working on my own Linux desktop :)
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
Thanks! |
When Vault's disable_mlock config setting is not set, it also tells plugins to call
unix.Mlockall
to ensure they don't swap any memory (with potentially sensitive data) out to disk. Without the IPC_LOCK capability, this is not possible inside a container, and previously meant containerized plugins would fail to start. hashicorp/vault#23215 is a WIP PR with the consumption of the newConfig.CapIPCLock
option.To ensure better test coverage, I formalised the options we are interested in into a TestCompatibilityMatrix test. Some tests are skipped as they are known not to work, and some are skipped as TODO items, waiting to set up CI so they can pass. I'll be working to remove most/all of these skips over the coming weeks.
Also fixes a couple of small bugs and tidy-ups:
plugincontainer_test
package so they are forced to use the library like an external consumer (Vault) would.