OpenStack Keystone SAML OIDC Federation Guide
Learn how to integrate SAML and OIDC federation with Keystone, test configuration steps, and address production considerations for multi‑tenant OpenStack deployments.
24 Feb 2026, 06:32 UTC

The Problem: Managing Authentication Across Multiple Identity Providers
If you're running OpenStack across multiple departments, regions, or customer bases, you've likely faced the challenge of managing separate user databases for each environment. Traditional Keystone setups require either duplicating users across domains or maintaining complex LDAP synchronization. The real solution lies in federated authentication—specifically using SAML or OIDC protocols to delegate identity management to external providers.
Thesis: Federation Works Best When You Have Clear Boundaries
Keystone's federation capabilities shine when you need to integrate with existing identity infrastructure (like Active Directory, Google Workspace, or university IdPs) without maintaining local user records. The key is understanding that federation handles authentication, while Keystone manages authorization through attribute mapping rules.
How Keystone Processes Federated Tokens
When a user authenticates through an external IdP, Keystone receives assertions containing attributes like email, groups, or department. The mapping configuration then translates these into local constructs: projects, roles, and domains. This happens at token issuance time, meaning your federation setup directly impacts what API actions users can perform.
For SAML, Keystone validates assertions via XML signature verification. For OIDC, it uses standard JWT validation against the provider's JWKS endpoint. Both approaches require HTTPS endpoints with valid certificates—man‑in‑the‑middle attacks are a real concern in cloud environments.
Worked Example: Configuring SAML Federation with Apache mod_auth_mellon
Here's a practical configuration snippet for integrating Keycloak as an IdP:
# /etc/keystone/federation_mapping_saml.json
{
"local": [
{
"user": {
"name": "{0}",
"domain": {
"id": "default"
},
"roles": [
{
"name": "_member_",
"roles": ["role"]
}
]
}
}
],
"remote": [
{
"type": "email"
}
]
}
To test this configuration, you'd run:
openstack federation auth-by saml --identity-provider keycloak --sp-name openstack
Trade-offs and Limitations
Federation introduces several considerations you can't ignore. First, domain isolation doesn't prevent cross-project data leakage if applications bypass API-level access controls. Second, LDAP connection pooling must be carefully tuned—production workloads often require adjusting pool_max_retries and pool_retry_delay settings to avoid authentication timeouts during peak usage.
Token validation can enforce scope restrictions by comparing requested vs issued token attributes, but this adds latency to every API call. For high‑throughput environments, consider caching validated tokens with appropriate TTLs matching your session requirements.
Actionable Next Steps
Start by testing with devstack using ENABLE_SSO=true to validate your federation metadata exchange. Then configure Apache mod_auth_mellon with a test IdP and verify SAML assertion processing in keystone logs. Finally, use openstack token issue --domain-id to test domain‑scoped token generation before rolling out to production workloads.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.