
The Difference Between Infrastructure Ownership and Operational Control
Explore the difference between infrastructure ownership and operational control and how to choose the right cloud management model.
Read field noteField notes / Latest
Engineering notes from operating open infrastructure: the failures, design decisions, and upstream work that make open infrastructure better.
Browse all field notes
Explore the difference between infrastructure ownership and operational control and how to choose the right cloud management model.
Read field note
Learn how to build a private enterprise RAG assistant with permission-aware retrieval, secure inference, citations, monitoring, and safe updates.
Read field note
LLM GPU requirements for a clinical model: fine-tuning is the small line, serving the large one, and when owning GPUs beats renting under health data rules.
Read field noteKeystone federation with Keycloak: why Horizon logins fail, why users see no projects, why group changes arrive late, and which fix creates new risk.
An engineer leaves a team, IT removes her from the team's Keycloak group, and she can still open the team's OpenStack project a month later. In a cloud running Keystone federation, where Keystone, OpenStack's identity service, trusts Keycloak to sign people in and turns Keycloak groups into OpenStack access, that outcome can trace back either to another group that also holds the project or to a role someone gave her directly in Keystone. The direct grant may have been made to close a ticket on her first day, when she signed in and saw an empty project list. Keycloak can't remove a grant it never knew about, so her access stopped following the directory the moment the ticket closed.
Direct grants like that one are the expensive mistake in this setup, and they are made while fixing three cheaper problems: logins that fail, users who sign in and see no projects, and group changes that take minutes to reach OpenStack. Each of the three has a correct fix, and none of those fixes involves giving a person a role.

Keystone records every role assignment against either a user or a group, on a project, a domain or the whole system, and its role assignment list shows which. In a federated cloud where access is meant to come from Keycloak groups, any assignment held by an individual federated user is a candidate for review. Some will be deliberate. The rest deserve a question to whoever made them, because each one is a grant that a change to Keycloak groups will never remove.
Moving those grants onto the right Keycloak group, then deleting the direct assignment, puts the person's access back under the directory's control. It also gives the next access review one fewer exception to explain. Repeating the check after each round of onboarding catches new grants while the tickets behind them are still easy to trace.
The failed login is the first of the three problems, and it can come from Keystone and Keycloak disagreeing about each other's addresses. Keystone returns a signed-in user only to dashboard addresses on its trusted list, and each entry must match Horizon's address exactly, trailing slash included. Move Horizon, OpenStack's web dashboard, to a new hostname without adding it to that list, and every single sign-on attempt through the new address ends in a 401 error while Keycloak and every account involved are working.
Keystone also identifies the Keycloak instance that signed each person in, by an address built from Keycloak's public URL, and it accepts only the addresses registered on its identity provider record. Moving Keycloak to a new URL changes that address, and a login that presents the new address to Keystone stops with a "not authorized" error for as long as the record lists only the old one. Both failures are fixed in configuration on one side, so Horizon's address and Keycloak's address belong on the same change checklist.
With our Keycloak driver for Keystone, one more 401 is expected behavior. A script that sends a username and password straight to Keystone is refused, because the driver accepts only federated logins and refuses password checks. Command-line users sign in through Keycloak or use an application credential.
The second problem is where the direct grant in the opening started, because it reaches the platform team as a blocked person. A user who sees Horizon's "You are not authorized for any projects or domains" message has been vouched for by Keycloak but could not get a project or domain token from Keystone. OpenStack grants a project only through a role held by the user or by one of their groups.
Our driver reads groups straight from Keycloak and shows each one in Keystone under the Keycloak group's own ID. Two ways for a group to end up without a role are easy to miss. Someone created a Keycloak group for a new team and never gave it a role in OpenStack, or someone deleted a group and recreated it under the same name. Keycloak gives a recreated group a new ID, so the role in Keystone still points at the old group, while a renamed group keeps its ID and its access. In both cases the fix is a role assignment for the group, which covers everyone in the group.
The third problem involves no mistake at all. Keystone keeps each user's list of projects in a cache, and once a shared cache such as memcached is set up, each entry lives for 600 seconds by default. Keystone clears that cache when someone grants or removes a role inside Keystone. A change of group membership happens in Keycloak, so Keystone keeps serving its previous answer until the entry expires.
A September 2024 Keystone bug report measured the effect in both directions: a user added to a group waited about ten minutes for the group's projects, and a user removed from a group kept them for up to ten minutes. The services behind OpenStack can add to the second figure, because they cache tokens they have already validated for 300 seconds by default. A token issued before a removal can keep working at a service for a few minutes after Keystone stops accepting it.
Atmosphere doesn't remove this delay. It runs Keystone with a memcached cache and leaves the 600-second default in place, so Keystone caches project lists built from Keycloak's groups the same way it does in any other deployment. The length of the window is a setting, and the right value depends on how your organization handles access.
A team that reviews access daily can keep the default and absorb the occasional "I was added and still can't see the project" ticket. A team that needs changes to land faster can shorten the role cache, which holds this list, without touching the rest of Keystone's caching:
[role]
cache_time = 120At 120 seconds, Keystone can rebuild an active user's project list five times in the span the default allows once, and each rebuild can query Keystone's database and, with our driver, Keycloak. Keystone's own source notes that listing role assignments without the cache is slow on large data sets, so a shorter window costs load, and Keycloak's request rate needs watching for the first week after the change. Setting [role] caching to false stops Keystone caching these results, so each project list is rebuilt whenever it is requested. We would reserve that for a small cloud with light sign-in traffic, and even there the token caches can keep an issued token working for a while after a removal.
A test user in Keycloak with no other permissions checks the login path and project visibility without touching anyone's real access. Put it in a baseline group that holds a role on a scratch project, so the account keeps a project role after the removal, and in the group under test. A sign-in through Horizon checks the login path, and the project list should show the scratch project, the tested group's projects and nothing else. Removing the test user from the tested group, then signing out and back in every few minutes until those projects disappear, gives you the real delay in your own cloud.
When that delay matches your cache setting, the cache is the likely explanation. When it runs well past the setting, find the cause before anyone widens a role, since a broader grant would hide it.
Teams can build this integration from upstream Keystone, Apache's OpenID Connect module and mapping rules they write. In that design the mapping rules decide group membership at login, and the membership lasts for the life of the user's token, an hour by default, a longer window than the project cache. It works, and it leaves the team owning the rules, the cache settings and the testing of both through every upgrade. A small cloud with one administrator and a handful of users may not need federation at all, and Keystone's own accounts or an LDAP directory avoid the login failures described here.
Atmosphere, the OpenStack distribution we build in the open, registers a separate Keycloak identity provider for each Keystone domain it federates, and sets that domain to read users and groups live from Keycloak through keystone-keycloak-backend, our open source driver. Keystone then uses Keycloak's own groups, IDs included, with no separate copy to fall out of step, so its caches can delay membership changes, and a recreated group doesn't inherit the old group's access. Our Hosted and On-Premise editions run this chain and let external identity providers federate over SAML or OpenID Connect, and both repositories are public, so your team can read the Keystone, Keycloak and driver settings before relying on them. If the delay your test user measures matches none of the settings above, send us the timings and your cache settings.
Choose from Atmosphere Cloud, Hosted, or On-Premise.
Simplify your cloud operations with our intuitive dashboard.
Run it yourself, tap our expert support, or opt for full remote operations.
Leverage Terraform, Ansible or APIs directly powered by OpenStack & Kubernetes