public class DynamicSyncContext extends DefaultSyncContext
DefaultSyncContext that doesn't synchronize group
membership of new external users into the user management of the repository.
Instead it will only synchronize the principal names up to the configured depths.
In combination with the a dedicated PrincipalConfiguration this allows
to benefit from the repository's authorization model (which is solely
based on principals) i.e. full compatibility with the default approach without
the complication of synchronizing user management information into the repository,
when user management is effectively take care of by the third party system.
With the DefaultSyncHandler
this feature can be turned on using
DefaultSyncConfig.User.setDynamicMembership(boolean)
Note: users and groups that have been synchronized before the dynamic membership
feature has been enabled will continue to be synchronized in the default way
and this context doesn't take effect.config, forceGroupSync, forceUserSync, idp, keepMissing, now, nowValue, REP_EXTERNAL_ID, REP_LAST_SYNCED, userManager, valueFactory| Constructor and Description |
|---|
DynamicSyncContext(DefaultSyncConfig config,
ExternalIdentityProvider idp,
UserManager userManager,
ValueFactory valueFactory) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
applyMembership(Authorizable member,
Set<String> groups)
Ensures that the given authorizable is member of the specific groups.
|
SyncResult |
sync(ExternalIdentity identity)
Synchronizes an external identity with the repository based on the respective configuration.
|
protected void |
syncMembership(ExternalIdentity external,
Authorizable auth,
long depth)
Recursively sync the memberships of an authorizable up-to the specified depth.
|
close, createGroup, createSyncedIdentity, createUser, createValue, createValues, getAuthorizable, getIdentityRef, isExpired, isForceGroupSync, isForceUserSync, isKeepMissing, isSameIDP, isSameIDP, joinPaths, setForceGroupSync, setForceUserSync, setKeepMissing, sync, syncGroup, syncProperties, syncUserpublic DynamicSyncContext(@Nonnull DefaultSyncConfig config, @Nonnull ExternalIdentityProvider idp, @Nonnull UserManager userManager, @Nonnull ValueFactory valueFactory)
@Nonnull public SyncResult sync(@Nonnull ExternalIdentity identity) throws SyncException
DefaultSyncContextsync in interface SyncContextsync in class DefaultSyncContextidentity - the identity to sync.SyncException - if an error occurrsprotected void syncMembership(@Nonnull ExternalIdentity external, @Nonnull Authorizable auth, long depth) throws RepositoryException
DefaultSyncContextsyncMembership in class DefaultSyncContextexternal - the external identityauth - the authorizabledepth - recursion depth.RepositoryExceptionprotected void applyMembership(@Nonnull Authorizable member, @Nonnull Set<String> groups) throws RepositoryException
DefaultSyncContextapplyMembership in class DefaultSyncContextmember - the authorizablegroups - set of groups.RepositoryExceptionCopyright © 2012-2018 The Apache Software Foundation. All Rights Reserved.