zeroflag opened a new pull request, #640:
URL: https://github.com/apache/knox/pull/640
## What changes were proposed in this pull request?
The `btoa` (third party) javascript functions can't base64 encode some of
the special characters such as the letter `ë`.
We use this function to create the basic authorization header. If user's
password contains an unsupported character the login will fail.
## How was this patch tested?
I tested the new funciton manully:
```
unicodeBase64Encode('árvíztűrő tükörfúrógép ë !#$%^&*()_!#@V')
'w6FydsOtenTFsXLFkSB0w7xrw7ZyZsO6csOzZ8OpcCDDqyAhIyQlXiYqKClfISNAVg=='
unicodeBase64Encode('阪熊奈岡鹿梨阜埼茨栃')
'6Ziq54aK5aWI5bKh6bm/5qKo6Zic5Z+86Iyo5qCD'
阪熊奈岡鹿梨阜埼茨栃
```
The I decoded the result I got back the original string.
The I changed sam's password in users.ldif:
```
# entry for sample user sam
dn: uid=sam,ou=people,dc=hadoop,dc=apache,dc=org
objectclass:top
objectclass:person
objectclass:organizationalPerson
objectclass:inetOrgPerson
cn: sam
sn: sam
uid: sam
userPassword: 阪熊奈岡鹿梨阜埼茨栃 árvíztűrő tükörfúrógép ë !#$%^&*()_!#@V
```
Unfortunately the demo ldap server could not parse this password because it
calls `Strings.toLowerCaseAscii(line)` on each line of the ldif file. After I
temporary removed the toLowerCase I was able to start the demo ldap with this
config.
I check the login on the knox ui using the knoxsso topology and I was able
to successfully login.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]