ZEPPELIN-797: Shiro authentication dialog does not appear#824
ZEPPELIN-797: Shiro authentication dialog does not appear#824prabhjyotsingh wants to merge 3 commits intoapache:masterfrom
Conversation
|
Have removed IniShiroFilter as it is deprecated, instead of that set shiroConfigLocations as InitParameter. |
2838c7f to
f7c3bc5
Compare
| cxfContext.addFilter(org.apache.shiro.web.servlet.ShiroFilter.class, "/*", | ||
| FilterHolder shiroFilter = new FilterHolder(ShiroFilter.class); | ||
| shiroFilter.setInitParameter("shiroConfigLocations", "file:../" | ||
| + conf.getConfDir() + "/shiro.ini"); |
There was a problem hiding this comment.
conf.getConfDir() can be either relative path or absolute path. So in case of absolute path, it might not work as expected.
How about add one method in ZeppelinConfiguration to get path of shiro.ini, such as getShiroPath()? similar to https://github.com/apache/incubator-zeppelin/blob/master/zeppelin-zengine/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java#L345
And then new File(conf.getShiroPath()).toURI().toString() will get uri string that work for both relative and absolute path.
And then i guess commit 0bca7e8 can be removed
There was a problem hiding this comment.
Thanks a lot @Leemoonsoo, I was struggling to make it work.
f7c3bc5 to
24a8e54
Compare
|
CI green, ready for review. |
|
Looks good to me. |
|
Great news! |
|
@prabhjyotsingh Could you try merge this PR using dev/merge_zeppelin_pr.py ? To use this script, you'll need to add remote such as For the detail, open the script with text editor and see how it works. |
### What is this PR for? Shiro authentication dialog does not appear This is with reference with shiro authentication dialog not showing up on the mail thread. https://mail-archives.apache.org/mod_mbox/incubator-zeppelin-users/201603.mbox/%3CCALf24sbx9tY-hSXR7zhGXuAirWujn20Sc9CoZnLBmeBt_NbhDwmail.gmail.com%3E ### What type of PR is it? Bug Fix ### Todos * [x] - add ServletContextHandler filter for IniShiroFilter ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-797 ### How should this be tested? Run zeppelin-server from `zeppelin-distribution/target/zeppelin-0.6.0-incubating-SNAPSHOT/zeppelin-0.6.0-incubating-SNAPSHOT/` It should honour the `shiro.ini` located inside `zeppelin-distribution/target/zeppelin-0.6.0-incubating-SNAPSHOT/zeppelin-0.6.0-incubating-SNAPSHOT/conf/` ### Screenshots (if appropriate) N/A ### 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 apache#824 from prabhjyotsingh/ZEPPELIN-797 and squashes the following commits: 24a8e54 [Prabhjyot Singh] get shiro path from conf.getShiroPath() 8d0704a [Prabhjyot Singh] remove IniShiroFilter as it is depricated a82a9c8 [Prabhjyot Singh] ZEPPELIN-797: Shiro authentication dialog does not appear
What is this PR for?
Shiro authentication dialog does not appear
This is with reference with shiro authentication dialog not showing up on the mail thread.
https://mail-archives.apache.org/mod_mbox/incubator-zeppelin-users/201603.mbox/%3CCALf24sbx9tY-hSXR7zhGXuAirWujn20Sc9CoZnLBmeBt_NbhDw@mail.gmail.com%3E
What type of PR is it?
Bug Fix
Todos
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-797
How should this be tested?
Run zeppelin-server from
zeppelin-distribution/target/zeppelin-0.6.0-incubating-SNAPSHOT/zeppelin-0.6.0-incubating-SNAPSHOT/It should honour the
shiro.inilocated insidezeppelin-distribution/target/zeppelin-0.6.0-incubating-SNAPSHOT/zeppelin-0.6.0-incubating-SNAPSHOT/conf/Screenshots (if appropriate)
N/A
Questions: