Keycloak for SOC 2 logical access controls

Keycloak can produce much of the logical access configuration and records behind SOC 2 CC6.2, CC6.3 and CC6.6. It does not make you compliant, and the access review, joiner and leaver process and policies remain yours to operate and prove.

On this page

How Keycloak supports SOC 2 logical access controls

A SOC 2 examination is coming, and logical access is one of the areas where auditors most often ask for proof. Keycloak can help you evidence four CC6 criteria from the AICPA's 2017 Trust Services Criteria, in the version with revised points of focus published in 2022: CC6.1 at the architecture level, CC6.2 for registering and removing users, CC6.3 for role-based access and least privilege, and CC6.6 for stronger authentication on access from outside the system boundary. Keycloak does not write your access policy, run your joiner and leaver process, or produce the evidence that a control operated over time. Those remain your responsibilities, and the auditor, not DeployOpen, forms the opinion on whether the controls meet the criteria.

The security common criteria, CC1 to CC9, apply to every SOC 2, so CC6 will be in scope regardless of the other categories you select. Points of focus are characteristics that help you design and evaluate controls, not separate requirements, so you do not need to address each one. Decide which Keycloak records will serve as evidence before the examination period starts: realm and client configuration exports, the user and group lists showing who was registered and when, the role mappings used for each application, and the admin and login events kept by the server. Confirm with your auditor which of these they will sample and over what period, since a Type 2 report tests operating effectiveness over time.

Keycloak does not decide what a role means for your business. Map each application's roles to job functions and approval owners before you build them in the realm, and confirm that your registration and removal steps, such as disabling accounts when access ends, are written down and tied to a ticket or HR event. Where a protected application is reached from outside your network, the CC6.6 evidence will likely include MFA enforcement for those clients and the boundary controls in front of Keycloak. Confirm these choices against the current AICPA Trust Services Criteria and your auditor's requirements before you treat any configuration as sufficient.

Mapping CC6.1, CC6.2, CC6.3 and CC6.6 to Keycloak configuration

This table pairs each SOC 2 logical access criterion in scope with the Keycloak capability that supports it and the configuration an assessor will ask to see. Read each row as a control design question: what the criterion asks, what Keycloak can enforce, and what still needs a documented process outside Keycloak. The main takeaway is that Keycloak produces strong technical evidence for CC6.1, CC6.3 and CC6.6, while CC6.2 depends on an authorization workflow your organization designs and records.

CriterionKeycloak capabilityConfiguration to set and evidence to keep
CC6.1: Logical access security software, infrastructure and architectureKeycloak as the central identity provider, with TLS and a reverse proxy in front of itEnforce TLS on all communication, place a reverse proxy with path restrictions in front of the server, and keep the architecture diagram, hostnames and certificate records current
CC6.2: Register and authorize users before credentials are issued, and remove them when access endsUser management and admin console for account creation and disabling. Keycloak does not enforce pre-issuance approval; you must build that workflow with an approval step outside or around itDefine a request and approval process before creating accounts, restrict who holds user-admin rights, disable or delete accounts on leaver events, and retain admin event logs as proof of each change
CC6.3: Grant, change and remove access by role, with least privilege and segregation of dutiesRealms, realm roles, client roles, groups and group-to-role mappingAssign access through groups and client roles rather than direct user grants, separate administrative roles from application roles, and export role and group membership for periodic access reviews
CC6.6: Protect against threats from outside the system boundaryOTP policies, WebAuthn and passkeys, recovery codes, and metrics exposed on the management interfaceRequire a second factor for external access, prefer WebAuthn or passkeys for privileged users, set recovery code handling, expose the admin console and Administration REST API on a separate hostname from public frontend URLs, and enable metrics with --metrics-enabled=true to monitor login activity

Which Keycloak records auditors sample for CC6

Auditors testing CC6.2, CC6.3 and CC6.6 ask for the same few things: who was granted access, who holds which roles, how privileged actions and sign-ins are recorded, and how the configuration that enforces those rules is controlled. The cards below cover the Keycloak records that answer those questions and how to keep each one available for the audit period.

User creation and disable events

Keep a record of each account created, changed or disabled, linked to the approved request that authorized it. Keycloak's admin events can capture these changes, but the approval reference usually lives in your ticketing system, so the ticket ID should be recorded in the change or in a field agreed with your team. Export the events on a fixed schedule and check that every joiner and leaver sample traces to an approval. Confirm with your own team how long these exports must be kept, since retention periods must come from your own policy.

Keycloak docs

Role and group membership exports

Periodic access reviews need a point-in-time list of who holds which realm roles, client roles and groups. Run a scripted export through the Admin REST API or the admin console and save the output with a date stamp. Compare each export with the previous one so that added or removed memberships stand out for the reviewer. Store the files outside the Keycloak server so a compromised or rebuilt instance cannot alter the history auditors will sample.

Admin and login event logs

Admin events record configuration and user changes made through the console or API, and login events record authentication outcomes, including failures. Enable both in the realm event settings and confirm which event types your version stores. Forward logs to a central log platform on a regular schedule, because local event tables are not a durable archive. Test one sample sign-in and one admin change end to end so you know the record exists before the audit period starts.

Server admin guide

MFA enrollment and policy settings

CC6.6 testing looks for evidence that additional authentication is required for access from outside the system boundary. Export the realm's authentication flows, required actions and OTP or WebAuthn policy as configuration, and keep the export with the date it was taken. Pair it with a periodic report of which users have enrolled a second factor, so the policy and its real coverage can both be shown. Ask your auditor which population they expect you to report on before you define the export.

Realm and client configuration as code

Version-controlled realm and client definitions show what the access rules were at a given time and who approved each change. Export the realm representation, store it in a Git repository, and require a reviewed merge request for every change, linked to a change ticket. Treat the repository as the source of truth so that a manual console edit appears as drift on the next export. Confirm how your deployment tooling applies these files, because secrets must be kept out of the repository.

Metrics retention for monitoring

Monitoring evidence shows that the identity service was observed and that failures reached someone. Enable Keycloak's metrics endpoint on the management interface and scrape it into your monitoring platform, then record alert rules and the people who receive them. Keep dashboards and alert history for the period your own policy sets, and document which metrics you use to detect unusual sign-in or admin activity. The metrics are supporting evidence; they do not replace the event logs that record individual actions.

Metrics guide

Running joiner, mover and leaver evidence from Keycloak

CC6.2 asks you to show that every new user was authorized before credentials were issued, and that credentials were removed once access stopped being authorized. CC6.3 asks you to show that access was granted, changed and removed based on roles and responsibilities, and that access roles were reviewed. A Type 2 report tests whether these cycles operated over the examination period, so the auditor will sample individual joiners, movers and leavers and ask for the trail behind each one. Plan for that sampling from the start: each cycle should leave a request, an approval, a Keycloak change and a closing record that can be pulled for any sampled person. The auditor typically selects from the population of changes in the period, so a process that works only for a few showcase cases will not hold up.

Keycloak does not decide who is authorized. It records what happens after someone with authority has decided. Your HR system or ticketing tool must hold the approval, and the join, move or leave event must carry a stable identifier that matches the Keycloak user, for example the user's id or a unique username that your provisioning process writes consistently. Agree on that key before go-live, because a mismatch between an HR employee number and a Keycloak username is one of the most common reasons a sampled leaver cannot be traced. Confirm with your own identity team how accounts are created (manually in the admin console, through the Administration REST API or through an automation tool) and which system is the source of truth for each attribute.

For each cycle, the sequence is: an authorized request is approved and linked to a Keycloak user; the account is created with group or role membership that matches the request; a periodic review compares actual memberships in Keycloak against the approved baseline and records any correction; and on departure, the account is disabled and sessions are ended, with credentials and group memberships removed on a defined schedule. Keep the admin event and login event logs as your primary system evidence, and confirm with your team how long they are retained and whether they are exported to your log platform, since the auditor will ask for them across the whole period.

What Keycloak does not cover for SOC 2

Keycloak can enforce and record many logical access settings, but several CC6 expectations are met by processes, other systems and documents that sit around it. Each card below needs an owner, a written procedure and evidence that lives outside the identity provider.

Access request and approval policy

Keycloak can create a user or add a role, but it does not decide who should receive that access. CC6.2 expects the organization to register and authorize new users before credentials are issued, so the approval step must be written down with named approvers for each application and privilege level. Check that every grant in Keycloak traces back to an approved request, whether that request lives in a ticketing system or an identity governance tool.

Keycloak docs

Periodic access review sign-off

Keycloak can export role and group membership, but it cannot tell whether an application owner still needs each account. Someone accountable must review those lists on a set schedule, remove what is no longer appropriate and sign off. Under CC6.3, the review should cover roles, responsibilities and least privilege, and the signed record is what an auditor samples. Ask who owns each application, how often reviews occur and where the signed records are kept.

Offboarding triggered from HR

Keycloak disables or removes an account only when someone or something tells it to. If HR, the directory or the identity lifecycle tool does not notify the team, a departed employee keeps working credentials, and CC6.2 expects credentials to be removed once access is no longer authorized. Build or confirm a joiner and leaver workflow that links the HR record to Keycloak changes, and test it with a sample departure to produce evidence of timing.

Boundary and host network controls

CC6.6 covers protection against threats from outside the system boundary, and that protection sits largely in the network and host layers. Keycloak's production guidance expects TLS everywhere, a reverse proxy with path restrictions and separate hostnames for the admin console. Firewall rules, load balancer settings, host patching, and restricted administrative network paths belong to your infrastructure team and must be documented and reviewed.

Production guide

Endpoint and device requirements

Keycloak can require a second factor, but it cannot confirm that the laptop or phone used for sign-in is managed, patched or free of malware. For access from outside the boundary, CC6.6 points to additional protections, so device posture, disk encryption and browser policy need a separate control, often through a device management or zero trust product. Decide which applications require managed devices and record how that is enforced.

Written policies and system description

The 2018 description criteria require management to prepare a description of the system, and the examination depends on policies that explain how access is granted, reviewed and removed. Keycloak configuration cannot substitute for these documents, and they must match what the system actually does. Prepare the access policy, the system description and the responsibility matrix before the examination window, and confirm the scope and exact wording with your SOC 2 auditor.

Configuration sequence for SOC 2 access evidence

This sequence turns a Keycloak installation into a set of controls and records that map to CC6.1, CC6.2, CC6.3 and CC6.6, so the evidence an auditor samples exists before the observation period starts. Each step ends with an artifact you can show.

  1. Deploy Keycloak on TLS with separated admin hostnames

    Deploy Keycloak with TLS on all communication and a reverse proxy that restricts paths. Serve the admin console and Administration REST API on a different hostname or context path from public frontend URLs, so administrative access sits behind its own boundary. Choose the database from the supported list (MariaDB, Microsoft SQL Server, MySQL, Oracle Database, PostgreSQL 14 to 18, EnterpriseDB Advanced, Amazon Aurora PostgreSQL or Azure SQL) and confirm the high availability design uses a synchronously replicated database. The development file database is not an option for production. Done means a network scan and browser test show the admin paths are unreachable from public frontends, and the architecture diagram names the boundary for CC6.6.

  2. Define realms, groups and client roles for least privilege

    Model access as realms, clients, client roles and groups that match the duties in your system description. Keep administrative roles separate from application roles, and keep the admin realm for platform staff only. Assign roles to groups rather than individual users, and record which roles grant access to which protected applications. Confirm that no role carries broader rights than the job needs and that conflicting duties, such as creating and approving accounts, sit with different people. Done means you can export a role-to-duty matrix that a reviewer can check against CC6.3 segregation of duties.

  3. Set the user registration and approval procedure

    Write the procedure that controls how users are registered, approved and given credentials. Decide which accounts are created by an administrator from an approved request, which are created through self-registration or identity brokering, and who approves each path. Disable self-registration on realms that do not need it, and configure required actions so new users set their own credentials at first sign-in. Done means a documented request-to-account workflow exists, a sample of accounts can be traced to an approval, and the registration settings are captured for CC6.2.

  4. Enforce MFA or passkeys for remote and privileged access

    Configure authentication flows so access from outside the system boundary and all administrative access require a second factor or a passkey. Use the OTP policies, W3C WebAuthn and passkey options documented in the server administration guide, with recovery codes handled under the same procedure as other credentials. Apply the stronger flow to the clients and groups that need it, and test a remote sign-in and an admin sign-in from an unmanaged network. Done means test results show the second factor is required, and the flow configuration is saved as evidence for CC6.6.

  5. Enable event logging and metrics

    Turn on login and admin event recording so every credential issue, role change and failed sign-in leaves a record. Confirm that login failures are persisted to the database, since the 26.8 upgrade notes make this the default, and decide where events are exported for retention. Enable Prometheus-format metrics with --metrics-enabled=true on the management interface and restrict who can scrape them. Done means a test account creation, role grant and failed login each appear in the event store and the log destination, and the retention setting is written down.

  6. Export realm configuration as code

    Export realm and client configuration to files under version control, and apply changes through a reviewed pull request rather than manual edits in the admin console. Store secrets outside the exported files. If you run the Keycloak Operator, use its custom resources for realms and clients and keep manual approval mode for operator updates. Done means the repository holds the current configuration, a change to a role or flow appears as a reviewed commit, and a periodic export can be compared with the live realm to detect drift.

  7. Schedule and record the first access review

    Run the first access review before the observation period starts. Export the users, groups, role mappings and sessions for each realm, have the owner of each application confirm who should have access, and remove accounts or roles that are no longer authorized. Record reviewer, date, population, exceptions and the removal tickets. Set the recurring review cadence in your control calendar. Done means a signed review package exists for the first cycle, and the cadence is recorded so the auditor can see the control operated consistently.

Questions buyers ask before hiring help for SOC 2 access controls

What drives the implementation effort for Keycloak access controls in a SOC 2 scope?

The main drivers are how many applications sit behind Keycloak, where user identities come from, and what evidence the auditor expects to see. Each application needs its own client registration, role mapping and login policy, so a dozen applications with different owners takes more design and testing than two. Federation sources matter as well. Connecting LDAP or Active Directory as user federation, or brokering to an upstream identity provider, adds attribute mapping, group-to-role rules and a clear answer to which system is the source of truth for joiners and leavers. Custom evidence exports add work because Keycloak's admin events and reports do not always match the format a control test asks for, so the export and its review procedure need to be designed and tested. Ask any partner to break the quote down by application count, federation sources and evidence outputs.

Does a correctly configured Keycloak pass a SOC 2 audit on its own?

No. A SOC 2 report examines the organization's system and its controls, and Keycloak is one component that produces evidence for criteria such as CC6.2 and CC6.3. A configuration can support registering and removing users, role-based access and stronger authentication for access from outside the system boundary, which relate to CC6.1, CC6.2, CC6.3 and CC6.6. The organization still needs written policies, assigned control owners, a documented access review cadence, ticketed approvals and records that the controls operated. Independent auditors perform the examination and issue the report. DeployOpen prepares the Keycloak configuration, controls and evidence for that examination but does not issue audit reports or attestations.

How does a Type 1 versus Type 2 report window change the work?

A Type 1 report describes the system and the suitability of control design as of a date, so the Keycloak work centers on design: realm structure, role model, authentication policy and the procedures that govern them. A Type 2 report adds an opinion on operating effectiveness over a period, so the controls must run consistently for the whole window and leave records each time. That means joiner and leaver tickets, periodic access reviews from role and group data and retained admin event logs throughout the period. Longer windows increase the volume of evidence to collect and the number of configuration changes to explain. The examination type and period are set with your auditor, so confirm them before scoping evidence collection.

What does the client need to provide for this work?

The work depends on decisions only the client can make. Expect to name owners for each control, including who approves access, who performs quarterly reviews and who owns the Keycloak administrator role. You will also need the access control policy and any authentication standard the organization already follows, plus read access to HR systems that signal joiners, movers and leavers, and to the ticketing tool used for access requests. Test accounts and a non-production Keycloak environment are needed to validate changes before they reach production. Agree on these inputs in writing at the start, because delays in owner decisions or HR feeds usually extend the schedule more than technical work does.

Can our own team implement Keycloak controls for SOC 2 without a partner?

Yes, if your team has the skills and capacity. The configuration itself is documented in the Keycloak server administration guide, and an engineer familiar with OpenID Connect and realm administration can build realms, clients and roles. The harder parts are usually outside the product: writing control descriptions that match what the system does, designing evidence that an auditor can sample, and running reviews on a schedule. Teams often find that the first audit cycle exposes gaps in documentation or in how admin access is governed. A partner is useful when the internal team lacks the time, has not run a SOC 2 examination before, or needs an independent review of the design before the auditor arrives.

Which parts of SOC 2 access control work recur after go-live?

Several parts recur, and they are usually the larger long-term cost. Periodic access reviews run every cycle, and joiner and leaver handling runs continuously. Keycloak itself also needs upgrades. The project ships four minor releases a year, and its upgrade notes can change behavior, so each upgrade needs regression testing of login flows, client mappings and evidence exports. The current release at the time of writing is 26.8.1, so check which version your environment runs before planning. Ongoing support, upgrades and continuous testing are available as retainers, and a retainer is often the right model when evidence must be reproduced every audit period. Ask for the recurring tasks, their frequency and who performs each one.

Will the Keycloak work change our SOC 2 scope or our exposure?

It can, because the identity provider becomes a security-critical system that sits inside the system boundary. Its database, admin console, Administration REST API and metrics endpoints must be protected, and the admin console should be on a separate hostname or context path from public frontend URLs. Keycloak is open source under the Apache 2.0 license, so the license does not limit use in a SOC 2 environment, but the hosting, patching and admin access are your responsibility. Confirm with your auditor how the identity provider is described in the system description, since that description is what the report evaluates.

What the SOC 2 auditor tests and how Keycloak data answers it

A Type 1 report tests whether the controls are suitably designed as of a single date, while a Type 2 report adds an opinion on whether they operated effectively over a period. For Keycloak, that difference determines what you preserve. A dated export of realm settings, password and MFA policies, and client configuration supports a Type 1 claim about design. Showing that those controls held across the observation window requires a stable configuration history plus dated exports taken throughout the period, such as role and group membership lists and admin event records. Keep configuration under change control so the auditor can tie each snapshot to an approved state. Confirm with your auditor which dates and sample periods they expect before you pick an export schedule.

SOC 2 is an assertion-based examination. Management makes written statements about the system and its controls, and the service auditor obtains representations from management covering those statements. Your Keycloak evidence has to match what management asserts, so the description of the identity system should be written from the same realm, role and admin settings the auditor will sample. Also note that a SOC 2 report is generally restricted in use, while a SOC 3 report is a general-use summary that can be freely distributed and carries less detail. Many organizations publish a SOC 3 for prospects and keep the SOC 2 for contracted customers. The AICPA Auditing Standards Board proposed revisions to its baseline attestation standards in February 2026, with an effective date for engagements beginning on or after June 15, 2029 if adopted. Ask your auditor how those proposals, if finalized, would affect your engagement timing and documentation.

How DeployOpen configures Keycloak for SOC 2 evidence

DeployOpen plans, builds and documents Keycloak as a self-hosted identity provider in your own infrastructure, so that registration, role design and authentication settings produce records your auditor can sample. We prepare the controls and evidence for a SOC 2 examination, but independent auditors issue the report.

How we scope

  • Agree in writing which applications, realms and user populations fall inside the SOC 2 system boundary for Keycloak.
  • Map each in-scope application to the CC6.2, CC6.3 and CC6.6 control points and record who owns each control.
  • Confirm with your auditor which evidence periods and sample types they expect before configuration starts.

How we build

  • Configure the joiner, mover and leaver workflow, including how user records are created, approved and disabled in Keycloak.
  • Design realm roles and groups around least privilege and segregation of duties, then document how each role is reviewed.
  • Enforce stronger authentication for access from outside the system boundary and test the settings against the documented policy.

How we hand over

  • Deliver a control narrative and configuration record for each mapped criterion, written so your team can maintain it.
  • Provide sample queries or exports for registration, removal, role assignment and login events that auditors commonly request.
  • Walk your security, IT and compliance owners through the evidence, the review cadence and the change process for future edits.

How we support

  • Retest the controls after Keycloak upgrades, since minor releases and the Operator can change defaults and behavior.
  • Offer ongoing support, upgrades and continuous testing as a retainer once the fixed-scope engagement closes.
  • Ask for a written quote that lists the scope, deliverables and timeline before any work begins, since we do not publish a price list.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.