Repository: incubator-zeppelin Updated Branches: refs/heads/master 1ba0f55b9 -> 57555f5ba
ZEPPELIN-837: Bring Bootstrap user auth dialog back ### What is this PR for? There were hotfix https://github.com/apache/incubator-zeppelin/pull/870 that encourage user use basic auth dialog instead of bootstrap auth dialog. This issue will address bringing bootstrap auth dialog back. ### What type of PR is it? [Bug Fix] ### Todos * [x] - bringing bootstrap auth dialog back * [x] - have a session timeout (optional) ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-837 ### How should this be tested? At the end of shiro.ini file #/** = anon /** = authc Bootstrap user auth dialog should work as expected ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? no * Is there breaking changes for older versions? no * Does this needs documentation? no Author: Prabhjyot Singh <[email protected]> Closes #874 from prabhjyotsingh/ZEPPELIN-837 and squashes the following commits: 593909b [Prabhjyot Singh] Bring Bootstrap user auth dialog back Project: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/commit/57555f5b Tree: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/tree/57555f5b Diff: http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/diff/57555f5b Branch: refs/heads/master Commit: 57555f5ba16dd8109942513181d1330e9958744e Parents: 1ba0f55 Author: Prabhjyot Singh <[email protected]> Authored: Thu May 5 12:53:35 2016 +0530 Committer: Prabhjyot Singh <[email protected]> Committed: Tue May 10 10:42:51 2016 +0530 ---------------------------------------------------------------------- conf/shiro.ini | 6 +++++- .../main/java/org/apache/zeppelin/server/ZeppelinServer.java | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/57555f5b/conf/shiro.ini ---------------------------------------------------------------------- diff --git a/conf/shiro.ini b/conf/shiro.ini index a118df3..61ee964 100644 --- a/conf/shiro.ini +++ b/conf/shiro.ini @@ -29,6 +29,10 @@ user3 = password4, role2 #ldapRealm.userDnTemplate = cn={0},cn=engg,ou=testdomain,dc=testdomain,dc=com #ldapRealm.contextFactory.url = ldap://ldaphost:389 #ldapRealm.contextFactory.authenticationMechanism = SIMPLE +sessionManager = org.apache.shiro.web.session.mgt.DefaultWebSessionManager +securityManager.sessionManager = $sessionManager +# 86,400,000 milliseconds = 24 hour +securityManager.sessionManager.globalSessionTimeout = 86400000 shiro.loginUrl = /api/login [urls] @@ -37,4 +41,4 @@ shiro.loginUrl = /api/login # To enfore security, comment the line below and uncomment the next one /api/version = anon /** = anon -#/** = authcBasic +#/** = authc http://git-wip-us.apache.org/repos/asf/incubator-zeppelin/blob/57555f5b/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java ---------------------------------------------------------------------- diff --git a/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java b/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java index f03fbeb..1730457 100644 --- a/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java +++ b/zeppelin-server/src/main/java/org/apache/zeppelin/server/ZeppelinServer.java @@ -238,7 +238,7 @@ public class ZeppelinServer extends Application { webapp.setInitParameter("shiroConfigLocations", new File(conf.getShiroPath()).toURI().toString()); - webapp.addFilter(org.apache.shiro.web.servlet.ShiroFilter.class, "/*", + webapp.addFilter(org.apache.shiro.web.servlet.ShiroFilter.class, "/api/*", EnumSet.allOf(DispatcherType.class)); webapp.addEventListener(new org.apache.shiro.web.env.EnvironmentLoaderListener());
