Class GrouperAzureProvisioningTargetNativeSync
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 Microsoft Graph JSON (JSON
Pointer paths, like SCIM/Adobe/Google), hooked at the API-commands seam
(GrouperAzureApiCommands.retrieveAzureGroups/retrieveGroupsHelper and
retrieveAzureUsers/retrieveUsersHelper) where the full JSON node is in scope.
This avoids losing any Graph field that the GrouperAzureGroup / GrouperAzureUser
typed beans do not model; operators can capture any JSON field via nativeAttributesGroups
/ nativeAttributesEntities with a name and optional JSON-Pointer path.
Unlike Adobe, Azure keeps canRetrieveGroup=true (Graph reads a single group by id or
displayName), so the routing is unchanged -- only the capture site moved off the typed bean.
Memberships are group-centric and derived during DAO translation
(captureMembershipsForGroup(java.lang.String, java.util.Collection<java.lang.String>)): the Graph group-members read co-locates the group id and
the member user ids. Members are NOT folded into the group attribute node -- they are their own
(group,user) mirror rows.
Group OWNERS, by contrast, ARE a managed group attribute in Azure (groupOwners), not
memberships. They are fetched by a separate Graph /owners call and folded into the same
native group via captureGroupOwners(String, java.util.Set) (called from
GrouperAzureApiCommands.retrieveGroupOwnersHelper2), so a cache-reconstructed group carries
its owners on the GROUP -- never in the membership mirror. See captureGroupOwners for why.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildNativeGroupFromJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build a native group bean from the raw Microsoft Graph group JSON.buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode userNode) Build a native user bean from the raw Microsoft Graph user JSON.voidcaptureGroupJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build + record an Azure group from its raw JSON.static voidcaptureGroupJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode groupNode) Capture an Azure group (from its raw JSON) against the current provisioner's sync.voidcaptureGroupOwners(String targetGroupId, Set<String> ownerIds) Fold the resolved owner set for one Azure group into that group's already-captured native group as the multi-valuedgroupOwnersattribute.static voidcaptureGroupOwnersFromCurrentProvisioner(String targetGroupId, Set<String> ownerIds) Fold a group's resolved owner id set into its already-captured native group (as the multi-valuedgroupOwnersattribute) against the current provisioner's sync.static voidcaptureMembershipDeleteFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful Azure membership remove against the current provisioner: drop(groupTargetId, userTargetId)from the native membership map so the end-of-run flush deletes its grouper_prov_mship row.static voidcaptureMembershipInsertFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful Azure membership add against the current provisioner: record(groupTargetId, userTargetId)in the native membership map.voidcaptureMembershipsForGroup(String targetGroupId, Collection<String> targetUserIds) Record (targetGroupId, targetUserId) memberships for a single Azure group, given the already-resolved user ids returned byretrieveAzureGroupMembers.static voidcaptureMembershipsForGroupFromCurrentProvisioner(String targetGroupId, Collection<String> targetUserIds) Record group-to-user memberships against the current provisioner's sync, using already-resolved Azure target ids.voidcaptureUserJson(com.fasterxml.jackson.databind.JsonNode userNode) Build + record an Azure user from its raw JSON.static voidcaptureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode userNode) Capture an Azure 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
-
GrouperAzureProvisioningTargetNativeSync
public GrouperAzureProvisioningTargetNativeSync()
-
-
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 Microsoft Graph group JSON.targetIdis read from/id(the same field the oldbuildNativeGroupFromAzureGrouptook fromGrouperAzureGroup.getId()); 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 noid. -
buildNativeUserFromJson
public GrouperProvisioningTargetNativeUser buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode userNode) Build a native user bean from the raw Microsoft Graph user JSON.targetIdis read from/id(the same field the oldbuildNativeUserFromAzureUsertook fromGrouperAzureUser.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 noid. -
captureGroupJson
public void captureGroupJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build + record an Azure 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 an Azure user from its raw JSON. No-op when sync-back is off or id-less. -
captureMembershipsForGroup
Record (targetGroupId, targetUserId) memberships for a single Azure group, given the already-resolved user ids returned byretrieveAzureGroupMembers. No-op when inputs are blank.Azure membership is group-centric and derived during DAO translation (the Graph group-members read co-locates both ids), so it stays bean/id-based -- the same situation as Adobe -- while object capture moves to raw JSON.
-
captureGroupOwners
Fold the resolved owner set for one Azure group into that group's already-captured native group as the multi-valuedgroupOwnersattribute.Azure group owners are a managed GROUP ATTRIBUTE (not memberships):
GrouperAzureGroup.toProvisioningGroupassigns them togroupOwners, and Grouper diffs/writes them as a group attribute (updateGroups' groupOwners branch, addOwnersToGroup/ removeOwnersFromGroup). So sync-back must carry owners on the GROUP, not in grouper_prov_mship -- a cache-reconstructed group missing groupOwners would look changed and re-push owners on every from-cache run (for a config where groupOwners is selected/updated). Owners must NOT enter the membership mirror, or the compare would treat an owner as a plain group member.Owners are fetched by a SEPARATE Graph
/ownerscall AFTER the group JSON was captured, so the native group is already recorded (recordTargetNativeGroup); this augments it in place with the SAME id set the typed bean carries (grouperAzureGroup.getOwners()), so the cached value matches what a live read produces (same set through the same toProvisioningGroup map) -- no spurious diff. A copy is stored so later mutation of the bean's set does not leak into the cache. An empty/blank owner set records "no owners" (no attribute values), matching a live read of an owner-less group. No-op when the group was not captured (sync-back off for this read, or an id-less group).- Parameters:
targetGroupId- the Azure group id (target_group_id)ownerIds- the group's owner ids as resolved from the /owners read (may be empty/null)
-
captureGroupJsonFromCurrentProvisioner
public static void captureGroupJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode groupNode) Capture an Azure 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 an Azure one. Called from the commands seam (GrouperAzureApiCommands.retrieveAzureGroups/retrieveGroupsHelper) for every group read. -
captureUserJsonFromCurrentProvisioner
public static void captureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode userNode) Capture an Azure 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 an Azure one. Called from the commands seam (GrouperAzureApiCommands.retrieveAzureUsers/retrieveUsersHelper). -
captureMembershipsForGroupFromCurrentProvisioner
public static void captureMembershipsForGroupFromCurrentProvisioner(String targetGroupId, Collection<String> targetUserIds) Record group-to-user memberships against the current provisioner's sync, using already-resolved Azure target ids. -
captureGroupOwnersFromCurrentProvisioner
public static void captureGroupOwnersFromCurrentProvisioner(String targetGroupId, Set<String> ownerIds) Fold a group's resolved owner id set into its already-captured native group (as the multi-valuedgroupOwnersattribute) against the current provisioner's sync. No-op if there's no current provisioner or the active provisioner isn't an Azure one. Called from the owners seam (GrouperAzureApiCommands.retrieveGroupOwnersHelper2) once per group after its /owners read. SeecaptureGroupOwners(String, Set)for why owners live on the group, not in memberships. -
captureMembershipInsertFromCurrentProvisioner
public static void captureMembershipInsertFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful Azure membership add against the current provisioner: record(groupTargetId, userTargetId)in the native membership map. No-op out of cycle or for a non-Azure provisioner (the underlying record call is itself guarded by isLoadMembershipsToGenericGrouperTable()). -
captureMembershipDeleteFromCurrentProvisioner
public static void captureMembershipDeleteFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful Azure membership remove against the current provisioner: drop(groupTargetId, userTargetId)from the native membership map so the end-of-run flush deletes its grouper_prov_mship row. No-op out of cycle or for a non-Azure provisioner.
-