Suchit gupta created ZEPPELIN-5182:
--------------------------------------

             Summary: Zeppelin authentication with JDBC realm is not working
                 Key: ZEPPELIN-5182
                 URL: https://issues.apache.org/jira/browse/ZEPPELIN-5182
             Project: Zeppelin
          Issue Type: Bug
          Components: docker, Kubernetes, security
            Reporter: Suchit gupta


Hi Team,

I have been trying to set up zeppelin with authentication with Shiro JDBC 
realm. After all my attempts, I have not been able to get it working. The basic 
authentication works but with JDBC realm it fails.

 

The zeppelin server was created following the doc: 
[http://zeppelin.apache.org/docs/0.9.0/quickstart/kubernetes.html]

 

The POD is working.

 

I enabled the Shiro by extending the docker image. My Dockerfile:

 
{code:java}
ARG ZEPPELIN_IMAGE=apache/zeppelin:0.9.0
FROM ${ZEPPELIN_IMAGE}
#https://hub.docker.com/r/apache/zeppelin/dockerfile


WORKDIR ${Z_HOME}

ADD /zeppelin/shiro.ini ${Z_HOME}/conf/

ADD 
https://repo1.maven.org/maven2/mysql/mysql-connector-java/6.0.4/mysql-connector-java-6.0.4.jar
 ${Z_HOME}/lib/
ENV CLASSPATH=${Z_HOME}/lib/mysql-connector-java-6.0.4.jar:${CLASSPATH}

ENTRYPOINT [ "/usr/bin/tini", "--" ]
WORKDIR ${Z_HOME}
CMD ["bin/zeppelin.sh"]
{code}
 

My shiro.ini taken from 
https://gist.github.com/adamjshook/6c42b03fdb09b60cd519174d0aec1af5
{code:java}
[main]
ds = com.mysql.jdbc.jdbc2.optional.MysqlDataSource
ds.serverName = localhost
ds.databaseName = zeppelin
ds.user = zeppelin
ds.password = zeppelin
jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm
jdbcRealmCredentialsMatcher = 
org.apache.shiro.authc.credential.Sha256CredentialsMatcher
jdbcRealm.credentialsMatcher = $jdbcRealmCredentialsMatcher
ps = org.apache.shiro.authc.credential.DefaultPasswordService
pm = org.apache.shiro.authc.credential.PasswordMatcher
pm.passwordService = $ps
jdbcRealm.dataSource = $ds
jdbcRealm.credentialsMatcher = $pm
shiro.loginUrl = /api/login
[urls]/** = authc
{code}
Now, when I deploy the zeppelin server, I get:
{code:java}
Unable to instantiate class [com.mysql.jdbc.jdbc2.optional.MysqlDataSource] for 
object named 'ds'.  Please ensure you've specified the fully qualified class 
name correctly.
{code}
Not sure why it is failing even I have defined the jar file on classpath.

 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to