Skip to content

ZEPPELIN-797: Shiro authentication dialog does not appear#824

Closed
prabhjyotsingh wants to merge 3 commits intoapache:masterfrom
prabhjyotsingh:ZEPPELIN-797
Closed

ZEPPELIN-797: Shiro authentication dialog does not appear#824
prabhjyotsingh wants to merge 3 commits intoapache:masterfrom
prabhjyotsingh:ZEPPELIN-797

Conversation

@prabhjyotsingh
Copy link
Copy Markdown
Contributor

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

  • - 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

@prabhjyotsingh
Copy link
Copy Markdown
Contributor Author

Have removed IniShiroFilter as it is deprecated, instead of that set shiroConfigLocations as InitParameter.

@prabhjyotsingh prabhjyotsingh force-pushed the ZEPPELIN-797 branch 5 times, most recently from 2838c7f to f7c3bc5 Compare April 7, 2016 23:42
cxfContext.addFilter(org.apache.shiro.web.servlet.ShiroFilter.class, "/*",
FilterHolder shiroFilter = new FilterHolder(ShiroFilter.class);
shiroFilter.setInitParameter("shiroConfigLocations", "file:../"
+ conf.getConfDir() + "/shiro.ini");
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot @Leemoonsoo, I was struggling to make it work.

@prabhjyotsingh
Copy link
Copy Markdown
Contributor Author

CI green, ready for review.

@Leemoonsoo
Copy link
Copy Markdown
Member

Looks good to me.

@syepes
Copy link
Copy Markdown
Contributor

syepes commented Apr 8, 2016

Great news!

@Leemoonsoo
Copy link
Copy Markdown
Member

@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

git remote add apache https://git-wip-us.apache.org/repos/asf/incubator-zeppelin
git remote add apache-github https://github.com/apache/incubator-zeppelin.git

For the detail, open the script with text editor and see how it works.

@asfgit asfgit closed this in 02a042b Apr 9, 2016
@prabhjyotsingh prabhjyotsingh deleted the ZEPPELIN-797 branch May 2, 2016 04:53
onkarshedge pushed a commit to onkarshedge/incubator-zeppelin that referenced this pull request May 11, 2016
### 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants