Felix created ZEPPELIN-3332:
-------------------------------

             Summary: Zeppelin login fails with NPE if 
ldapRealm.authorizationEnabled is not set true
                 Key: ZEPPELIN-3332
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-3332
             Project: Zeppelin
          Issue Type: Bug
          Components: security
    Affects Versions: 0.8.0
            Reporter: Felix


NPE is caused due the return value of org.apache.zeppelin.realm.LdapRealm 
method queryForAuthorizationInfo is null if authorizationEnabled = false (false 
is the default)
 
The null is not correctly handled by org.apache.zeppelin.utils.SecurityUtils 
and the login attempt always fails with:
 
 
{noformat}
Caused by: java.lang.NullPointerException
at org.apache.zeppelin.utils.SecurityUtils.getRoles(SecurityUtils.java:144) 
at org.apache.zeppelin.rest.LoginRestApi.postLogin(LoginRestApi.java:82) 
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at 
org.apache.cxf.service.invoker.AbstractInvoker.performInvocation(AbstractInvoker.java:180)
at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:96)
... 50 more{noformat}
 
Even when the authentication was successful and authorizationEnabled=false we 
are not able to login to the zeppelin ui. 
 
Issue was introduced by pull [https://github.com/apache/zeppelin/pull/2498]



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to