Skip to content
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

allow writing secrets to nested folders #125

Closed
tam7t opened this issue Jun 30, 2021 · 0 comments · Fixed by #136
Closed

allow writing secrets to nested folders #125

tam7t opened this issue Jun 30, 2021 · 0 comments · Fixed by #136
Assignees
Labels

Comments

@tam7t
Copy link
Contributor

tam7t commented Jun 30, 2021

Currently the fileName parameter in the SecretProviderClass parameters cannot have a path separator and is validated by k8s.io/apimachinery/pkg/util/validation.IsConfigMapKey.

A user may want to organize secrets into folder within the mount:

apiVersion: secrets-store.csi.x-k8s.io/v1alpha1
kind: SecretProviderClass
metadata:
  name: app-secrets
spec:
  provider: gcp
  parameters:
    secrets: |
      - resourceName: "<RESOURCE_ID>"
        fileName: "api.key"
      - resourceName: "<RESOURCE_ID>"
        fileName: "tls/cert.pem"
      - resourceName: "<RESOURCE_ID>"
        fileName: "tls/key.pem"
      - resourceName: "<RESOURCE_ID>"
        fileName: "foo/bar/baz.txt"

Now that all file writes are handled by the driver (#98) and the driver itself uses the same AtomicWriter as other K8s secrets this should be possible without re-introducing CVE-2020-8567

@tam7t tam7t added the feature label Jun 30, 2021
@tam7t tam7t self-assigned this Aug 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant