Keycloak vs OpenLDAP for HIPAA and healthcare

Keycloak fits SSO, MFA and login audit across apps, while OpenLDAP fits the account directory that legacy apps bind to. Neither project's documentation offers a BAA, so the organisation running either one carries the HIPAA obligations.

On this page

Keycloak vs OpenLDAP for HIPAA: which one fits your login layer?

Choose Keycloak when a covered entity or business associate needs its EHR, patient portal and internal apps under one login layer, with single sign-on, MFA and user and admin event trails across them. Choose OpenLDAP when the main need is a hashed account store that legacy apps bind to directly. This section covers only the compliance angle. The general Keycloak vs OpenLDAP comparison is on its own page. Neither product takes HIPAA obligations off your hands: Keycloak's Server Administration Guide does not mention HIPAA or a business associate agreement, and the OpenLDAP 2.6 security guidance does not mention HIPAA either. Self-hosted open-source software cannot sign a BAA, so the organization running it carries the duties in 45 CFR Part 164 Subpart C for electronic protected health information.

The decision turns on three questions. First, which apps bind directly to LDAP? Keycloak can federate users from an LDAP directory, so OpenLDAP can remain the store behind it. An app that binds to LDAP directly still depends on OpenLDAP in its login path, and that bind does not pass through Keycloak's MFA or lockout controls. Second, must MFA cover every access path? Keycloak documents passkeys, recovery codes, TOTP/HOTP and WebAuthn, along with OTP and WebAuthn policy settings and brute force protection with temporary and permanent lockout. A direct LDAP bind carries a password and nothing more, so each legacy bind path needs its own compensating control, which you should confirm app by app. Third, who hosts and operates the servers? That answer decides who produces the configuration records, logs and change history an assessor will request.

What the HIPAA Security Rule asks of an identity and SSO tool

The Security Rule applies to covered entities and business associates for electronic protected health information. Appendix A lists 18 standards and 36 implementation specifications: 14 required and 22 addressable. An addressable specification requires an assessment of whether the measure is reasonable and appropriate. If it is not, the entity documents why and adopts an equivalent alternative where that is reasonable. The four groups below show what this means for an identity tool.

Administrative safeguards (164.308)

Section 164.308 covers the management side: a documented risk analysis, access management, workforce security, security awareness and training, and business associate contracts. For identity, it asks who may hold an account, who approves each role and who removes access when someone leaves. The Keycloak and OpenLDAP 2.6 sections we reviewed do not mention HIPAA or a BAA, so the vendor paperwork and the risk analysis are yours to confirm. Your risk analysis must name the directory, the admin consoles and every replica.

Security Rule text

Physical safeguards (164.310)

Section 164.310 covers facility access, workstation use, and device and media controls. For a self-hosted identity stack, the practical scope is the data center or cloud account where Keycloak or OpenLDAP runs, the hypervisors and storage beneath it, and any administrator laptop that holds console access or keys. Identity databases, directory exports and backups carry password hashes and account records, so their media and disposal rules matter as much as the server room. Confirm that backups and LDIF exports sit under the same controls as the live server.

Technical safeguards (164.312)

Section 164.312 is where an identity tool does most of its visible work: unique user identification, access control, audit controls, integrity, person or entity authentication and transmission security. The Keycloak guide documents auditing of user and admin events, passkeys, recovery codes, TOTP and HOTP, brute force lockout and a per-realm Require SSL setting. OpenLDAP 2.6 documents StartTLS and ldaps, SASL mechanisms with integrity protection, and require authc to block anonymous access. Verify that every client path uses TLS and that audit events reach a store you control.

Keycloak admin guide

Organizational and documentation standards

Sections 164.314 and 164.316 set the organizational and documentation rules: the terms of business associate arrangements, and written policies and procedures that show the other safeguards exist, are followed and are kept current. For identity, this layer turns a working SSO setup into evidence: configuration baselines, change records, access review outputs and a written reason for each addressable decision. Keep these records in a form an assessor can read, and assign someone to update them after each Keycloak or OpenLDAP upgrade. No tool can certify this layer for you.

HHS certification FAQ

How Keycloak and OpenLDAP each meet the technical safeguards as documented

This table sets the documented Keycloak and OpenLDAP features against the HIPAA Security Rule technical safeguard areas each one touches. Treat every silent cell as an item to verify in your own configuration and never as a confirmed yes. Both platforms document transport security and login controls, while encryption at rest, log retention and vendor agreements remain your organization's work to prove.

SafeguardKeycloak as documentedOpenLDAP as documented
Audit controls (technical safeguards, 164.312)Admin events and user events are auditable once auditing is configured. Confirm event retention and where logs are stored.The security guidance does not describe audit logging. Confirm what slapd logs, where it goes and how long it is kept.
Access control and unique user identificationPer-realm configuration and admin console access. Confirm each user has a unique account and admin rights go only to named staff.ACLs can use security strength factors, and require authc forces authentication before directory access. Confirm unique entries and ACL design.
Person or entity authentication with MFAPasskeys, recovery codes, TOTP/HOTP and WebAuthn, with OTP policy settings. Confirm which factors you enforce per realm and for admins.The security guidance covers SASL bind mechanisms, not MFA. Confirm MFA comes from an upstream identity layer or the application.
Transmission securityPer-realm Require SSL offers External requests, None and All requests. Set All requests where PHI moves, then verify in testing.StartTLS and ldaps:// are both supported. SASL DIGEST-MD5 and GSSAPI offer integrity and confidentiality. Confirm which one is enforced.
Encryption of data at restConfirm at-rest encryption for the relational database and backups, since it depends on your database and storage platform.The security chapter states it does not cover encryption of the database at rest, though userPassword hashing is covered. Plan storage encryption separately.
Brute force protectionTemporary and permanent lockout are documented. Confirm thresholds and lockout settings per realm before go-live.The security guidance does not describe account lockout. Confirm any throttling in your configuration or at the front end, and test it.
Vendor BAA or attestationsThe admin guide does not mention HIPAA or a BAA. Your organization carries the obligations; ask any distributor for its own terms.The security chapter does not mention HIPAA or a BAA. Your organization carries the obligations; confirm any support agreement terms.
Data locationRuns where you deploy it, with the database on infrastructure you choose. Confirm backups, logs and replicas stay in approved locations.Runs on servers you operate, with directory data in the backend you configure. Confirm replicas and backups stay in approved locations.

Where a login, a directory bind and an audit event actually go

This illustrative design starts with users and browser apps signing in to Keycloak inside the covered entity network, with MFA applied at login. Keycloak reads accounts from OpenLDAP through LDAP federation over TLS, and OpenLDAP stores userPassword values in hashed form. Keycloak sends user and admin events to an audit store, which is the record to walk through with an assessor. The direct LDAP bind from legacy apps skips Keycloak, so it also skips Keycloak's MFA and audit events. Review that path first: confirm which apps bind directly, whether StartTLS or ldaps is enforced, and whether OpenLDAP requires authentication.

Illustrative design: the direct LDAP bind path is the one to review first.

Who covers what for a self-hosted Keycloak or OpenLDAP

Each platform divides HIPAA responsibility between a software project and the organization that runs it. The cards separate what the project documents from what your team must configure, operate and evidence. In both cases, the organization owns the HIPAA program, including its risk analysis, policies and the evidence an assessor will request.

Keycloak project license and documentation

Keycloak is Apache-2.0 software, and its releases and Server Administration Guide come from the upstream open source project. The reviewed documentation contains no BAA or attestation and does not mention HIPAA. If you buy Red Hat build of Keycloak, its subscription terms are a separate document, so read them for any HIPAA language before you rely on them. Keep the license text and the exact release you deploy in your change records.

Keycloak admin guide

What your team runs on Keycloak

Your team owns the hosting, the production database, TLS, realm and MFA settings, event retention and patching. Keycloak needs a relational database in production, and PostgreSQL 14 to 18 is among the supported options, so record the engine and version that hold your identity data. Per-realm Require SSL offers External requests, None and All requests, so choose one deliberately and test it. Enable auditing for user and admin events and set retention that matches your policy. The project plans four minor releases a year, so keep a current release line and log each upgrade for your assessor.

Keycloak database guide

OpenLDAP project license and documentation

OpenLDAP Software ships under the OpenLDAP Public License, which the project describes as a non-restrictive, free, open-source license. The software is maintained by volunteers under the OpenLDAP Foundation, so any supplier commitment has to come from a separate contract. The 2.6 Administrator's Guide security chapter contains no BAA and does not mention HIPAA. If you buy commercial OpenLDAP support from any provider, read that contract for HIPAA language before you rely on it.

OpenLDAP security guide

What your team runs on OpenLDAP

Your team owns TLS, access controls, password policy, backups, host security and the evidence. The guide covers StartTLS and ldaps://, so require one of them for every client and test that plaintext binds fail. Set require authc so the directory is not readable without authentication, and use SASL mechanisms with security strength factors where your clients support them. The guide covers password hashing for userPassword but not encryption of the database at rest, so that protection, the backups and the host hardening are yours to design and document.

How to document addressable specifications for a directory and SSO stack

Each addressable implementation specification in the Security Rule needs a recorded decision. Under 45 CFR 164.306(d), you first assess whether the specification is reasonable and appropriate for this system. If it is not, you document why. If an equivalent measure is reasonable and appropriate, you implement it. For an identity stack, most of these decisions concern transmission and access. Keycloak's per-realm Require SSL setting has the modes External requests, None and All requests, so the chosen mode is a decision to record with its reason. On the OpenLDAP side, record whether clients use StartTLS or ldaps://, and whether require authc is set so the directory requires authentication. Keep each setting, its justification and the approver together with the risk analysis so an assessor can trace the decision to the configuration.

The gap you must plan for is encryption of the directory database at rest. The OpenLDAP 2.6 security chapter covers password hashing for userPassword but does not cover encrypting the database at rest, and it does not mention HIPAA. The organization running OpenLDAP carries the HIPAA obligations. Keycloak's guide does not address HIPAA either, and its production database is a separate relational system that you operate, so at-rest protection for that store is also your decision. Before deciding, confirm with the vendor documentation and your hosting provider what the storage layer provides. Then decide, with counsel and the hosting team, whether the gap is handled by a storage-layer control, by an equivalent alternative, or by a documented compensating control. Name the approver and a review date in the record.

What an assessor will ask for and how each side produces it

Keycloak's technical evidence comes from the server, so the assessor's first questions are about what it records, how long it keeps those records, and whether the settings in force match your documentation. The Keycloak Server Administration Guide documents auditing for user events and admin events, per-realm Require SSL, brute force protection and MFA policy. Expect to provide:

  • User and admin event exports: Records of sign-in activity and administrative changes, produced once event auditing is switched on for the realm. Confirm event retention and where events are stored, including whether they are forwarded to your log platform.
  • Realm configuration exports: Evidence of the Require SSL mode (External requests, None or All requests) and the MFA policy, which covers passkeys, recovery codes, TOTP/HOTP and WebAuthn policy.
  • Brute force settings: The temporary and permanent lockout configuration for each realm, exported alongside the rest of the realm so the assessor sees the setting in force on the audit date.
  • Role and access review records: Exports of realm and client roles and group membership, paired with the signed review your team completes each cycle. Keycloak supplies the data, and the review is your process.

Before the assessment, confirm that the Require SSL mode covers every realm that carries electronic protected health information, and that each export is dated so it can be matched to the change history.

Configuring Keycloak and OpenLDAP for the Security Rule controls

This sequence connects an OpenLDAP directory and a Keycloak realm so that every login path to electronic protected health information is designed to be encrypted, authenticated and logged. It ends with a documented risk analysis, decisions on each addressable specification and an evidence set an assessor can review. Confirm whether your support window allows Keycloak 26.8.1 with OpenLDAP 2.6.15 (long term support) or 2.7.1 (feature release) before you choose a line.

  1. Inventory ePHI systems and login paths

    Your team lists every application, service and integration that creates, receives, stores or transmits electronic protected health information, and records how each one signs users in. Pay particular attention to any application that binds directly to OpenLDAP, because that path bypasses Keycloak and needs its own controls. The output is a system inventory with one row per login path, reviewed by the security and compliance leads. The step is done when every path is listed and no application is left with an unknown authentication method.

  2. Enable TLS and require authentication on OpenLDAP

    On the OpenLDAP server, enable TLS through StartTLS or ldaps:// and confirm that clients cannot send credentials in the clear. The OpenLDAP 2.6 Administrator's Guide describes StartTLS as the standard track mechanism, so use it unless a client supports only ldaps://. Set require authc so unauthenticated clients cannot reach the directory, then review each access control and apply security strength factors where your policy needs a minimum protection level. The step is done when a test client confirms that an unprotected bind is refused and an anonymous search returns no directory entries.

  3. Confirm the TLS library in the build

    Check which TLS library your OpenLDAP build uses before you finalize the TLS settings. OpenLDAP 2.7 deprecated the GnuTLS integration, so a build that depends on GnuTLS needs a documented decision on library choice or on the release line. Record the library name and version from the build configuration and from the installed binary, since an operating system package can differ from the upstream release. The step is done when the TLS library and its version sit in the configuration record and in the evidence set.

  4. Connect Keycloak to OpenLDAP over TLS

    In the Keycloak realm, add an LDAP user federation provider that points to OpenLDAP over the encrypted connection set in the previous steps. Bind with a dedicated service account that has only the read access Keycloak needs. Confirm the database first: production Keycloak needs a relational database, and PostgreSQL 14 to 18 is one of the supported choices, so confirm your PostgreSQL version falls in that range. Record the database engine, its version and where it runs. The step is done when a test login by a federated user succeeds and the federation settings are exported to the configuration record.

  5. Set realm SSL, MFA and lockout policies

    In the realm settings, set Require SSL to All requests so Keycloak refuses unencrypted requests from every client, including internal ones. Configure the multi-factor policy from the options the Keycloak Server Administration Guide lists, which include passkeys, recovery codes, TOTP or HOTP and WebAuthn with OTP policy, and decide which roles must enroll. Enable brute force protection and set temporary or permanent lockout values that match your access policy. Export the realm configuration to confirm each value. The step is done when a test account locks after failed attempts and a plain HTTP request to the realm is refused.

  6. Turn on user and admin event auditing

    Enable user event and admin event auditing in the realm, then define what each event record must show: who acted, what changed, from where and when. Set the retention period in your records policy, since the platform setting covers only part of the answer. Confirm where events are forwarded, such as a log store or SIEM, and who can read or delete them there. Test with one failed login and one administrative change, then confirm both events appear at the destination with timestamps. The step is done when the test events arrive and the retention and access rules are written into the evidence set.

  7. Move or retire direct LDAP binds

    For each direct bind found in step one, decide whether the application can sign users in through Keycloak using OpenID Connect or SAML 2.0, or whether it genuinely needs a direct LDAP bind. Where a direct bind must stay, keep it on TLS, use a dedicated service account with the narrowest read scope, and document the reason. Where the application can move, plan the change through the application owner's change process, cut over, and then disable the old bind credential. The step is done when the inventory shows each direct bind as either retired or documented with an owner, a reason and a TLS-protected path.

  8. Document decisions, retest and hand over

    Write the risk analysis for the ePHI systems in scope, then record a decision for each addressable implementation specification in Appendix A to Subpart C. Under 45 CFR 164.306(d), an addressable specification must be assessed for whether it is reasonable and appropriate and, where it is not implemented, documented along with an equivalent alternative measure if one is reasonable. Assemble the evidence set from configuration exports, TLS test results, audit samples and change records, then retest after the final change. The step is done when the retest passes and the compliance lead signs the handover. Compliance decisions remain with your organization and its assessor.

What buyers ask before they hire help for a HIPAA identity stack

What drives the effort of a Keycloak and OpenLDAP HIPAA project?

The effort depends on how much identity surface the project touches, and neither project's license adds a per-user fee. The main drivers are the number of applications moving to Keycloak, how many applications bind directly to OpenLDAP (each direct bind is a dependency to redesign and test), the high availability design you need, the state of the existing directory including schema quality, duplicate accounts and attribute ownership, and how deep the evidence must go for your assessor. A small estate with one directory and two applications is a very different job from a multi-site estate with many legacy binds. Ask for a quote that lists each driver as its own line, so you can see which one moves the total and which assumptions your team must check.

How long does a HIPAA identity stack implementation take?

The timeline is set only by the scope agreed in writing before work starts. DeployOpen does not publish a price list and does not give a fixed timeline, so any duration you hear in a sales conversation should be checked against the written scope. Most engagements are fixed-scope, with scope, deliverables and timelines agreed in writing first. The schedule usually moves with the same drivers as effort: application count, direct LDAP binds, high availability design, directory cleanup and the depth of evidence. Two items often add time that is hard to predict early: waiting for hosting teams to schedule changes, and waiting for the risk analysis owner to approve addressable decisions. Ask for milestones tied to client inputs, so the timeline shows who must act and when.

What does our team need to provide for an identity project?

The client supplies an application inventory, directory access, a named owner for the risk analysis, hosting team time and sign-off on addressable decisions. The application inventory lists each app, its protocol, whether it binds to LDAP directly and who owns it. Directory access covers read access to the existing OpenLDAP tree and the rights to test changes in a non-production copy. The risk analysis owner must be a person with authority to accept residual risk, since the Security Rule places the assessment and the decisions on the covered entity. Hosting teams need time for infrastructure, database and backup changes. Under the Security Rule, an addressable implementation specification must be assessed and, if not adopted, documented with an equivalent alternative (45 CFR 164.306(d)). Someone on your side must sign those decisions off before the design is final.

Can our in-house team handle a HIPAA Keycloak and LDAP project alone?

Yes, if your team already has working LDAP and Keycloak skills and can carry the project on its own schedule. Engineers who run OpenLDAP and Keycloak in production can usually handle the directory design, federation, TLS and SASL settings, and the migration of application binds. The common gaps sit elsewhere: the risk analysis and the documentation. That means a documented assessment of each addressable specification, a written description of the system, policies that match the configured controls, and evidence that those controls operate. Teams often underestimate how long these take alongside production duties. If you lack either skill set, or you lack a person to own the risk analysis, a fixed-scope engagement can cover the gaps while your team keeps ownership of the system.

Will Keycloak or OpenLDAP sign a business associate agreement?

Neither Keycloak nor OpenLDAP signs a business associate agreement, because both are open-source software you run in your own infrastructure rather than services you contract with. Neither the Keycloak Server Administration Guide nor the OpenLDAP 2.6 security chapter addresses HIPAA or BAAs, so the organization running the software carries the HIPAA obligations. Confirm this against the version you deploy. The place to ask about agreements is your hosting providers, whether a cloud provider, data center or managed database service, because each one sets its own terms for handling protected health information. Ask each provider whether it will sign a BAA for the services you use and which of its services that agreement covers. Ask DeployOpen to state in the written scope which contractual terms apply to the engagement.

Does DeployOpen certify that our identity stack is HIPAA compliant?

No. DeployOpen does not certify HIPAA compliance, and it does not issue audit reports, attestations or certifications. What DeployOpen does is prepare the systems, controls and evidence that a compliance assessment will review, such as configuration, access control, audit logging, backup records and documented decisions. Independent auditors and certification bodies issue reports, and they decide what they accept. The HHS FAQ on certification is the next read for the official position. Ask any provider for the evidence list their work will produce, and ask your assessor what format they expect before work starts so the evidence fits their review.

How DeployOpen helps with the identity stack and its evidence

DeployOpen plans and builds the identity stack for Keycloak vs OpenLDAP for HIPAA and healthcare inside your own infrastructure, then documents the controls an assessor will ask about. Engagements are fixed-scope, with scope, deliverables and timelines agreed in writing before work starts. DeployOpen prepares systems and evidence for compliance assessments, but auditors and certification bodies issue any report or attestation.

How we scope

  • The written scope names which Keycloak and OpenLDAP components are in, including any LDAP federation link between them.
  • We map each Security Rule safeguard to a named control and record which specifications are addressable.
  • The scope separates DeployOpen deliverables from obligations that stay with your organization, such as HIPAA compliance itself.

How we build

  • We configure Keycloak audit events for user and admin actions, brute force lockout and per-realm Require SSL settings.
  • We configure StartTLS or ldaps:// for OpenLDAP and set require authc so the directory cannot be read anonymously.
  • We set up two-factor methods, OpenLDAP password hashing and access controls, then test them against the written scope before handover.

How we hand over

  • Handover includes configuration records, a control-to-evidence map and the audit log settings your assessor may request.
  • Documentation records the at-rest encryption source for the OpenLDAP data store, which the OpenLDAP security chapter does not cover.
  • Handover includes a runbook for Keycloak database backups and OpenLDAP restores, written for your operations team.

How we support

  • Retainers can cover ongoing support, upgrades and continuous testing for Keycloak and OpenLDAP after handover.
  • Re-check audit and TLS settings after each upgrade, since Keycloak says minor-release breaking changes are opt-in.
  • Ask for a quote built from the written scope, and confirm which items recur after handover.

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.