Skip to content

AWS Parameter Store JSON number results in "unable to unmarshal secret" when using dataFrom #1479

@Ghettoburger

Description

@Ghettoburger

Issue:
Same problem as in issue 510, but with parameter store. So when JSON parameter has numerical value without double quotes, it will end up in ESO error.

Example:
parameter store secret:

{
  "DB_HOST": "myrds.eu-north-1.rds.amazonaws.com",
  "DB_PASSWORD": "verysecret",
  "DB_PORT": 5432,
  "DB_USERNAME": "seppo_hovi"
}

dataFrom is being used:

  dataFrom:
  - extract:
      key: /path/to/some/secret

Ends up in error:
external-secrets-operator-79b8c57f87-m6s8b external-secrets {"level":"error","ts":1660907739.6617749,"logger":"controllers.ExternalSecret","msg":"could not get secret data from provider","ExternalSecret":"namespace/secret","SecretStore":"/cluster-param-store","error":"unable to unmarshal secret secret: json: cannot unmarshal number into Go value of type string --omitted--

Observations:
On a quick glance it looks like parameterstore.go is handling this similarly as the secretsmanager.go pre Fix 545

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

No status

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions