Safeguard Docs
Compliance ConnectorsSetup by categoryIdentity & SSO

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.

CategoryIdentity & SSO
Connect withAPI token
What a connection producesAutomated evidence collection

Connect with an API token

  1. In Keycloak:

    1. In the Keycloak Admin Console, select the realm Safeguard should read and click Clients.
    2. Click Create client, enter a Client ID (for example safeguard-reader), and click Next.
    3. Turn Client authentication On, check Service accounts roles, and click Save.
    4. Open the client's Credentials tab and copy the Client Secret.
    5. On the client, select the Service account roles tab and click Assign role.
    6. 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.

  2. On Compliance › Connectors, open Keycloak, click Connect, choose API token and fill in:

    FieldWhat to enter
    Keycloak base URLRequired. Include the context path if you have one, e.g. https://idp.example.com/idp
    RealmRequired.
    Service account client IDOptional. A confidential client with Service Accounts enabled and the realm-management view roles.
    Client secretOptional. 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.
  3. 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.

FrameworkEvidenceControlsTests
SOC2Automated testsCC6.1, CC6.2, CC6.3, CC7.27
ISO/IEC 27001Automated testsA.5.16, A.5.17, A.5.18, A.6.5, A.8.2, A.8.5, A.8.157
HIPAA Security RuleAutomated tests164.308(a)(3), 164.308(a)(4), 164.308(a)(5), 164.312(a)(1), 164.312(b), 164.312(d)7
PCI DSSAutomated tests7.2.2, 7.2.4, 8.2.5, 8.2.8, 8.3.4, 8.3.6, 8.4.2, 10.5.17
NIST CSF 2.0Automated testsPR.AA-01, PR.AA-03, PR.AA-05, PR.PS-047

These tests are switched on per workspace by the Safeguard team.

On this page