Tool reference

Keycloak

The identity provider — single sign-on, MFA and directory federation.

Open source Source github.com/keycloak/keycloak Licence Apache-2.0 Running here quay.io/keycloak/keycloak 26.7.1

What it does here

Keycloak is the identity provider. It authenticates people, enforces MFA, and issues the OIDC tokens the Golonex Portal trusts. It does not own identities — it federates them from the directory, so the accounts midPoint provisions are exactly the accounts that can sign in.

How it is deployed

Container keycloak with a PostgreSQL database, started in production mode behind Caddy (KC_PROXY_HEADERS=xforwarded, KC_HOSTNAME=https://keycloak.iamlab.genbay.co). Realm, federation and client were created with kcadm.sh — see Installation §4.3.

Settings in the web console

Sign in at keycloak.iamlab.genbay.co/admin/ as admin. You land in the master realm — use the realm selector at the top of the left menu to switch to golonex, which is where everything below lives.

Realm settings

What is configured for the golonex realm:

SettingValue hereWhy
Display nameGolonexwhat users see on the login page
Require SSLexternalHTTPS enforced for outside requests
User registrationoffidentities come from HR, never self-service
Brute force detectiononlocks an account after repeated failures
User + admin eventsonthe audit trail the SIEM consumes

Events are worth a visit in their own right: Realm settings › Sessions / Security defenses hold the lockout policy, and the recorded events appear under Realm settings › Events.

User federation › golonex-ldap

The most important screen in Keycloak for this lab. It defines how Keycloak reads the directory:

FieldValue hereWhat it means
Connection URLldap://openldap:389the directory, on the internal network
Bind DNcn=readonly,dc=golonex,dc=locala read-only account — Keycloak never writes
Users DNou=people,dc=golonex,dc=localwhere to look for accounts
Username LDAP attributeuidwhat becomes the Keycloak username
Edit modeREAD_ONLYgovernance belongs to midPoint, not here
Custom user LDAP filter(!(employeeType=disabled))disabled accounts disappear — this is what makes off-boarding instant
Periodic full syncevery 300 skeeps the imported copy fresh

Scroll to Mappers on the same provider to see how directory attributes become token claims — first name, title, employeeNumber, and the group mapper that turns ou=groups membership into the groups claim.

The exam point: that one filter line is the whole leaver story. Disable in IGA → the attribute changes in the directory → Keycloak stops seeing the user → every application that trusts Keycloak refuses them.

Clients › golonex-portal

The Portal is registered here as a confidential OIDC client. Look at:

  • Valid redirect URIshttps://app.iamlab.genbay.co/*. Keycloak will only return a token to an address on this list; that is what stops a look-alike site from harvesting logins.
  • Web origins — the browser origins allowed to call it.
  • Credentials tab — the client secret the Portal uses to prove it is really the Portal.
  • Client scopes › dedicated › Mappers — the groups mapper that puts entitlements in the token OPA later reads.

Users, Groups and Sessions

Users shows the federated workforce (they appear after a sync, or on first login). Open one and its Groups tab reflects directory membership — read-only, because midPoint owns it.

Sessions lets you see and revoke live logins — the blunt instrument when you need someone out now, before the next governance cycle.

Try this

  • Sign into the Portal as erin.evans, then find that exact login under Realm settings › Events.
  • After off-boarding Alice, search for her in Users — she is gone, because of the federation filter. That absence is what the SIEM alert keys on.