Hi Pirinthapan
I guess what we need to do is create the final user name as following

<user defined user name>_<hash code of applicaiton key + "_" + tenant
domain>

So this won't support by OOTB in SS.

@Dimuthu : Is it OK if we add another service to RSSAdmin service to create
a application specific database user? WDYT?


Thanks & Regards
Danushka Fernando
Software Engineer
WSO2 inc. http://wso2.com/
Mobile : +94716332729

On Wed, Jun 3, 2015 at 12:05 PM, Rajeevan Vimalanathan <rajeev...@wso2.com>
wrote:

> Hi Pirinthapan,
>
> Since the user name is not unique at the tenant domain (but it should be
> unique at application domain), can't we simply use the following pattern to
> the verification of user name?
>
> <user defined user name>_<base64 encoding of the application key>
>
> I hope this should resolve your issue.
>
> Thanks,
> Rajeevan
>
> On Wed, Jun 3, 2015 at 11:52 AM, Pirinthapan Mahendran <
> pirintha...@wso2.com> wrote:
>
>> Hi all,
>>
>> In App Factory, the database users are application local. That means if
>> we create a database user under one application its not visible to another
>> application even within the same tenant. So if we try to create a user with
>> the same name in different applications within same tenant, we are getting
>> 'user already exists exception'.
>>
>> This is because the RSSAdmin service only allows to create the user with
>> the same name in different tenants. Not within same tenant.
>>
>> To overcome this issue I tried to append the base64 encoding of the
>> application key to the user name in template layer level. This also failing
>> because of the following reason.
>>
>> By default mysql user name length is limited to 16 characters. In the
>> current implementation of App Factory, we have allocated these 16
>> characters in the following pattern.
>>
>> <user defined user name>_<hash code of tenant domain>
>>
>> 1. First 7 characters for the user name, provided by the user. (Limited
>> this to 7 characters in UI level)
>> 2. 8th character is for the connector '_'.
>> 3. last 8 characters for the base64 encoding of the hash code of tenant
>> domain (this is created by 'carbon-storage-management' component).
>>
>> I kindly expect your thoughts to overcome this issue.
>>
>> Thanks & Regards.
>> Mahendran Pirinthapan
>> Software Engineer | WSO2 Inc.
>> Mobile +94772378732.
>>
>> _______________________________________________
>> Dev mailing list
>> Dev@wso2.org
>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>
>>
>
>
> --
>
> Vimalanathan Rajeevan
> Software Engineer
> WSO2 Inc.:http://wso2.com
> lean.enterprise.middleware
>
>
> Mobile : +94 773090875
>
> _______________________________________________
> Dev mailing list
> Dev@wso2.org
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>
_______________________________________________
Dev mailing list
Dev@wso2.org
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to