Skip to content

Commit

Permalink
Secret API requires Base64-encoded value (#110)
Browse files Browse the repository at this point in the history
  • Loading branch information
kbatuigas authored Nov 5, 2024
1 parent 4819dcc commit d2b0ca0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/manage/pages/api/cloud-dataplane-api.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ curl -X POST "<dataplane-api-url>/v1alpha2/kafka-connect/clusters/redpanda/conne

[CAUTION]
====
The field `aws.secret.access.key` in the example contains sensitive information that usually shouldn't be added to a configuration directly. Use the xref:api:ROOT:cloud-api.adoc#post-/v1alpha2/kafka-connect/clusters/-cluster_name-/secrets[Secrets API] to create a secret that stores the value of the key. You can then use the secret ID to inject the value of the secret in your request.
The field `aws.secret.access.key` in the example contains sensitive information that usually shouldn't be added to a configuration directly. Use the xref:api:ROOT:cloud-api.adoc#post-/v1alpha2/kafka-connect/clusters/-cluster_name-/secrets[Secrets API] to create a secret that stores the Base64-encoded value of the key. You can then use the secret ID to inject the value of the secret in your request.
To create a secret that you can reference in the connector configuration request:
Expand All @@ -178,7 +178,7 @@ To create a secret that you can reference in the connector configuration request
curl -X POST "https://<dataplane-api-url>/v1alpha2/kafka-connect/clusters/redpanda/secrets" \
-H 'accept: application/json'\
-H 'content-type: application/json' \
-d '{"name":"<connector-name>","secret_data":"<secret-value>"}'
-d '{"name":"<connector-name>","secret_data":"<secret-value-base64-encoded>"}'
----
Use the `id` returned in the Create Secret response to replace the placeholder `<secret-id>` in the previous Create Connector example. The syntax `${secretsManager:<secret-id>}` tells the Kafka Connect cluster to load `<secret-id>`.
Expand Down

0 comments on commit d2b0ca0

Please sign in to comment.