vault-jwt-store.yaml 1.1 KB

12345678910111213141516171819202122232425262728293031323334
  1. apiVersion: external-secrets.io/v1beta1
  2. kind: SecretStore
  3. metadata:
  4. name: vault-backend
  5. namespace: example
  6. spec:
  7. provider:
  8. vault:
  9. server: "https://vault.acme.org"
  10. path: "secret"
  11. version: "v2"
  12. auth:
  13. # VaultJwt authenticates with Vault using the JWT/OIDC auth mechanism
  14. # https://www.vaultproject.io/docs/auth/jwt
  15. jwt:
  16. # Path where the JWT authentication backend is mounted
  17. path: "jwt"
  18. # JWT role configured in a Vault server, optional.
  19. role: "vault-jwt-role"
  20. # Retrieve JWT token from a Kubernetes secret
  21. secretRef:
  22. name: "my-secret"
  23. key: "jwt-token"
  24. # ... or retrieve a Kubernetes service account token via the `TokenRequest` API
  25. kubernetesServiceAccountToken:
  26. serviceAccountRef:
  27. name: "my-sa"
  28. # `audiences` defaults to `["vault"]` it not supplied
  29. audiences:
  30. - vault
  31. # `expirationSeconds` defaults to 10 minutes if not supplied
  32. expirationSeconds: 600