GitHub user reminia opened a pull request: https://github.com/apache/zeppelin/pull/2466
[ZEPPELIN-2731] GetUserList with JDBCRealm should read field authenti⦠â¦cationQuery ### What is this PR for? GetUserList with JDBCRealm should read field authenticationQuery but not DEFAULT_AUTHENTICATION_QUERY, or it will assume that the query must be "select password from users where username = ?" ### What type of PR is it? [Bug Fix] ### Todos None ### What is the Jira issue? * https://issues.apache.org/jira/projects/ZEPPELIN/issues/ZEPPELIN-2731 ### How should this be tested? 1. In shiro.ini config the JDBCRealm like: ds = org.apache.commons.dbcp2.BasicDataSource ds.driverClassName = com.mysql.jdbc.Driver ds.url= jdbc:mysql://localhost:3306/shiro ds.username = root ds.password = 123456 jdbcRealm = org.apache.shiro.realm.jdbc.JdbcRealm jdbcRealm.dataSource = $ds jdbcRealm.permissionsLookupEnabled = false jdbcRealm.authenticationQuery = SELECT password FROM user WHERE name = ? jdbcRealm.userRolesQuery = SELECT role_name FROM user_roles WHERE name = ? jdbcRealm.permissionsQuery = SELECT permission FROM roles_permissions WHERE role_name = ? 2. login and request the rest Get /security/userlist/youruser ### Screenshots (if appropriate) ### 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/reminia/zeppelin zeppelin-2731 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/zeppelin/pull/2466.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 #2466 ---- commit 84b3fded3ae95817c410b8ed1cdc061e853a6d02 Author: lichenyang <licheny...@cmss.chinamobile.com> Date: 2017-07-06T04:36:55Z [ZEPPELIN-2731] GetUserList with JDBCRealm should read field authenticationQuery ---- --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---