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

Extract key from json object in a Secret #853

Closed
haf-tech opened this issue Jan 31, 2021 · 4 comments
Closed

Extract key from json object in a Secret #853

haf-tech opened this issue Jan 31, 2021 · 4 comments

Comments

@haf-tech
Copy link

Enhancement
Provide the capability to extract a key/field from a json object which is stored in a Secret resource object

Example

kind: Secret
data
   connection: base64-encoded-string

The base64-encoded-string contains a JSON string, like

{
  "postgres": {
      "auth": {
          "user": "blub",
          "pass": "pass",
          "method": "direct"
      },
      "host": "example.com",
      "tls": {

      }
  }
}

Objective is, that SBO only inject/bind a specific field from the JSON, e.g. postgres.auth.user and postgres.auth.pass etc. in the resulting Secret in separate keys.

Probably, this is possible with the new go-template support in the mapping?

@sbose78
Copy link
Member

sbose78 commented Feb 16, 2021

cc @redhat-developer/service-binding

@baijum
Copy link
Member

baijum commented Apr 7, 2022

We could handle this as part of the Mapping Extension in the spec: servicebinding/spec#145

@pmacik
Copy link
Contributor

pmacik commented Dec 8, 2022

@haf-tech Hi, are you still interested in this feature? Please let us know.

@pmacik
Copy link
Contributor

pmacik commented Jan 19, 2023

@haf-tech Closing the issue now, if you are still interested feel free to re-open.

@pmacik pmacik closed this as completed Jan 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants