Skip to content

PushSecret to AWS Secrets Manager: stored as Base64, results in AWS GUI error #1816

@tabnul

Description

@tabnul

Describe the solution you'd like
When we push a secret to AWS Secrets Manager, we are unable to view it in the AWS Gui. It results in an error such as;
"The secret value can't be converted to key name and value pairs."
Plaintext tab is empty.

Input YAML:

apiVersion: external-secrets.io/v1alpha1
kind: PushSecret
metadata:
  name: pushsecret-example # Customisable
  namespace: teamb # Same of the SecretStores
spec:
  deletionPolicy: Delete
  refreshInterval: 10s # Refresh interval for which push secret will reconcile
  secretStoreRefs: # A list of secret stores to push secrets to
    - name: teamb-secret-store
      kind: SecretStore
  selector:
    secret:
      name: my-secret # Source Kubernetes secret to be pushed
  data:
    - match:
        secretKey: key1 # Source Kubernetes secret key to be pushed
        remoteRef:
          remoteKey: teamb-my-first-parameter-3 # Remote reference (where the secret is going to be pushed)

Give us examples of the outcome
Outcome:

In the network trace i do see that it is retrieving the secret in the AJAX call. It seems to be stored as base64 which the AWS Gui is unable to parse correctly.

Example from network trace which does not show (created through pushsecret);

{
	"ARN": "XXXX",
	"CreatedDate": 1671028960.515,
	"Name": "teamb-my-first-parameter-2",
	"SecretBinary": "eyJzdXBlcmtleSI6ICJzdXBlcnNlY3JldCJ9",
	"VersionId": "589B08B0-671D-4CA6-8419-CD14398AB466",
	"VersionStages": [
		"AWSCURRENT"
	]
}

Example from network trace which does work (manually created);

{
	"ARN": "XXXX",
	"CreatedDate": 1671017643.281,
	"Name": "teamb-kv",
	"SecretString": "{\"key1\":\"value123\",\"key2\":\"value456\"}",
	"VersionId": "60c6e342-7aa0-4a2e-8ed8-2eaefafa7504",
	"VersionStages": [
		"AWSCURRENT"
	]
}

Observations (Constraints, Context, etc):

EKS 1.22

Metadata

Metadata

Assignees

Labels

area/awsIndicates an issue or PR related to AWS.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions