You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using AWS Secrets Manager with JMESPath queries in a SecretProviderClass, if a JMESPath path does not point to a valid object, the error message is misleading and unhelpful.
The error JMES Path - $KEY for object alias - $MAPPED_KEY does not point to a valid object. appears in the CSI driver logs, but the pod status shows a generic error:
Failed to fetch secret from all regions. Verify secret exists and required permissions are granted for: [your secret name]
This makes debugging difficult because:
The actual JMESPath error is only visible in CSI driver logs, not in pod events
The pod error message suggests a permissions or secret existence issue, which may not be the root cause
Users waste time checking IAM permissions and secret names instead of fixing the JMESPath configuration
To Reproduce
Ensure you have all the correct IRSA/Policy bindings set up correctly.
Steps to reproduce the behavior:
Create a secret in AWS Secrets Manager with the following structure:
my-secret-key: {"HELLO":"WORLD"}
Create a SecretProviderClass with an invalid JMESPath query:
apiVersion: secrets-store.csi.x-k8s.io/v1kind: SecretProviderClassmetadata:
name: hello-secretsnamespace: defaultspec:
provider: awsparameters:
region: eu-central-1objects: | - objectName: "my-secret-key" objectType: "secretsmanager" jmesPath: - path: HELLO objectAlias: hello-value - path: WORLD # This path doesn't exist in the secret objectAlias: world-valuesecretObjects:
- secretName: hello-secrettype: Opaquedata:
- objectName: hello-valuekey: HELLO
- objectName: world-valuekey: WORLD
Create a deployment that uses this SecretProviderClass:
Pod status shows: Failed to fetch secret from all regions. Verify secret exists and required permissions are granted for: [your secret name]
Pod events do not show the JMESPath error
The actual JMESPath error is only visible in CSI driver logs
Expected behavior
The JMESPath error should be:
Displayed in the pod's events for easier debugging
More descriptive in the error message (e.g., "JMESPath query 'WORLD' does not exist in secret 'my-secret-key'")
Clearly distinguish JMESPath errors from permission/secret existence errors
Environment:
CSI Secrets Store Driver version: v1.5.3
AWS Secrets Store CSI Driver Provider version: v2.1.0
I am able to reproduce this issue on the latest version of the CSI driver and AWS providers.
Additional context
This issue is specific to the AWS Secrets Manager provider. The error message format suggests the issue is with secret fetching/permissions, when in reality it's a JMESPath configuration problem. This leads to significant debugging time being spent on the wrong area (IAM policies, secret names) instead of the actual issue (JMESPath paths).
Workaround
Currently, users must check the CSI driver logs to see the actual JMESPath error:
Describe the bug
When using AWS Secrets Manager with JMESPath queries in a
SecretProviderClass, if a JMESPath path does not point to a valid object, the error message is misleading and unhelpful.The error
JMES Path - $KEY for object alias - $MAPPED_KEY does not point to a valid object.appears in the CSI driver logs, but the pod status shows a generic error:This makes debugging difficult because:
To Reproduce
Ensure you have all the correct IRSA/Policy bindings set up correctly.
Steps to reproduce the behavior:
Create a secret in AWS Secrets Manager with the following structure:
Create a
SecretProviderClasswith an invalid JMESPath query:Create a deployment that uses this SecretProviderClass:
Observe the pod status and events:
Failed to fetch secret from all regions. Verify secret exists and required permissions are granted for: [your secret name]Expected behavior
The JMESPath error should be:
Environment:
CSI Secrets Store Driver version: v1.5.3
AWS Secrets Store CSI Driver Provider version: v2.1.0
I am able to reproduce this issue on the latest version of the CSI driver and AWS providers.
Additional context
This issue is specific to the AWS Secrets Manager provider. The error message format suggests the issue is with secret fetching/permissions, when in reality it's a JMESPath configuration problem. This leads to significant debugging time being spent on the wrong area (IAM policies, secret names) instead of the actual issue (JMESPath paths).
Workaround
Currently, users must check the CSI driver logs to see the actual JMESPath error: