Class DefaultSyncConfig.Authorizable
- java.lang.Object
-
- org.apache.jackrabbit.oak.spi.security.authentication.external.basic.DefaultSyncConfig.Authorizable
-
- Direct Known Subclasses:
DefaultSyncConfig.Group
,DefaultSyncConfig.User
- Enclosing class:
- DefaultSyncConfig
public abstract static class DefaultSyncConfig.Authorizable extends java.lang.Object
Base config class for users and groups
-
-
Constructor Summary
Constructors Constructor Description Authorizable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.util.Set<java.lang.String>
getAutoMembership()
Returns the values configured withsetAutoMembership(String...)
.@NotNull java.util.Set<java.lang.String>
getAutoMembership(Authorizable authorizable)
Defines the set of group ids a synchronized external user/group is automatically member of.@NotNull AutoMembershipConfig
getAutoMembershipConfig()
Gets theAutoMembershipConfig
that applies to this configuration.long
getExpirationTime()
Returns the duration in milliseconds until a synced authorizable gets expired.@NotNull java.lang.String
getPathPrefix()
Defines the authorizables intermediate path prefix that is used when creating new authorizables.@NotNull java.util.Map<java.lang.String,java.lang.String>
getPropertyMapping()
Defines the mapping of internal property names from external values.boolean
isApplyRFC7613UsernameCaseMapped()
Returns true if new AuthorizableIDs will be normalized according to the UsernameCaseMapped profile defined in RFC7613DefaultSyncConfig.Authorizable
setApplyRFC7613UsernameCaseMapped(boolean applyRFC7613UsernameCaseMapped)
Set to true if new AuthorizableIDs shall be normalized according to the UsernameCaseMapped profile defined in RFC7613.@NotNull DefaultSyncConfig.Authorizable
setAutoMembership(@NotNull java.lang.String... autoMembership)
Sets the auto membership.@NotNull DefaultSyncConfig.Authorizable
setAutoMembershipConfig(@NotNull AutoMembershipConfig autoMembershipConfig)
Sets theAutoMembershipConfiguration
that applies to this configuration.@NotNull DefaultSyncConfig.Authorizable
setExpirationTime(long expirationTime)
Sets the expiration time.@NotNull DefaultSyncConfig.Authorizable
setPathPrefix(@NotNull java.lang.String pathPrefix)
Sets the path prefix.@NotNull DefaultSyncConfig.Authorizable
setPropertyMapping(@NotNull java.util.Map<java.lang.String,java.lang.String> propertyMapping)
Sets the property mapping.
-
-
-
Method Detail
-
getExpirationTime
public long getExpirationTime()
Returns the duration in milliseconds until a synced authorizable gets expired. An expired authorizable will be re-synced.- Returns:
- the expiration time in milliseconds.
-
setExpirationTime
@NotNull public @NotNull DefaultSyncConfig.Authorizable setExpirationTime(long expirationTime)
Sets the expiration time.- Parameters:
expirationTime
- time in milliseconds.- Returns:
this
- See Also:
getExpirationTime()
-
isApplyRFC7613UsernameCaseMapped
public boolean isApplyRFC7613UsernameCaseMapped()
Returns true if new AuthorizableIDs will be normalized according to the UsernameCaseMapped profile defined in RFC7613- Returns:
- true if new AuthorizableIDs will be normalized.
-
setApplyRFC7613UsernameCaseMapped
public DefaultSyncConfig.Authorizable setApplyRFC7613UsernameCaseMapped(boolean applyRFC7613UsernameCaseMapped)
Set to true if new AuthorizableIDs shall be normalized according to the UsernameCaseMapped profile defined in RFC7613.- Parameters:
applyRFC7613UsernameCaseMapped
- true if the UsernameCaseMapped profile shall be used for normalization.- Returns:
this
- See Also:
isApplyRFC7613UsernameCaseMapped()
-
getAutoMembership
@NotNull public @NotNull java.util.Set<java.lang.String> getAutoMembership()
Returns the values configured withsetAutoMembership(String...)
. Note that this method only takes group names into account that have been configured usingsetAutoMembership(String...)
. In order to take advantage of the conditional auto-membership as defined withsetAutoMembershipConfig(AutoMembershipConfig)
, usegetAutoMembership(org.apache.jackrabbit.api.security.user.Authorizable)
instead.- Returns:
- set of group names as defined with
setAutoMembership(String...)
-
setAutoMembership
@NotNull public @NotNull DefaultSyncConfig.Authorizable setAutoMembership(@NotNull @NotNull java.lang.String... autoMembership)
Sets the auto membership. Note that the passed group names will be trimmed and empty string values will be ignored (along withnull
values).- Parameters:
autoMembership
- the membership- Returns:
this
- See Also:
getAutoMembership()
-
getAutoMembershipConfig
@NotNull public @NotNull AutoMembershipConfig getAutoMembershipConfig()
Gets theAutoMembershipConfig
that applies to this configuration.
-
setAutoMembershipConfig
@NotNull public @NotNull DefaultSyncConfig.Authorizable setAutoMembershipConfig(@NotNull @NotNull AutoMembershipConfig autoMembershipConfig)
Sets theAutoMembershipConfiguration
that applies to this configuration.- Returns:
this
- See Also:
getAutoMembershipConfig()
,getAutoMembership(org.apache.jackrabbit.api.security.user.Authorizable)
-
getAutoMembership
@NotNull public @NotNull java.util.Set<java.lang.String> getAutoMembership(@NotNull Authorizable authorizable)
Defines the set of group ids a synchronized external user/group is automatically member of. In contrast togetAutoMembership()
this method respects both values configured withsetAutoMembership(String...)
and withsetAutoMembershipConfig(AutoMembershipConfig)
.- Returns:
- set of group ids.
-
getPropertyMapping
@NotNull public @NotNull java.util.Map<java.lang.String,java.lang.String> getPropertyMapping()
Defines the mapping of internal property names from external values. Only the external properties defined as keys of this map are synced with the mapped internal properties. note that the property names can be relative paths. the intermediate nodes will be created accordingly. Example:
The implicit properties like userid, groupname, password must not be mapped.{ "rep:fullname": "cn", "country", "c", "profile/email": "mail", "profile/givenName": "cn" }
- Returns:
- the property mapping where the keys are the local property names and the values the external ones.
-
setPropertyMapping
@NotNull public @NotNull DefaultSyncConfig.Authorizable setPropertyMapping(@NotNull @NotNull java.util.Map<java.lang.String,java.lang.String> propertyMapping)
Sets the property mapping.- Parameters:
propertyMapping
- the mapping- Returns:
this
- See Also:
getPropertyMapping()
-
getPathPrefix
@NotNull public @NotNull java.lang.String getPathPrefix()
Defines the authorizables intermediate path prefix that is used when creating new authorizables. This prefix is always prepended to the path provided by theExternalIdentity
.- Returns:
- the intermediate path prefix.
-
setPathPrefix
@NotNull public @NotNull DefaultSyncConfig.Authorizable setPathPrefix(@NotNull @NotNull java.lang.String pathPrefix)
Sets the path prefix.- Parameters:
pathPrefix
- the path prefix.- Returns:
this
- See Also:
getPathPrefix()
-
-