GCP Secret Manager

Detailed information on the GCP Secret Manager secret store component

Component format

To setup GCP Secret Manager secret store create a component of type secretstores.gcp.secretmanager. See this guide on how to create and apply a secretstore configuration. See this guide on referencing secrets to retrieve and use the secret with Dapr components.

  1. apiVersion: dapr.io/v1alpha1
  2. kind: Component
  3. metadata:
  4. name: gcpsecretmanager
  5. namespace: default
  6. spec:
  7. type: secretstores.gcp.secretmanager
  8. version: v1
  9. metadata:
  10. - name: type
  11. value: <replace-with-account-type>
  12. - name: project_id
  13. value: <replace-with-project-id>
  14. - name: private_key_id
  15. value: <replace-with-private-key-id>
  16. - name: client_email
  17. value: <replace-with-email>
  18. - name: client_id
  19. value: <replace-with-client-id>
  20. - name: auth_uri
  21. value: <replace-with-auth-uri>
  22. - name: token_uri
  23. value: <replace-with-token-uri>
  24. - name: auth_provider_x509_cert_url
  25. value: <replace-with-auth-provider-cert-url>
  26. - name: client_x509_cert_url
  27. value: <replace-with-client-cert-url>
  28. - name: private_key
  29. value: <replace-with-private-key>

Warning

以上示例将 Secret 明文存储。 It is recommended to use a local secret store such as Kubernetes secret store or a local file to bootstrap secure key storage.

Spec metadata fields

字段RequiredDetailsExample
typeYThe type of the account.“serviceAccount”
project_idYThe project ID associated with this component.“project_id”
private_key_idNThe private key ID“privatekey”
client_emailYThe client email address“client@example.com”
client_idNThe ID of the client“11111111”
auth_uriNThe authentication URIhttps://accounts.google.com/o/oauth2/auth
token_uriNThe authentication token URIhttps://oauth2.googleapis.com/token
auth_provider_x509_cert_urlNThe certificate URL for the auth providerhttps://www.googleapis.com/oauth2/v1/certs
client_x509_cert_urlNThe certificate URL for the clienthttps://www.googleapis.com/robot/v1/metadata/x509/<project-name>.iam.gserviceaccount.com
private_keyYThe private key for authentication“privateKey”

Setup GCP Secret Manager instance

Setup GCP Secret Manager using the GCP documentation: https://cloud.google.com/secret-manager/docs/quickstart.

相关链接

Last modified January 1, 0001