Bug 739039

Summary: Unicode chars - username and password only work with english chars
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Zuzana Krejčová <zkrejcov>
Component: BRM (Guvnor)Assignee: manstis
Status: NEW --- QA Contact: Lukáš Petrovický <lpetrovi>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: BRMS 5.2.0-ER1CC: jlocker, lpetrovi
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Zuzana Krejčová 2011-09-16 11:34:20 UTC
Description of problem:
Both username and password are not recognized if they contain unicode language specific characters like japanese character "ザ" or czech character "ř".


Version-Release number of selected component (if applicable):
Version 5.2.0.BRMS.ER3


How reproducible:
I'm using /server/[type]/conf/props/brms-users.properties with mappings: "user=čřž" and "ěščřžýáíé=admin". Neither of those users can log in. "Incorrect username or password." message is shown to the user and 
"ERROR [SecurityServiceImpl] Unable to login.
javax.security.auth.login.FailedLoginException: Password Incorrect/Password Required
	at org.jboss.security.auth.spi.UsernamePasswordLoginModule.login(UsernamePasswordLoginModule.java:252)
	at org.jboss.security.auth.spi.UsersRolesLoginModule.login(UsersRolesLoginModule.java:152)
..." is in the server log.


Additional info:

Comment 1 Jiri Locker 2011-09-23 13:32:12 UTC
When using the default authentication mechanism with <server>conf/props/brms-users.properties it is possible to create Unicode user/password mappings using Unicode escape sequences (http://download.oracle.com/javase/tutorial/i18n/text/convertintro.html).

So, for user 'jiříček' with password 'heslíčko', you add this entry

> ji\u0159\u00ed\u010dek=hesl\u00ed\u010dko

Works with Japanese characters as well.

Comment 2 Zuzana Krejčová 2011-09-26 09:29:49 UTC
(In reply to comment #1)
> When using the default authentication mechanism with
> <server>conf/props/brms-users.properties it is possible to create Unicode
> user/password mappings using Unicode escape sequences
> (http://download.oracle.com/javase/tutorial/i18n/text/convertintro.html).
> 
> So, for user 'jiříček' with password 'heslíčko', you add this entry
> 
> > ji\u0159\u00ed\u010dek=hesl\u00ed\u010dko
> 
> Works with Japanese characters as well.

Good to know it can be done. Although, as a customer, I'd really hate to have to do that - search for all the character codes - instead of simply writing what I want.

As a side note - I verified my file's encoding, it is UTF-8. I still think it would be good to look at this issue.