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

Secret fails to mount if objectName contains file path separator (/) #1329

Open
jcogilvie opened this issue Aug 17, 2023 · 4 comments
Open
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.

Comments

@jcogilvie
Copy link

What steps did you take and what happened:
Created a secret in AWS with a valid ARN, of the form "arn:aws:secretsmanager:us-east-1:...:secret:api-key/foobar"

Like so:

Broken:

spec:
  parameters:
    objects: >
      - objectName:
      "arn:aws:secretsmanager:us-east-1:...:secret:api-key/foobar"
  provider: aws
  secretObjects:
    - data:
        - key: authsharedkeylocal-key
          objectName:"arn:aws:secretsmanager:us-east-1:...:secret:api-key/foobar"
      secretName: authsharedkeylocal
      type: Opaque

Working:

spec:
  parameters:
    objects: >
      - objectName:
      "arn:aws:secretsmanager:us-east-1:...:secret:api-key/foobar"
        objectAlias: myAlias
  provider: aws
  secretObjects:
    - data:
        - key: authsharedkeylocal-key
          objectName:"myAlias"
      secretName: authsharedkeylocal
      type: Opaque

Received errors:

file matching objectName arn:aws:secretsmanager:us-east-1:...:secret:api-key/foobar not found in the pod

What did you expect to happen:
Secret is mounted successfully.

Anything else you would like to add:
This works if the secret is renamed to not include a / or if an objectAlias is used.

Which provider are you using:
AWS

Environment:
EKS 1.26

  • Secrets Store CSI Driver version: (use the image tag): registry.k8s.io/csi-secrets-store/driver:v1.3.4
  • Kubernetes version: (use kubectl version): Server Version: version.Info{Major:"1", Minor:"26+", GitVersion:"v1.26.6-eks-a5565ad", GitCommit:"895ed80e0cdcca657e88e56c6ad64d4998118590", GitTreeState:"clean", BuildDate:"2023-06-16T17:34:03Z", GoVersion:"go1.19.10", Compiler:"gc", Platform:"linux/amd64"}
@jcogilvie jcogilvie added the kind/bug Categorizes issue or PR as related to a bug. label Aug 17, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 26, 2024
@jcogilvie
Copy link
Author

/remove-lifecycle stale

@k8s-ci-robot k8s-ci-robot removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 26, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the issue is closed

You can:

  • Mark this issue as fresh with /remove-lifecycle stale
  • Close this issue with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 25, 2024
@aramase
Copy link
Member

aramase commented Apr 25, 2024

/remove-lifecycle stale
/lifecycle frozen

@k8s-ci-robot k8s-ci-robot added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness.
Projects
None yet
Development

No branches or pull requests

4 participants