Skip to content
This repository has been archived by the owner on Jul 26, 2022. It is now read-only.

fix(IBM): correctly extract secret data for IBM IAM credentials type secrets #792

Merged
merged 2 commits into from
Jul 12, 2021

Conversation

mailtokun
Copy link
Contributor

The result of IAM credentials type is difference from other types. It does not contains a secret_data field.
Below is an example:

{
  "metadata": {
    "collection_type": "application/vnd.ibm.secrets-manager.secret+json",
    "collection_total": 1
  },
  "resources": [
    {
      "access_groups": [
        "AccessGroupId-xxxxx"
      ],
      "api_key": "xxxxxx",
      "created_by": "xxx-xxxxx",
      "creation_date": "2021-07-12T04:57:49Z",
      "crn": "crn:v1:bluemix:public:secrets-manager:us-east:a/xxxx:xxxxx:secret:xxxxx",
      "id": "xxxxx",
      "labels": [
        
      ],
      "last_update_date": "2021-07-12T05:58:27Z",
      "name": "to-be-delete",
      "reuse_api_key": false,
      "secret_type": "iam_credentials",
      "service_id": "ServiceId-xxxxxx",
      "state": 1,
      "state_description": "Active",
      "ttl": 86400
    }
  ]
}

@mailtokun
Copy link
Contributor Author

@Flydiverny @silasbw Could you review this PR? Thanks.

Copy link
Member

@Flydiverny Flydiverny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR seems accurate, tried checking API docs to confirm https://cloud.ibm.com/apidocs/secrets-manager#get-secret 😄

@Flydiverny Flydiverny changed the title fix bug for getting apikey of IBM IAM credentials type fix(IBM): bug for getting apikey of IBM IAM credentials type Jul 12, 2021
@Flydiverny Flydiverny changed the title fix(IBM): bug for getting apikey of IBM IAM credentials type fix(IBM): correctly extract secret data for IBM IAM credentials type secrets Jul 12, 2021
@Flydiverny Flydiverny merged commit 2f16714 into external-secrets:master Jul 12, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants