| | |
| | | * configuration. See |
| | | * {@link Rest2LDAP#configureConnectionFactory(JsonValue)} for a |
| | | * detailed specification of the JSON configuration. |
| | | * |
| | | * |
| | | * @param configuration |
| | | * The JSON configuration. |
| | | * @return A reference to this builder. |
| | |
| | | * configuration. The caller is still required to set the connection |
| | | * factory. The configuration should look like this, excluding the |
| | | * C-like comments: |
| | | * |
| | | * |
| | | * <pre> |
| | | * { |
| | | * // The base DN beneath which LDAP entries are to be found. |
| | | * "baseDN" : "ou=people,dc=example,dc=com", |
| | | * |
| | | * |
| | | * // The mechanism which should be used for read resources during updates, must be |
| | | * // one of "disabled", "controls", or "search". |
| | | * "readOnUpdatePolicy" : "controls", |
| | | * |
| | | * |
| | | * // Additional LDAP attributes which should be included with entries during add (create) operations. |
| | | * "additionalLDAPAttributes" : [ |
| | | * { |
| | |
| | | * ] |
| | | * } |
| | | * ], |
| | | * |
| | | * |
| | | * // The strategy which should be used for deriving LDAP entry names from JSON resources. |
| | | * "namingStrategy" : { |
| | | * // Option 1) the RDN and resource ID are both derived from a single user attribute in the entry. |
| | | * "strategy" : "clientDNNaming", |
| | | * "dnAttribute" : "uid" |
| | | * |
| | | * |
| | | * // Option 2) the RDN and resource ID are derived from separate user attributes in the entry. |
| | | * "strategy" : "clientNaming", |
| | | * "dnAttribute" : "uid", |
| | | * "idAttribute" : "mail" |
| | | * |
| | | * |
| | | * // Option 3) the RDN and is derived from a user attribute and the resource ID from an operational |
| | | * // attribute in the entry. |
| | | * "strategy" : "serverNaming", |
| | | * "dnAttribute" : "uid", |
| | | * "idAttribute" : "entryUUID" |
| | | * }, |
| | | * |
| | | * |
| | | * // The attribute which will be used for performing MVCC. |
| | | * "etagAttribute" : "etag", |
| | | * |
| | | * |
| | | * // The JSON to LDAP attribute mappings. |
| | | * "attributes" : { |
| | | * "schemas" : { "constant" : [ "urn:scim:schemas:core:1.0" ] }, |
| | |
| | | * }, |
| | | * "manager" : { "reference" : { |
| | | * "ldapAttribute" : "manager", |
| | | * "mapping" : { "object" : { |
| | | * "mapper" : { "object" : { |
| | | * "id" : { "simple" : { "ldapAttribute" : "uid", "isSingleValued" : true } }, |
| | | * "displayName" : { "simple" : { "ldapAttribute" : "cn", "isSingleValued" : true } } |
| | | * } } |
| | |
| | | * } |
| | | * } |
| | | * </pre> |
| | | * |
| | | * |
| | | * @param configuration |
| | | * The JSON configuration. |
| | | * @return A reference to this builder. |
| | |
| | | /** |
| | | * Sets the policy which should be used in order to read an entry before |
| | | * it is deleted, or after it is added or modified. |
| | | * |
| | | * |
| | | * @param policy |
| | | * The policy which should be used in order to read an entry |
| | | * before it is deleted, or after it is added or modified. |
| | |
| | | /** |
| | | * Sets the schema which should be used when attribute types and |
| | | * controls. |
| | | * |
| | | * |
| | | * @param schema |
| | | * The schema which should be used when attribute types and |
| | | * controls. |
| | |
| | | /** |
| | | * Creates a new connection factory using the provided JSON configuration. |
| | | * The configuration should look like this, excluding the C-like comments: |
| | | * |
| | | * |
| | | * <pre> |
| | | * { |
| | | * // The primary data center, must contain at least one LDAP server. |
| | |
| | | * "port" : 389 |
| | | * }, |
| | | * ], |
| | | * |
| | | * |
| | | * // The optional secondary (fail-over) data center. |
| | | * "secondaryLDAPServers" : [ |
| | | * { |
| | |
| | | * "port" : 389 |
| | | * }, |
| | | * ], |
| | | * |
| | | * |
| | | * // Connection pool configuration. |
| | | * "connectionPoolSize" : 10, |
| | | * "heartBeatIntervalSeconds" : 30, |
| | | * |
| | | * |
| | | * // SSL/TLS configuration (optional and TBD). |
| | | * "useSSL" : { |
| | | * // Elect to use StartTLS instead of SSL. |
| | | * "useStartTLS" : true, |
| | | * ... |
| | | * }, |
| | | * |
| | | * |
| | | * // Authentication configuration (optional and TBD). |
| | | * "authentication" : { |
| | | * "bindDN" : "cn=directory manager", |
| | |
| | | * }, |
| | | * } |
| | | * </pre> |
| | | * |
| | | * |
| | | * @param configuration |
| | | * The JSON configuration. |
| | | * @return A new connection factory using the provided JSON configuration. |