Operate
LDAP and Active Directory
Sign in with directory accounts through an identity provider that bridges LDAP or Active Directory to OIDC or SAML.
On this page
The engine does not bind to LDAP itself. It signs people in through an identity provider, and the identity provider reads your directory. That keeps directory credentials out of the engine, and gives directory accounts MFA and a single place to offboard. Mirth Connect and Rhapsody bind to LDAP directly; with MedHook you put a bridge in between.
flowchart LR
AD["Active Directory / LDAP"] -->|LDAP or agent| IDP["Identity provider\n(Entra ID, Okta, Keycloak, AD FS)"]
IDP -->|OIDC or SAML| ENG["MedHook engine"]Pick a bridge
| You run | Bridge |
|---|---|
| AD with Microsoft 365 | Entra Connect (or Cloud Sync) already syncs users and groups to Entra ID. Follow Microsoft Entra ID. |
| AD with Okta | The Okta AD agent (or LDAP agent for other directories) imports users and groups. Follow Okta. |
| AD on premises, no cloud IdP | AD FS issues SAML or OIDC from AD. Follow SAML 2.0. |
| OpenLDAP or another directory | Keycloak with an LDAP user federation, next to the engine. Follow Any OIDC provider. |
Keycloak with LDAP
- Run Keycloak in your network and create a realm, for example
healthcare. - Under User federation, add an LDAP provider: the connection URL, bind DN and the users DN. Set Edit mode to
READ_ONLYso Keycloak never writes to the directory. - Add a group-ldap-mapper for the groups DN, so directory groups become Keycloak groups.
- Create a confidential OIDC client
medhook-enginewith the redirect URIhttps://engine.example.test/api/auth/sso/oidc/callback, and a Group Membership mapper that addsgroupsto the ID token (turn off Full group path). - Configure the engine:
bash
ENGINE_OIDC_ISSUER=https://keycloak.example.test/realms/healthcare
ENGINE_OIDC_CLIENT_ID=medhook-engine
ENGINE_OIDC_CLIENT_SECRET=<from your secrets manager>
ENGINE_OIDC_GROUP_ROLES="medhook-admins=admin;medhook-operators=operator"Disabling an account in the directory stops new sign-ins at once. A session already open ends after 60 minutes without activity, or 12 hours after sign-in at most; run create-engine-user <email> --disable to end it sooner.