AWS AgentCore Agents Can Now Reach a Private Keycloak Behind a Corporate CA
Amazon Bedrock AgentCore agents can now get tokens from corporate identity providers such as Keycloak and PingFederate that sit in a private network. You put the public PEM file with your internal certificate authority (CA) certificate in Secrets Manager or S3 and reference it in the credential provider. AgentCore Identity then uses it, via VPC Lattice, to verify the IdP's certificate. The agent code does not change. This lets you connect agents to the authorization setup you already run.
AI-processed from AWS Machine Learning Blog; edited by Hamidun News
Many companies run their own identity provider (IdP), such as Keycloak or PingFederate, in a closed network, and an internal certificate authority (CA) issues its HTTPS certificate. Public clouds don't know that CA by default. While a company had only two or three agents, few people cared. Once agents start calling internal APIs, the question "how does an agent get a token from our IdP" jumps to the top of the list. AWS has now closed that gap in Amazon Bedrock AgentCore Identity: the service supports private CAs.
How it works
Imagine an agent on AgentCore Runtime that needs access to an internal wiki protected by Keycloak. Keycloak sits in your VPC behind an internal Application Load Balancer, and the load balancer carries a certificate from AWS Private CA. The agent asks AgentCore Identity for a token, and AgentCore Identity contacts the IdP through Amazon VPC Lattice. There it checks the load balancer's certificate against your CA and retrieves the token over OAuth 2.0.
The CA certificate itself is a public file in PEM format with no private key. You store it in AWS Secrets Manager or Amazon S3 and reference it in the credential provider settings (the certificateConfigurations field). The service uses it to verify the discovery, JWKS and token endpoints. Trust is granted to the CA, not to a specific server certificate, so you don't need to update the provider when that certificate is renewed. Agents using machine-to-machine, on-behalf-of and user-driven flows work without code changes.
In the AWS example, the IdP certificate is issued through ACM, with the hostname from the discovery document specified in the SAN. The CA certificate is then exported with the command aws acm-pca get-certificate-authority-certificate. Before uploading, you should check the file with openssl: the CA:TRUE flag, the validity period, and the chain up to the IdP (the expected result is Verify return code: 0). A new provider first gets the status CREATING and then READY. If you see CREATE_FAILED, the cause is in failureReason. A typical mistake is uploading a server certificate instead of the CA.
Limitations worth knowing up front
- Works only with private IdPs: a privateEndpoint is required, otherwise the request is rejected.
- The file must be no larger than 16 KB and contain only root or intermediate certificates that are still valid.
- Each provider takes one certificate source. To use several CAs, put them in a single PEM file.
- The secret and the provider must be in the same Region, and the secret must also be in the same account. An S3 object can live in a different account if bucketOwnerAccountId is specified.
- The feature depends on VPC Lattice and is available only in Regions where AgentCore Identity supports private IdPs.
- Certificate revocation lists (CRL) and OCSP are not checked. If a server certificate's key leaks, trust persists until the certificate expires or until you remove the CA from the file.
Rotation and protection
The service reads the certificate only when the provider is created or updated. If you change the file in storage, call UpdateOauth2CredentialProvider, and make sure to pass certificateConfigurations, otherwise the provider will stop trusting your CA. For a smooth CA changeover, AWS recommends putting both the old and the new CA in one PEM file and updating the provider. Then reissue the IdP certificate from the new CA, keep only the new CA in the file, and update the provider again.
You should monitor the CA's expiry date. AgentCore publishes the EarliestCertificateDaysToExpiry metric to CloudWatch with the dimensions ProviderName, ProviderArn and TokenVault. When you create the alarm, specify all three. Once the CA expires, token requests stop working.
What needs protecting is not the secrecy of the certificate but the integrity of the storage. If an attacker replaces the file or adds a rogue CA, they can impersonate your IdP at the next update. So grant write permissions (s3:PutObject, secretsmanager:PutSecretValue) only to the IdP team, and let the roles that create and update providers read the file. The article includes example bucket and secret resource policies that explicitly deny writes to everyone except the IdP administrator role.
What to do
If your agents talk to an internal IdP, this option spares you from exposing the provider to the internet and from workarounds that disable TLS verification. Set up VPC Lattice in advance, restrict write access to the storage that holds the CA, and create an alarm on the expiry date.
- Nov 19, 2026Nvidia posts record $115.8 billion revenue, yet trades cheaper than at any point since 2012
- Nov 19, 2026AWS: A Chain of 10 Agents at 95% Reliability Each Succeeds Only 59.9% of the Time
- Nov 19, 2026AWS outlines 3 ways an AI agent can sign in to Snowflake: as an individual user or through a shared account
- Nov 19, 2026Stretto Replaces a Web Form With a Voice Agent: Cost per Voice Minute Drops 95%
Key Questions Answered
How it works?
Imagine an agent on AgentCore Runtime that needs access to an internal wiki protected by Keycloak. Keycloak sits in your VPC behind an internal Application Load Balancer, and the load balancer carries a certificate from AWS Private CA. The agent asks AgentCore Identity for a token, and AgentCore Identity contacts the IdP through Amazon VPC Lattice. There it checks the load balancer's certificate against your CA and retrieves the token over OAuth 2.0.
What are the key details on Limitations worth knowing up front?
Works only with private IdPs: a privateEndpoint is required, otherwise the request is rejected. The file must be no larger than 16 KB and contain only root or intermediate certificates that are still valid. Each provider takes one certificate source. To use several CAs, put them in a single PEM file. The secret and the provider must be in the same Region, and the secret must also be in the same account. An S3 object can live in a different account if bucketOwnerAccountId is specified.
What are the key details on Rotation and protection?
The service reads the certificate only when the provider is created or updated. If you change the file in storage, call UpdateOauth2CredentialProvider, and make sure to pass certificateConfigurations, otherwise the provider will stop trusting your CA. For a smooth CA changeover, AWS recommends putting both the old and the new CA in one PEM file and updating the provider. Then reissue the IdP certificate from the new CA, keep only the new CA in the file, and update the provider again.
Ship AI Faster with Founders, Engineers & Weekly Architecture Reviews
Inside Vibe Club (hamidun.com/club) — weekly live masterminds with Zhemal Khamidun, Tech Radar, full LMS access, and 370+ production Claude Code skills.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.