GitHub user VipinRathor reopened a pull request:

    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?
    ### 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:
    <img width="596" alt="screen shot 2018-04-12 at 3 33 01 am" 
    * Notice the converted username post login:
    <img width="806" alt="screen shot 2018-04-12 at 3 33 43 am" 
    ### 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 ZEPPELIN-3312

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

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 <v.rathor@...>
Date:   2018-04-12T10:23:04Z

    Add support to force username case conversion

commit 38337297e6e7c80f2a776f8fbdeabe5b5fe06f59
Author: VipinRathor <v.rathor@...>
Date:   2018-04-12T10:52:41Z

    Merge branch 'master' into ZEPPELIN-3312



Reply via email to