Hi Omindu,

Properties like retry interval and maximum retries are not standard LDAP
connection initialization properties. We have to plug those functionalities
externally. IMO, only standard LDAP connection initialization properties
should have to be included at the datasource level.

Thanks,
Chanaka.

On Mon, May 9, 2016 at 6:49 PM, Omindu Rathnaweera <[email protected]> wrote:

> What will be the ideal place to include properties like retry interval and
> maximum retries ? At the datasource level or the user-store configs level ?
>
> Regards,
> Omindu.
>
> On Thu, May 5, 2016 at 11:09 AM, Chanaka Cooray <[email protected]> wrote:
>
>> Hi all,
>>
>> We are in the process of adding LDAP connection support
>> to carbon-datasources [1]. In c4, all the LDAP connection initialization
>> properties and user store properties are managed in user-mgt.xml. Refer
>> the ReadWriteLDAPUserStoreManager in user-mgt.xml[2]. So the purpose of
>> this is to separate out connection initialization details and manage them
>> in carbon-datasource[1].
>>
>> In LDAP, all the connection handling, operations are done using a
>> DirContext [3]. But we have to create a DirContext every time when we have
>> to do a LDAP operation. So we can not register a single instance of
>> DirContext using JNDI. So according to the last discussion, we thought of
>> registering a bean which includes LDAP connection initialization details
>> instead of registering a connection source. So if someone wants to create a
>> LDAP connection, they can get that bean using JNDI and create the LDAP
>> Connection source using that bean.
>>
>> [1] https://github.com/wso2/carbon-datasources
>> [2]
>> https://github.com/wso2/carbon-kernel/blob/4.4.x/distribution/kernel/carbon-home/repository/conf/user-mgt.xml
>> [3]
>> https://docs.oracle.com/javase/7/docs/api/javax/naming/directory/DirContext.html
>>
>> Here are the connection parameters.
>>
>>
>>    -
>>
>>    Connection initialization properties
>>
>>
>>
>> <Property name="ConnectionURL">
>> <Property name="ConnectionName">
>> <Property name="ConnectionPassword">
>> <Property name="LDAPConnectionTimeout">
>>
>> <Property name="ReadTimeout"/>
>>
>>
>>
>>    -
>>
>>    DNS related properties
>>
>>
>> <Property name=”URLOfDNS”>
>>
>> <Property name=”DNSDomainName”>
>>
>>
>>
>>    -
>>
>>    Connection pooling properties
>>
>>
>> <Property name = "com.sun.jndi.ldap.connect.pool.authentication"”>
>>
>> <Property name = "com.sun.jndi.ldap.connect.pool.debug">
>>
>> <Property name = "com.sun.jndi.ldap.connect.pool.initsize">
>>
>> <Property name = "com.sun.jndi.ldap.connect.pool.prefsize">
>>
>> <Property name = “com.sun.jndi.ldap.connect.pool.protocol">
>>
>> <Property name = "com.sun.jndi.ldap.connect.pool.timeout">
>>
>> <Property name = "com.sun.jndi.ldap.connect.pool.maxsize">
>>
>>
>>
>>    -
>>
>>    Additional Properties
>>
>>
>> <Property name = “java.naming.ldap.attributes.binary”>
>>
>> <Property name = “Referral”>
>>
>> <Property name = “java.naming.security.authentication”>
>>
>>
>> Thanks,
>>
>> Chanaka.
>> --
>> Chanaka Cooray
>> Software Engineer, WSO2 Inc. http://wso2.com
>> Email: [email protected]
>> Mobile: +94713149860
>>
>>
>> _______________________________________________
>> Architecture mailing list
>> [email protected]
>> https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture
>>
>>
>
>
> --
> Omindu Rathnaweera
> Software Engineer, WSO2 Inc.
> Mobile: +94 771 197 211
>



-- 
Chanaka Cooray
Software Engineer, WSO2 Inc. http://wso2.com
Email: [email protected]
Mobile: +94713149860
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to