Skip to content
covey

For a few months an organisation has signed its people in to its AI agents through Keycloak, realm acme, and single sign-on is required for the domain example.org. Now the sign-in is moving to a new realm, say belegschaft, or the organisation wants passwords back for a while. Before anyone clicks "Remove", three questions come up: how j.berg@example.org signs in afterwards, what happens to the claimed domain, and whether a later setup starts from zero.

In covey the source answers this fairly precisely, because the configuration, the domains and the bindings sit in three separate tables. The button removes only the first of them.

Remove deletes the configuration, and the requirement goes with it

The "Remove" button sits under Organization → Settings → Sign-in, next to "Change", and only the org admin may press it. Unlike "Require", it asks for no confirmation first, so one click deletes the configuration at once. What goes is a single row: issuer URL, client ID, the sealed client secret, the role for new people and the "required" switch. The comment above the function says it in as many words: "required" goes with the row.

The sign-in page asks, for every address typed into it, whether the domain belongs to an organisation with single sign-on configured. Without the row it finds no route to a provider for example.org, and the page treats the address like any other. The check that refused password sign-in, reset and change for those addresses is gone as well.

A deleted password has to be set anew

When the requirement was switched on, covey replaced the password hashes of the example.org accounts with the value !sso. No password ever verifies against that value, and removing the configuration leaves the accounts as they are. The source states that turning the requirement off later gives nobody their old password back, and removal works the same way.

Each affected person therefore needs a new password. One route is the reset mail, which needs an installation that can send mail. Without mail, covey answers that the installation cannot send mail and that an administrator has to set a new password. Open sessions carry on, since removal deletes only the configuration row.

The installation's system admins were exempt all along. They kept their password and sign in as before.

Domains and bindings stay where they are

The claimed domain lives in its own table, tied to the organisation and not to the configuration. After removal example.org is still verified and still belongs to this organisation, although on its own it routes nobody to a provider. If another organisation on the same installation tries to claim it, covey refuses with "this domain is claimed by another organisation". Releasing it takes the separate "Remove" button in the list of e-mail domains.

The bindings made at each first sign-in stay too. covey ties an account to the pair of issuer and subject, the person's identifier at the provider. Set the configuration up again with the same issuer URL, and the next sign-in of j.berg@example.org finds the old binding and lands in the same account.

When the provider changes, Change keeps the requirement and Remove drops it

Moving to the realm belegschaft changes the issuer URL. The stored bindings then no longer match. At the next sign-in covey looks the person up by address instead, binds the existing example.org account to the new identifier and leaves the old row in place. That holds for both routes, "Change" as well as removing and setting up again.

The difference is the requirement. "Change" overwrites issuer, client ID, secret and role but leaves "required" as it was, so no account in example.org gets a password in between. A configuration set up from scratch starts without the requirement. It can be switched on again only once the acting account has signed in through the new issuer, because covey checks the binding against exactly that issuer.

The cost of "Change" is that everyone depends on the new realm from the first minute. If it does not work, the people of example.org stay outside until the values are right. Remove opens the password route instead, but on that route every rewritten account first needs a new password. In both cases the installation's system admins keep their password, so the installation itself stays reachable.

Back to all posts