Class DropboxProvisioningTargetNativeSync
GrouperProvisioningTargetNativeSync: builds native target reporting beans
for sync-back to the generic grouper_prov_group / grouper_prov_user tables.
This mirrors TrueFoundryProvisioningTargetNativeSync. Both groups and
users are captured from the raw Dropbox JSON (via JSON-Pointer paths, like SCIM / Adobe /
Duo / TrueFoundry), hooked at the API-commands seam (DropboxApiCommands read methods such
as retrieveDropboxGroups / retrieveDropboxGroup for groups and
retrieveDropboxUsers / retrieveDropboxUser for users) where the per-object JSON
node is in scope. Capturing the raw JSON -- rather than the lossy DropboxGroup /
DropboxUser typed beans -- means an operator can capture any Dropbox field via
nativeAttributesGroups / nativeAttributesEntities with a name and optional
JSON-Pointer path, including fields the typed beans never model.
Dropbox JSON is uniform across endpoints (unlike TrueFoundry's team-vs-role nodes), so
the commands seam performs only an identity normalization (a defensive deep copy) before
handing the node here -- there is no field to alias and no groupType to synthesize. Every
default / pointer below is therefore relative to the raw Dropbox node:
- groups: target id from
/group_id; default attributesname(from/group_name) andexternalId(from/group_external_id, the Grouper match key). - users: target id from
/profile/team_member_id(members/list_v2 and get_info_v2 both wrap the profile); default attributesemail(from/profile/email) andstatus(from/profile/status/.tag, a Dropbox union tag).
Memberships are mirrored to grouper_prov_mship via a single native membership map kept current
from two sources: every membership READ records "this membership exists" (via
captureMembershipInsertFromCurrentProvisioner(java.lang.String, java.lang.String), called from the membership-read seam in
DropboxApiCommands.retrieveDropboxGroupMemberships) so a full sync re-populates the map each
pass and the end-of-run global reconcile keeps the rows; and every successful WRITE adjusts it --
DropboxTargetDao calls the same insert dispatcher after a groups/members/add and
captureMembershipDeleteFromCurrentProvisioner(java.lang.String, java.lang.String) after a groups/members/remove -- so an
incremental add/remove adjusts grouper_prov_mship precisely with no read-lag.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildNativeGroupFromJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build a native group bean from the raw Dropbox group JSON.buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode memberNode) Build a native user bean from the raw Dropbox member JSON.voidcaptureGroupJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build + record a Dropbox group from its raw JSON.static voidcaptureGroupJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode groupNode) Capture a Dropbox group (from its raw JSON) against the current provisioner's sync.static voidcaptureMembershipDeleteFromCurrentProvisioner(String targetGroupId, String targetUserId) Write-track a successful Dropbox group-member REMOVE (groups/members/remove) against the current provisioner: drop(targetGroupId, targetUserId)from the native membership map so the end-of-run flush deletes its grouper_prov_mship row.static voidcaptureMembershipInsertFromCurrentProvisioner(String targetGroupId, String targetUserId) Record that a Dropbox group membership EXISTS: put(targetGroupId, targetUserId)in the native membership map so the end-of-run flush writes its grouper_prov_mship row.voidcaptureUserJson(com.fasterxml.jackson.databind.JsonNode memberNode) Build + record a Dropbox user from its raw JSON.static voidcaptureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode memberNode) Capture a Dropbox 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
-
DropboxProvisioningTargetNativeSync
public DropboxProvisioningTargetNativeSync()
-
-
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 Dropbox group JSON.targetIdis read from/group_id(the same fieldDropboxGroup.fromJsonreads); 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.- Parameters:
groupNode- a raw Dropbox group object- Returns:
- the native group bean, or null
-
buildNativeUserFromJson
public GrouperProvisioningTargetNativeUser buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode memberNode) Build a native user bean from the raw Dropbox member JSON.targetIdis read from/profile/team_member_id(the profile wrapper present on members/list_v2 and get_info_v2); 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 noteam_member_id.- Parameters:
memberNode- a raw Dropbox member object (with aprofilechild)- Returns:
- the native user bean, or null
-
captureGroupJson
public void captureGroupJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build + record a Dropbox group from its raw JSON. No-op when sync-back is off or the node is null / id-less.- Parameters:
groupNode- the raw Dropbox group node
-
captureUserJson
public void captureUserJson(com.fasterxml.jackson.databind.JsonNode memberNode) Build + record a Dropbox user from its raw JSON. No-op when sync-back is off or the node is null / id-less.- Parameters:
memberNode- the raw Dropbox member node
-
captureGroupJsonFromCurrentProvisioner
public static void captureGroupJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode groupNode) Capture a Dropbox group (from its raw JSON) against the current provisioner's sync. No-op if there is no current provisioner or the active provisioner is not a Dropbox one. Called from the commands seam for every group parsed from a read.- Parameters:
groupNode- the raw Dropbox group node
-
captureUserJsonFromCurrentProvisioner
public static void captureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode memberNode) Capture a Dropbox user (from its raw JSON) against the current provisioner's sync. No-op if there is no current provisioner or the active provisioner is not a Dropbox one. Called from the commands seam for every member parsed from a read.- Parameters:
memberNode- the raw Dropbox member node
-
captureMembershipInsertFromCurrentProvisioner
public static void captureMembershipInsertFromCurrentProvisioner(String targetGroupId, String targetUserId) Record that a Dropbox group membership EXISTS: put(targetGroupId, targetUserId)in the native membership map so the end-of-run flush writes its grouper_prov_mship row. No-op out of cycle, for a non-Dropbox provisioner, or when membership sync-back is off. Called both from the membership-read seam (DropboxApiCommands.retrieveDropboxGroupMemberships, to re-populate the map on a full sync) and fromDropboxTargetDao.insertMembershipsafter a successful add (so an incremental add adjusts sync-back immediately).- Parameters:
targetGroupId- the native group_idtargetUserId- the native team_member_id
-
captureMembershipDeleteFromCurrentProvisioner
public static void captureMembershipDeleteFromCurrentProvisioner(String targetGroupId, String targetUserId) Write-track a successful Dropbox group-member REMOVE (groups/members/remove) against the current provisioner: drop(targetGroupId, targetUserId)from the native membership map so the end-of-run flush deletes its grouper_prov_mship row. No-op out of cycle, for a non-Dropbox provisioner, or when membership sync-back is off. Called fromDropboxTargetDao.deleteMembershipsafter the remove succeeds.- Parameters:
targetGroupId- the native group_idtargetUserId- the native team_member_id
-