Configure HotWax SSO and security group sync for OMS
Prerequisites
- Set an email address on the OMS
UserAccountrecord for each user who will sign in through HotWax SSO. The address must match the one the user uses to sign in through SSO. - OMS and Maarg must share the same database.
- Set
maarg.instance.urlin the OMSstart.propertiesfile to the Maarg instance URL. - Activate an authentication flow in Maarg. The default Auth Flow ID is
HotWaxSso. - OMS and Maarg must use the same
security.token.key. Reuse the existing PWA cross-login key.
Step 1 — Enable SSO in security.properties
Add the following settings to applications/hwmapps/config/security.properties:
# Enable the SSO login link and preprocessor redirect
security.login.maarg.sso.enable=true
# Must match the authFlowId configured in Maarg
maarg.sso.auth.flow.id=HotWaxSso
Restart OMS. The login page will show the Login with HotWax SSO link.
Step 2 — Migrate OFBiz security groups to Moqui
Run migrateUserGroup from Webtools or the Service Engine screen. The service takes no input parameters and is safe to rerun.
The service creates a Moqui UserGroup for each OFBiz SecurityGroup that needs one. It skips SUPER and COMMERCE_SUPER because their Moqui counterparts, ADMIN_ADV and ADMIN, already exist.
Step 3 — Sync role mappings in Maarg
- In Maarg, open the HotWax SSO authentication flow. Verify that its Auth Flow ID matches
maarg.sso.auth.flow.idin OMS. - Click Sync Role Mappings in the upper-right corner.
- Review the Role Name and User Group columns to verify that each required Keycloak client role maps to the intended Moqui user group.
How OMS syncs security groups at login
OMS reads the user’s active Moqui UserGroupMember records and resolves each userGroupId to an OFBiz SecurityGroup.
| Moqui user group | OFBiz security group |
|---|---|
ADMIN_ADV |
SUPER |
ADMIN |
COMMERCE_SUPER |
| All other group IDs | Matching OFBiz group ID |
| Active Moqui memberships | OFBiz assignment behavior |
|---|---|
| At least one membership resolves to an OFBiz group | OMS adds missing assignments and expires assignments outside the resolved set. |
| Memberships exist, but none resolve to an OFBiz group | OMS retains existing assignments. |
| No active memberships exist | OMS expires all active assignments. |
