[GitHub] zeppelin pull request #2923: ZEPPELIN-3312 Add option to convert username to...

2018-04-22 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/zeppelin/pull/2923


---


[GitHub] zeppelin pull request #2923: ZEPPELIN-3312 Add option to convert username to...

2018-04-12 Thread VipinRathor
GitHub user VipinRathor reopened a pull request:

https://github.com/apache/zeppelin/pull/2923

ZEPPELIN-3312 Add option to convert username to lower case

### What is this PR for?
This PR introduces a new configuration property to convert username to 
lower case. This is useful when the users (from external sources like AD/LDAP) 
are coming in with mixed-case names and Hadoop services (like Hive) can't 
authorize them correctly because Hadoop services recognize users only in lower 
case (like Linux). 

Adding a new config option "zeppelin.username.force.lowercase" to handle 
such scenarios.

Behavior without this PR:
Access is denied to CaMel case user while running a Hive paragraph

Behavior with this PR:
User is allowed to run query when proposed configuration set to true.
By default, keeping zeppelin.username.force.lowercase=false to retain the 
current behavior.

### What type of PR is it?
[Bug Fix]

### Todos
* [ ] - Unit test

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-3312

### How should this be tested?
* Travis CI should pass
* Manual steps to test:
1. Configure Zeppelin with Active Directory authentication
2. Login to Zeppelin as a CaMel case user
3. Try to run a simple JDBC note with a Hive query (like a select * query). 
This would fail with "user [CaMel] does not have proper privileges to [USE] 
operation" error message.
4. Now set zeppelin.username.force.lowercase=true in custom 
zeppelin-site.xml configuration.
5. Once again, login as CaMel case user. This time the same Hive query 
would run as expected. Because the username is now passed in lower case.
6. Also notice that after successful login, the login username (in the 
top-right corner) will be in lower case too.

### Screenshots (if appropriate)
* Login as CaMel case user:
https://user-images.githubusercontent.com/15668387/38672744-faf00f8e-3e03-11e8-86b2-cc5981d380d2.png";>
* Notice the converted username post login:
https://user-images.githubusercontent.com/15668387/38672777-108c7b66-3e04-11e8-8c97-467b4b73fe3d.png";>

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/VipinRathor/zeppelin ZEPPELIN-3312

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zeppelin/pull/2923.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2923


commit 1a8b2d94eb449d7fac10f852e3af81e44d3a5e76
Author: Vipin Rathor 
Date:   2018-04-12T10:23:04Z

Add support to force username case conversion

commit 38337297e6e7c80f2a776f8fbdeabe5b5fe06f59
Author: VipinRathor 
Date:   2018-04-12T10:52:41Z

Merge branch 'master' into ZEPPELIN-3312




---


[GitHub] zeppelin pull request #2923: ZEPPELIN-3312 Add option to convert username to...

2018-04-12 Thread VipinRathor
Github user VipinRathor closed the pull request at:

https://github.com/apache/zeppelin/pull/2923


---


[GitHub] zeppelin pull request #2923: ZEPPELIN-3312 Add option to convert username to...

2018-04-12 Thread VipinRathor
GitHub user VipinRathor opened a pull request:

https://github.com/apache/zeppelin/pull/2923

ZEPPELIN-3312 Add option to convert username to lower case

### What is this PR for?
This PR introduces a new configuration property to convert username to 
lower case. This is useful when the users (from external sources like AD/LDAP) 
are coming in with mixed-case names and Hadoop services (like Hive) can't 
authorize them correctly because Hadoop services recognize users only in lower 
case (like Linux). 

Adding a new config option "zeppelin.username.force.lowercase" to handle 
such scenarios.

Behavior without this PR:
Access is denied to CaMel case user while running a Hive paragraph

Behavior with this PR:
User is allowed to run query when proposed configuration set to true.
By default, keeping zeppelin.username.force.lowercase=false to retain the 
current behavior.

### What type of PR is it?
[Bug Fix]

### Todos
* [ ] - Unit test

### What is the Jira issue?
* https://issues.apache.org/jira/browse/ZEPPELIN-3312

### How should this be tested?
* Travis CI should pass
* Manual steps to test:
1. Configure Zeppelin with Active Directory authentication
2. Login to Zeppelin as a CaMel case user
3. Try to run a simple JDBC note with a Hive query (like a select * query). 
This would fail with "user [CaMel] does not have proper privileges to [USE] 
operation" error message.
4. Now set zeppelin.username.force.lowercase=true in custom 
zeppelin-site.xml configuration.
5. Once again, login as CaMel case user. This time the same Hive query 
would run as expected. Because the username is now passed in lower case.
6. Also notice that after successful login, the login username (in the 
top-right corner) will be in lower case too.

### Screenshots (if appropriate)
* Login as CaMel case user:
https://user-images.githubusercontent.com/15668387/38672744-faf00f8e-3e03-11e8-86b2-cc5981d380d2.png";>
* Notice the converted username post login:
https://user-images.githubusercontent.com/15668387/38672777-108c7b66-3e04-11e8-8c97-467b4b73fe3d.png";>

### Questions:
* Does the licenses files need update? No
* Is there breaking changes for older versions? No
* Does this needs documentation? No


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/VipinRathor/zeppelin ZEPPELIN-3312

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/zeppelin/pull/2923.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #2923


commit 1a8b2d94eb449d7fac10f852e3af81e44d3a5e76
Author: Vipin Rathor 
Date:   2018-04-12T10:23:04Z

Add support to force username case conversion




---