Skip to content

Cloud Database Cert/IAM Connections #9156

@vedosis

Description

@vedosis

Is your feature request related to a problem? Please describe.

When running Temporal Server in cloud-managed Kubernetes (AWS EKS, GCP GKE), users must manage database credentials as secrets. All major cloud providers support zero-secret database authentication using workload identity, but Temporal doesn't provide a way to use these features.

The existing Connect hook is undocumented and requires making local code changes and custom builds, making it impractical for most users.

Describe the solution you'd like

Add built-in support for cloud database authentication in Temporal's SQL configuration:

persistence:
  default:
    sql:
      pluginName: "mysql8"
      databaseName: "temporal"
      connectAddr: "my-db.us-west-2.rds.amazonaws.com:3306"
      cloudAuth:
        provider: "aws"
        region: "us-west-2"

For GCP:

persistence:
  default:
    sql:
      pluginName: "postgres12"
      databaseName: "temporal"
      connectAddr: "project:region:instance"
      cloudAuth:
        provider: "gcp"

Proposed scope:

  • AWS RDS: IAM authentication with automatic token refresh (15-min lifetime)
  • GCP Cloud SQL: IAM authentication with automatic token refresh (1-hour lifetime)
  • Azure: Can be added if there's demand (would require new dependency, ~20-30MB)

Why this makes sense:

  • github.com/aws/aws-sdk-go and cloud.google.com/go/* are already Temporal dependencies
  • No new dependencies required for AWS/GCP support
  • Aligns with cloud-native security best practices (zero-trust, workload identity)
  • Infrastructure already exists for key rotation

Describe alternatives you've considered

  1. Document the Connect hook approach - Requires users to make custom-builds and maintain upstream merges.
  2. External credential provider pattern - Adds deployment complexity,
  3. Do nothing - Users continue managing secrets manually... Somewhere an SRE cries silent tears.

Additional context

This would eliminate the need for secret management for database credentials when running Temporal in AWS EKS or GCP GKE with workload identity configured.

Commitment and Resources:

This is a business priority for us. We're allocating dedicated engineering resources to implement this feature properly if Temporal confirms alignment. We will do the work and target initial PR(s) within 4-6 weeks.

Temporal already has the necessary connection rotation infrastructure (DatabaseHandle.reconnect()) and the required SDKs. The implementation is straightforward and aligns with cloud-native security best practices adopted across the industry.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions