Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Not A Problem
-
None
-
None
-
None
Description
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:
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"]
My shiro.ini taken from https://gist.github.com/adamjshook/6c42b03fdb09b60cd519174d0aec1af5
[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
Now, when I deploy the zeppelin server, I get:
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.
Not sure why it is failing even I have defined the jar file on classpath.