Hi Lahiru,

I think in general it is okay to add user names with @ mark even when email
username is, I'm not sure if it will be different in your use case. As I
have mentioned in my previous reply, we can use such names by adding tenant
domain at the end of the user name. In management console, when adding
users with @ sign, we don't have to add @tenantDomain at the end, because
if you logged into management console as 'admin' you are already in super
tenant. But when registering to store this is not the case, since you are
not in any tenant yet, you'll have to mention tenant domain also. I have
tested these scenarios in IS 5.1.0 and they are working perfectly fine. But
we need to document this properly to make sure that a user who allows user
names with @ sign will follow this procedure properly.

I don't think changing java regex will do any good here. It is configurable
and when some one using GReg, he will most probably change such stuff which
are configurable. So IMO,  it does not matter what are the default
configuration we add in the product.

Thank You!

On Wed, Feb 24, 2016 at 9:01 AM, Lahiru J Ekanayake <[email protected]>
wrote:

> Hi Darshana,
>
> The Jira is about the carbon store login. That issue has solved from
> jaggery side. Apart from the jira, If we use current GREG 5.1.0 pack, we
> can add a new user from management console side with user name containing @
> mark. But it should not allow to add user names with @ mark without
> enabling the email user name. I was able restrict user names with @ mark by
> changing regex to :
>
>
> *<Property name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property> *
> I'm not sure this is the best way to do this. Can you please advice.
>
> Regards
>
> On Tue, Feb 23, 2016 at 9:56 PM, Darshana Gunawardana <[email protected]>
> wrote:
>
>> Hi Lahiru,
>>
>> What is the problem of having @ character? and how it does get solved
>> changing user-mgt.xml?
>>
>> I don't see the root issue we trying to solve here and it the approach we
>> are working here is wrong. ie. changing a default regex in user-mgt.xml
>> should not be a solution here.
>>
>> Thanks,
>>
>> On Tue, Feb 23, 2016 at 3:00 AM, Godwin Shrimal <[email protected]> wrote:
>>
>>> Hi Lahiru,
>>>
>>> user-mgt.xml come from carbon kernel, you can find it under
>>> <carbon-kernel-home>/distribution/kernel/carbon-home/repository/conf
>>>
>>>
>>> Thanks
>>> Godwin
>>>
>>>
>>> On Tue, Feb 23, 2016 at 12:37 PM, Lahiru J Ekanayake <[email protected]>
>>> wrote:
>>>
>>>> Hi all,
>>>>
>>>> if we can update user-mgt.xml file from ,  *<Property
>>>> name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property> *we can
>>>> solve that  issue (adding an user name with @ mark).
>>>>
>>>> *Current problem is * from where this *user-mgt.xml* comes into our
>>>> product. ? Can anyone help with this ?
>>>>
>>>> Regards
>>>>
>>>>
>>>>
>>>> On Fri, Feb 19, 2016 at 10:18 PM, Chamila Wijayarathna <
>>>> [email protected]> wrote:
>>>>
>>>>> [Adding Thanuja]
>>>>>
>>>>> Hi Lahiru,
>>>>>
>>>>> I recently had a discussion about this with Thanuja. When you don't
>>>>> have enabled emailUserName, still you should be able to use '@' in user
>>>>> names. But in that case, you have to mention user name in places (eg-:
>>>>> login) as [email protected]. I guess in your jira also, you
>>>>> should be able to add user to store if you add @tenant_domain to the end 
>>>>> of
>>>>> your username.
>>>>>
>>>>> Can you please check like that and update the thread?
>>>>>
>>>>> Thank You!
>>>>>
>>>>>
>>>>> On Fri, Feb 19, 2016 at 7:51 PM, Lahiru J Ekanayake <[email protected]>
>>>>> wrote:
>>>>>
>>>>>> Hi,
>>>>>>
>>>>>> im working on this JIRRA https://wso2.org/jira/browse/REGISTRY-3249.
>>>>>> While working on this i was able to identify , admin user can add users ,
>>>>>> containing @ mark in user name *(Without enable EnableEmailUserName
>>>>>> from carbon.xml)* such as* [email protected] <[email protected]>.* I was
>>>>>> tested with GREG,ES,APIM also. I have able to identify that is problem 
>>>>>> with
>>>>>> the regex . GREG,ES,APIM has following property in *user-mgt.xml . *
>>>>>>
>>>>>> *<Property
>>>>>> name="UsernameJavaRegEx">^[^~!#$;%^*+={}\\|\\\\&lt;&gt;,\'\"]{3,30}$</Property>*
>>>>>>
>>>>>> If we change that into  *<Property
>>>>>> name="UsernameJavaRegEx">[a-zA-Z0-9._-|//]{3,30}$</Property> *Problem
>>>>>> can solve.
>>>>>>
>>>>>> Current problem is : from where this user-mgt.xml comes into product.
>>>>>> I have checked with product-greg, carbon-kernal,carbon-indentity. Those
>>>>>> user-mgt.xml's content are different. Currently im trying to modify
>>>>>> user-mgt.xml for *GREG.*
>>>>>>
>>>>>>
>>>>>> Regards
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>>
>>>>>>
>>>>>> *Lahiru J Ekanayake**Software Engineer*
>>>>>> Mobile : +94 (0) 77 8812629 / +94(0) 778509547
>>>>>> Email : [email protected]
>>>>>> WSO2, Inc.; http://wso2.com/
>>>>>> lean . enterprise . middleware.
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> *Chamila Dilshan Wijayarathna,*
>>>>> Software Engineer
>>>>> Mobile:(+94)788193620
>>>>> WSO2 Inc., http://wso2.com/
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>>
>>>>
>>>> *Lahiru J Ekanayake**Software Engineer*
>>>> Mobile : +94 (0) 77 8812629 / +94(0) 778509547
>>>> Email : [email protected]
>>>> WSO2, Inc.; http://wso2.com/
>>>> lean . enterprise . middleware.
>>>>
>>>>
>>>> _______________________________________________
>>>> Dev mailing list
>>>> [email protected]
>>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>>
>>>>
>>>
>>>
>>> --
>>> *Godwin Amila Shrimal*
>>> Senior Software Engineer
>>> WSO2 Inc.; http://wso2.com
>>> lean.enterprise.middleware
>>>
>>> mobile: *+94772264165*
>>> linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>*
>>> twitter: https://twitter.com/godwinamila
>>>
>>> _______________________________________________
>>> Dev mailing list
>>> [email protected]
>>> http://wso2.org/cgi-bin/mailman/listinfo/dev
>>>
>>>
>>
>>
>> --
>> Regards,
>>
>>
>> *Darshana Gunawardana*Senior Software Engineer
>> WSO2 Inc.; http://wso2.com
>>
>> *E-mail: [email protected] <[email protected]>*
>> *Mobile: +94718566859 <%2B94718566859>*Lean . Enterprise . Middleware
>>
>
>
>
> --
>
>
>
> *Lahiru J Ekanayake**Software Engineer*
> Mobile : +94 (0) 77 8812629 / +94(0) 778509547
> Email : [email protected]
> WSO2, Inc.; http://wso2.com/
> lean . enterprise . middleware.
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
*Chamila Dilshan Wijayarathna,*
Software Engineer
Mobile:(+94)788193620
WSO2 Inc., http://wso2.com/
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to