Skip to content

Capability to set file-system permissions for mounted secrets #722

@dimbleby

Description

@dimbleby

Describe the solution you'd like

Supposing my secret is an ssh key. Then I'm going to want the file to have permissions 0600, else I'll get

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

etc

Looks like everything that this driver mounts gets permissions 0644 - here and here if my grep is good.

I'd like a mechanism to set the permissions to 0600.

Anything else you would like to add:

Common advice seems to be to run an initContainer and adjust the permissions on files as needed from that. But the secrets-store-csi-driver insists that I mount the volume as read-only, so that doesn't work.

Environment:

  • Secrets Store CSI Driver version: (use the image tag):
  • Kubernetes version: (use kubectl version):

Metadata

Metadata

Assignees

Labels

kind/featureCategorizes issue or PR as related to a new feature.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions