Data store IAM authentication requires
langgraph-api>=0.12.0.Supported services
The provider setting controls authentication only. Configure network access, TLS, database users, cache users, and provider permissions before starting Agent Server.
Enable IAM authentication
To enable IAM authentication:- Enable IAM or identity-based authentication on the managed data store.
- Create the database or cache principal and grant it only the permissions Agent Server needs.
- Make workload identity credentials available to every Agent Server API and queue process.
- Set a connection URI that contains the principal name but no static password.
-
Set the corresponding provider selector to
aws,azure, orgcp:
The connection URIs must meet the following requirements:
- Transport security: Use
sslmode=requireor a stricter verification mode for PostgreSQL, andrediss://for Redis. - Character encoding: Percent-encode URI-reserved characters in usernames, such as
@as%40. - Private certificate authority: If Redis TLS uses a private certificate authority, set
REDIS_TLS_CA_CERTto the base64-encoded PEM CA bundle. - Cluster mode: If the Redis service uses cluster mode, also set
REDIS_CLUSTER=true.
Configure AWS
Agent Server uses the AWS SDK default credential chain to create RDS authentication tokens and ElastiCache SigV4 authentication tokens. Before configuring Agent Server:- Enable IAM database authentication for RDS or Aurora PostgreSQL. Grant the database user the
rds_iamrole and grant the workload identityrds-db:connectfor that user. - Enable IAM authentication for the ElastiCache user. Grant the workload identity
elasticache:Connectfor both the ElastiCache cache or replication group and the ElastiCache user. - Configure AWS credentials through EKS Pod Identity, IAM roles for service accounts (IRSA), an instance profile, or another AWS SDK credential source. Set
AWS_REGIONorAWS_DEFAULT_REGIONto the data store’s region.
Configure Azure
Agent Server usesDefaultAzureCredential to obtain Microsoft Entra tokens for PostgreSQL and Redis. The credential chain supports Azure Workload Identity, managed identities, and service principals.
Before configuring Agent Server:
- Configure Microsoft Entra authentication for Azure Database for PostgreSQL Flexible Server. Create a database role for the managed identity or service principal. Use that role name as the PostgreSQL URI username.
- Configure Microsoft Entra authentication and a data access policy for Azure Managed Redis. Use the managed identity or service principal object ID as the Redis URI username.
- Configure Azure Workload Identity, a managed identity, or another
DefaultAzureCredentialsource for each Agent Server workload.
REDIS_CLUSTER=true when using Azure Managed Redis in cluster mode. Agent Server refreshes Microsoft Entra tokens and reauthenticates open Redis connections before token expiration.
Configure GCP
Agent Server uses Google ADC to obtain Cloud SQL login tokens and Memorystore access tokens. ADC supports GKE Workload Identity Federation, attached service accounts, service account impersonation, andGOOGLE_APPLICATION_CREDENTIALS.
Before configuring Agent Server:
- Configure Cloud SQL IAM database authentication, add the IAM principal as a database user, and grant it
roles/cloudsql.instanceUser. Grant database privileges separately. - Configure Memorystore IAM authentication and grant the workload identity
roles/redis.dbConnectionUser. - Configure ADC for each Agent Server workload. Prefer Workload Identity Federation or an attached service account over a service account key.
default Redis username:
.gserviceaccount.com suffix.
Configure the standalone Helm chart
For a standalone Agent Server deployment on Kubernetes, set the provider selectors on every Agent Server workload. If the separate queue deployment is enabled, configure the API and queue deployments with the same identity and environment variables. The following example uses AWS for both data stores. Set each provider value toazure or gcp when using another cloud provider:
apiServer.serviceAccount and queue.serviceAccount with the cloud provider’s workload identity mechanism. Both workloads must be able to obtain credentials and connect to the data stores.
See also
- Self-host standalone servers
- Self-hosted Agent Server environment variables
- Self-hosted platform features
- Configure Agent Server for scale
Connect these docs to Claude, VSCode, and more via MCP for real-time answers.

