Hi Nipuni,

On Wed, Aug 13, 2014 at 10:52 AM, Nipuni Perera <[email protected]> wrote:

> Hi,
>
> I am working on issue[1]. According to the existing implementation the
> constant "LDAPConstants.USER_CONTEXT_NAME" has been used in several places
> to build OrganizationalSubContextAttribute. If the tenant-mgt.xml is
> updated to read value of property "OrganizationalSubContextAttribute" as
> follows, (current implementation reads only "ou" value: <Property
> name="OrganizationalSubContextAttribute">ou</Property> )
>
>                       <Property
> name="OrganizationalSubContextAttribute">ou=users</Property>
>

Better to have it as a separate property rather than having it as part of
OrganizationSubContextAttribute. You can introduce a new property for the
value only. Otherwise it looks odd and half complete like.

>
>
> Implementation should updated as below,
>
>    1. CommonHybridLDAPTenantManager.java[3] (line 177),
>    CommonLDAPRealmConfigBuilder.java[2] (line 120) and
>    FileSystemRealmConfigBuilder.java[4] (line 123) should updated accordingly.
>    Is this a proper solution? Is there a limited set of values that can be set
>    to OrganizationalSubContextAttribute?
>    2. It seems line 161 of [3] should read the value
>    "PROPERTY_ORGANIZATIONAL_ATTRIBUTE" instead of "
>    PROPERTY_ORG_SUB_CONTEXT_ATTRIBUTE". This works fine as the default
>    configuration set values of both properties to "ou"
>
>  eg: current tenant-mgt.xml contains properties below;
>
>            <Property name="OrganizationalAttribute">ou</Property>
>            <Property
> name="OrganizationalSubContextObjectClass">organizationalUnit</Property>
>            <Property name="OrganizationalSubContextAttribute">ou</Property>
>
> Thus the correction should be to change,
>
> String organizationNameAttribute = tenantMgtConfig.
> getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.
> PROPERTY_ORG_SUB_CONTEXT_ATTRIBUTE);
>
> to
>
> String organizationNameAttribute = tenantMgtConfig.
> getTenantStoreProperties().get( UserCoreConstants.TenantMgtConfig.
> PROPERTY_ORGANIZATIONAL_ATTRIBUTE);
>

This fix is correct.


>
> [1] https://wso2.org/jira/browse/CARBON-14863
> [2]
> https://github.com/wso2-dev/carbon4-kernel/blob/master/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/config/multitenancy/CommonLDAPRealmConfigBuilder.java
> [3]
> https://github.com/wso2-dev/carbon4-kernel/blob/master/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/tenant/CommonHybridLDAPTenantManager.java
> [4]
> https://github.com/wso2-dev/carbon4-kernel/blob/master/core/org.wso2.carbon.user.core/src/main/java/org/wso2/carbon/user/core/config/multitenancy/FileSystemRealmConfigBuilder.java
>
> Thanks,
> Nipuni
> --
> Nipuni Perera
> Software Engineer; WSO2 Inc.; http://wso2.com
> Email: [email protected]
> Git hub profile: https://github.com/nipuni
> Mobile: +94 (71) 5626680
> <http://wso2.com>
>
>


-- 
Thanks & Regards,

*Johann Dilantha Nallathamby*
Associate Technical Lead & Product Lead of WSO2 Identity Server
Integration Technologies Team
WSO2, Inc.
lean.enterprise.middleware

Mobile - *+94777776950*
Blog - *http://nallaa.wordpress.com <http://nallaa.wordpress.com>*
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to