design: add design doc for secret driver plugins#28144
design: add design doc for secret driver plugins#28144Veector40 wants to merge 1 commit intocontainers:mainfrom
Conversation
matt-allan
left a comment
There was a problem hiding this comment.
Thanks for writing this @Veector40.
I hope the podman maintainers don't mind -- I left some comments to clarify a few details I was thinking about when writing the original issue.
3725f35 to
716d9c7
Compare
|
Thanks for the detailed feedback, @matt-allan! I’ve updated the design doc to incorporate your suggestions. Specifically:
|
|
[NON-BLOCKING] Packit jobs failed. @containers/packit-build please check. Everyone else, feel free to ignore. |
Luap99
left a comment
There was a problem hiding this comment.
Thanks for the PR but I would be strongly against any new "drivers" that have to be implemented as I find that concept not good.
See my comments in #26488
It would be much better if just we focus how to get the secret data exposed to the container with having to use commands like podman secret create or remove.
|
|
||
| ## **Objective** | ||
|
|
||
| Currently, any new secret driver must be implemented natively within `containers/common`. This limits the ability of users and organizations to integrate Podman with external, proprietary, or highly specific secret management systems (like AWS Secrets Manager, HashiCorp Vault, or `systemd-creds`). |
There was a problem hiding this comment.
that is not really true as there is the shell driver that could be used so that needs to mention why and how that not works
Currently, any external secret manager must be integrated natively within containers/common, or duplicated into Podman's internal database via `podman secret create`. This design document proposes a stateless API for Podman "Secret Providers", allowing external binaries to dynamically provide secrets at container runtime. This bypasses the need for persistent secret creation, configuring external lookups entirely through containers.conf and runtime flags. Fixes: containers#27856 Signed-off-by: Victor Koycheff <victorkoycheff@gmail.com>
The concept that secrets use is the same concept used by the rest of Podman: secrets are resources managed by Podman. You have to use The approach outlined in #26488 is a major departure from that model. It's not clear how the existing API endpoints and CLI endpoints should work with those changes. My intent with #27856 was to fix the main limitations of the existing secrets without departing from the existing resource model. I can already use a bind mount to expose secrets to Podman containers directly. The value of having secrets managed by podman (for me) is having the resources I can list from the API and CLI. The problem the author of #26488 is trying to solve can't be solved with the shell driver. That doesn't mean the driver interface is bad; it's specifically the shell driver that has limitations. With the shell driver you can't pass through options. Without options you have no way to reference an existing secret. If we pass through options, you can do something like this: The same idea works for existing secrets in vault, SSM, etc. You still have to "create" them in Podman, but that's really just adding the metadata to the secrets DB. This is similar to volume plugins, where you can 'create' a volume that really just mounts an existing resource. (The printf is necessary because Podman requires some input, even if empty. That could be changed separately if this is a common use case). |
716d9c7 to
cedfd97
Compare
|
Thanks for the detailed feedback, @Luap99 and @matt-allan I had just finished completely reworking the draft design doc to accommodate @Luap99's request to move away from stateful drivers, right as @matt-allan commented defending the original driver concept. |
|
A friendly reminder that this PR had no activity for 30 days. |
Addresses #27856
As per @ashley-cui 's request in the original issue, this PR introduces the design document for Secret Driver Plugins.
Summary of the Design:
systemd-credsor cloud secret managers).containers.confunder[secrets.driver_plugins].stdinandstdout.This API design is extensible, avoids global process-tree visibility issues, and also isolates the initial implementation from the core secrets injection logic.
cc @matt-allan