Keycloak
Connect Keycloak to Safeguard: what it provides, how to set it up, and the frameworks it provides evidence for.
Connect Keycloak to collect identity & sso evidence automatically.
| Category | Identity & SSO |
| Connect with | API token |
| What a connection produces | Automated evidence collection |
Connect with an API token
-
In Keycloak:
- In the Keycloak Admin Console, select the realm Safeguard should read and click Clients.
- Click Create client, enter a Client ID (for example safeguard-reader), and click Next.
- Turn Client authentication On, check Service accounts roles, and click Save.
- Open the client's Credentials tab and copy the Client Secret.
- On the client, select the Service account roles tab and click Assign role.
- Choose Filter by clients, select the realm-management view roles (view-users, view-realm, and other view-* roles you want collected), and confirm the assignment.
Where to find the other values:
- Keycloak base URL: The address of your Keycloak server: the part of the Admin Console URL before /admin/ (for example http://localhost:8080 when the Admin Console is at http://localhost:8080/admin/).
- Realm: The name of the realm Safeguard should read; click Current realm in the Admin Console to see the realms you can manage.
- Service account client ID: The Client ID you entered when creating the client (also listed under Clients).
The client secret stays viewable on the Credentials tab. The optional admin bearer token is a short-lived alternative that stops collection when it expires; prefer the service-account client.
Source: keycloak.org, checked 2026-10-07.
-
On Compliance › Connectors, open Keycloak, click Connect, choose API token and fill in:
Field What to enter Keycloak base URL Required. Include the context path if you have one, e.g. https://idp.example.com/idp Realm Required. Service account client ID Optional. A confidential client with Service Accounts enabled and the realm-management view roles. Client secret Optional. Stored encrypted and never shown again. Admin bearer token (optional) Alternative to a service account. Expires quickly, so collection stops when it does. Stored encrypted and never shown again. -
Click Connect with token.
Frameworks
Safeguard's automated tests read Keycloak and map to the controls below. When a test passes, the result is evidence toward each control it maps to, in every framework listed. It is evidence toward a control, not proof that the control is met on its own.
| Framework | Evidence | Controls | Tests |
|---|---|---|---|
| SOC2 | Automated tests | CC6.1, CC6.2, CC6.3, CC7.2 | 7 |
| ISO/IEC 27001 | Automated tests | A.5.16, A.5.17, A.5.18, A.6.5, A.8.2, A.8.5, A.8.15 | 7 |
| HIPAA Security Rule | Automated tests | 164.308(a)(3), 164.308(a)(4), 164.308(a)(5), 164.312(a)(1), 164.312(b), 164.312(d) | 7 |
| PCI DSS | Automated tests | 7.2.2, 7.2.4, 8.2.5, 8.2.8, 8.3.4, 8.3.6, 8.4.2, 10.5.1 | 7 |
| NIST CSF 2.0 | Automated tests | PR.AA-01, PR.AA-03, PR.AA-05, PR.PS-04 | 7 |
These tests are switched on per workspace by the Safeguard team.
Related
- Identity & SSO connectors
- Compliance connectors: how connecting works, card statuses and multiple accounts
- Connector setup reference: every connector in one table
- Frameworks and connectors: how connectors provide evidence for frameworks