Package oracle.iam.ldapsync.api
Interface CommonNamePolicy
public interface CommonNamePolicy
- Author:
- aseth This is an interface that must be implemented by the policies used for commonname generation.
-
Method Summary
Modifier and TypeMethodDescriptiongetCommonNameFromPolicy
(Map<String, Object> userData) This API returns an auto-generated common name as per the policy.getDescription
(Locale locale) This API returns the description of the default policy configured in the system property - XL.DefaultCommonNamePolicyImpl.boolean
isCommonNameValid
(String commonName, Map<String, Object> reqData) Validates if the common name is as per the policy.
-
Method Details
-
getCommonNameFromPolicy
This API returns an auto-generated common name as per the policy.- Parameters:
userData
- a map of user data containing all user attributes, like First Name, Last Name, act_key, etc. We need all attributes. As for checking if the CN already exists in LDAP, we need to evaluate the container rules. These rules could be based on any user attributes.- Returns:
- the auto generated common name based on the policy configured in the system property - XL.DefaultCommonNamePolicyImpl
- Throws:
CommonNameGenerationException
-
isCommonNameValid
Validates if the common name is as per the policy. To validate, it again requires the user data - first name, last name, act_key, etc. If this is null, it will only validate if user exists (in ldap, if configured, under default container) or is reserved in OIM DB.- Parameters:
commonName
- the commonName which is to be validated whether it conforms to policy or not.reqData
- a map of user data containing basic user info - first name, last name, middle name, email, locale. Based on the policy, the applicable attributes will be picked.- Returns:
- true if commonName is valid
-
getDescription
This API returns the description of the default policy configured in the system property - XL.DefaultCommonNamePolicyImpl. The translated description will be returned.- Parameters:
locale
- the description returned will be translated as per this locale.- Returns:
- the translated description about the default common name generation policy.
-