Class GrouperDuoProvisioningTargetNativeSync
GrouperProvisioningTargetNativeSync: builds native target reporting
beans for sync-back to the generic grouper_prov_group / grouper_prov_user tables.
Both groups and users are captured from the raw Duo JSON (JSON Pointer paths,
like SCIM and Adobe), hooked at the API-commands seam (GrouperDuoApiCommands read
methods such as retrieveDuoGroups / retrieveDuoUsers / retrieveDuoUser)
where the per-element JSON node is in scope. This avoids losing any Duo field that the
GrouperDuoGroup / GrouperDuoUser typed beans do not model; operators can capture
any JSON field via nativeAttributesGroups / nativeAttributesEntities with a
name and optional JSON-Pointer path.
The default keys are chosen so each default's captured value matches what the OLD typed-bean
getter returned: the Duo user JSON field is username (stored under the friendlier key
userName, matching GrouperDuoUser.getUserName()), and the target ids come from
/user_id (user) and /group_id (group) -- the same JSON fields the old
typed-bean build methods read via getId() / getGroup_id().
Memberships are still derived from the GrouperDuoUser typed bean's inline
groups set (captureMembershipsFromUser(edu.internet2.middleware.grouper.app.duo.GrouperDuoUser)); each GrouperDuoGroup in that
set carries its own group_id, so no name->id index resolution is needed. Only the
group/user object capture is JSON-based.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildNativeGroupFromJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build a native group bean from the raw Duo group JSON.buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode userNode) Build a native user bean from the raw Duo user JSON.voidcaptureGroupJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build + record a Duo group from its raw JSON.static voidcaptureGroupJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode groupNode) Capture a Duo group (from its raw JSON) against the current provisioner's sync.static voidcaptureMembershipDeleteFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful Duo membership remove (disassociateUserFromGroup) against the current provisioner: drop(groupTargetId, userTargetId)from the native membership mirror so the end-of-run flush deletes its grouper_prov_mship row.static voidcaptureMembershipInsertFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful Duo membership add (associateUserToGroup) against the current provisioner: record(groupTargetId, userTargetId)in the native membership mirror.voidcaptureMembershipsFromUser(GrouperDuoUser grouperDuoUser) Translate a Duo user's inlinegroupsset (GrouperDuoGroupbeans with their owngroup_id) into native membership beans and record them.static voidcaptureMembershipsFromUserForCurrentProvisioner(GrouperDuoUser grouperDuoUser) Translate a Duo user's inlinegroupsset into native membership records and record them on the current provisioner.voidcaptureUserJson(com.fasterxml.jackson.databind.JsonNode userNode) Build + record a Duo user from its raw JSON.static voidcaptureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode userNode) Capture a Duo user (from its raw JSON) against the current provisioner's sync.protected List<GrouperProvisioningNativeAttributeConfig>Per-protocol sensible-default attribute list for entities (users) when the operator hasn't configurednativeAttributesEntities.protected List<GrouperProvisioningNativeAttributeConfig>Per-protocol sensible-default attribute list for groups.Methods inherited from class edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningTargetNativeSync
clearSyncBackGroupForDelete, clearSyncBackGroupForRead, clearSyncBackUserForDelete, clearSyncBackUserForRead, configuredNativeAttributeConfigsEntities, configuredNativeAttributeConfigsGroups, effectiveNativeAttributeConfigsEntities, effectiveNativeAttributeConfigsGroups, getGrouperProvisioner, grouperToNativeNameExceptionsEntities, grouperToNativeNameExceptionsGroups, markSyncBackGroupForDelete, markSyncBackGroupForRead, markSyncBackUserForDelete, markSyncBackUserForRead, recordTargetNativeGroup, recordTargetNativeGroupWrite, recordTargetNativeMembershipDelete, recordTargetNativeMembershipInsert, recordTargetNativeMembershipReplace, recordTargetNativeMemberships, recordTargetNativeUser, recordTargetNativeUserWrite, removeTargetNativeGroup, removeTargetNativeUser, setGrouperProvisioner
-
Constructor Details
-
GrouperDuoProvisioningTargetNativeSync
public GrouperDuoProvisioningTargetNativeSync()
-
-
Method Details
-
getDefaultNativeAttributeConfigsEntities
Description copied from class:GrouperProvisioningTargetNativeSyncPer-protocol sensible-default attribute list for entities (users) when the operator hasn't configurednativeAttributesEntities. Override in protocol subclasses to return a curated list (e.g. SCIM core schema fields). Default is empty — for LDAP this means "no extra capture beyond what the regular target query returned," which is the historical behavior.- Overrides:
getDefaultNativeAttributeConfigsEntitiesin classGrouperProvisioningTargetNativeSync
-
getDefaultNativeAttributeConfigsGroups
Description copied from class:GrouperProvisioningTargetNativeSyncPer-protocol sensible-default attribute list for groups. SeeGrouperProvisioningTargetNativeSync.getDefaultNativeAttributeConfigsEntities().- Overrides:
getDefaultNativeAttributeConfigsGroupsin classGrouperProvisioningTargetNativeSync
-
buildNativeGroupFromJson
public GrouperProvisioningTargetNativeGroup buildNativeGroupFromJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build a native group bean from the raw Duo group JSON.targetIdis read from/group_id(the same field the old typed-bean build read via getGroup_id()); the attributes map is populated for each entry inGrouperProvisioningTargetNativeSync.effectiveNativeAttributeConfigsGroups()(operator-configured or default) by JSON Pointer. Returns null when the JSON is missing or has nogroup_id. -
buildNativeUserFromJson
public GrouperProvisioningTargetNativeUser buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode userNode) Build a native user bean from the raw Duo user JSON.targetIdis read from/user_id(the same field the old typed-bean build read via getId()); the attributes map is populated for each entry inGrouperProvisioningTargetNativeSync.effectiveNativeAttributeConfigsEntities()(operator-configured or default) by JSON Pointer. Returns null when the JSON is missing or has nouser_id. -
captureGroupJson
public void captureGroupJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build + record a Duo group from its raw JSON. No-op when sync-back is off or id-less. -
captureUserJson
public void captureUserJson(com.fasterxml.jackson.databind.JsonNode userNode) Build + record a Duo user from its raw JSON. No-op when sync-back is off or id-less. -
captureMembershipsFromUser
Translate a Duo user's inlinegroupsset (GrouperDuoGroupbeans with their owngroup_id) into native membership beans and record them. No-op if reporting is off or the user has no groups. -
captureGroupJsonFromCurrentProvisioner
public static void captureGroupJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode groupNode) Capture a Duo group (from its raw JSON) against the current provisioner's sync. No-op if there's no current provisioner or the active provisioner isn't a Duo one. Called from the commands seam (GrouperDuoApiCommands read methods) for every group parsed from a read. -
captureUserJsonFromCurrentProvisioner
public static void captureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode userNode) Capture a Duo user (from its raw JSON) against the current provisioner's sync. No-op if there's no current provisioner or the active provisioner isn't a Duo one. Called from the commands seam (GrouperDuoApiCommands read methods) for every user parsed from a read. -
captureMembershipsFromUserForCurrentProvisioner
Translate a Duo user's inlinegroupsset into native membership records and record them on the current provisioner. -
captureMembershipInsertFromCurrentProvisioner
public static void captureMembershipInsertFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful Duo membership add (associateUserToGroup) against the current provisioner: record(groupTargetId, userTargetId)in the native membership mirror. Unlike groups/users (re-read via the drain), memberships are tracked purely from our own successful writes -- never re-read -- so grouper_prov_mship stays current for GRP-7048 (full sync serving memberships from the sync-back cache). No-op out of cycle or for a non-Duo provisioner; the record call itself is a no-op when membership sync-back is off. -
captureMembershipDeleteFromCurrentProvisioner
public static void captureMembershipDeleteFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful Duo membership remove (disassociateUserFromGroup) against the current provisioner: drop(groupTargetId, userTargetId)from the native membership mirror so the end-of-run flush deletes its grouper_prov_mship row. No-op out of cycle or for a non-Duo provisioner; the record call itself is a no-op when membership sync-back is off.
-