[ZEPPELIN-1164] ZeppelinHub Realm#1173
[ZEPPELIN-1164] ZeppelinHub Realm#1173anthonycorbacho wants to merge 9 commits intoapache:masterfrom anthonycorbacho:feat/ZeppelinHubAuthentication
Conversation
| public ZeppelinHubRealm() { | ||
| super(); | ||
| LOG.debug("Init ZeppelinhubRealm"); | ||
| //TODO(anthonyc): think about more setting for this HTTP client. eg: if user use proxy etcetc... |
There was a problem hiding this comment.
may need to address line length here, build fails with
ZeppelinHubRealm.java[68] (sizes) LineLength: Line is longer than 100 characters (found 101).
|
build failed on |
|
all green |
| // eg: if user uses proxy etcetc... | ||
| httpClient = new HttpClient(); | ||
| gson = new Gson(); | ||
| name = getClass().getName() + "_" + INSTANCE_COUNT.getAndIncrement(); |
There was a problem hiding this comment.
one question, why we have INSTANCE_COUNT here and how name is used?
There was a problem hiding this comment.
its a shiro specific needs for unique name.
|
It looks good. one thing is that it should be documented as well so that others may implement their own authentication/authorization realms with their server. do you want to add it as a part of this PR or do it later? |
|
@khalidhuseynov i think it make sense to do it in this PR. |
This Realm will let users login with they ZeppelinHub credentials.
…ng StringUtils::isBlank instead of checking only null.
|
@khalidhuseynov @AhyoungRyu 5a27871 for documentation |
| If you want to grant this permission to other users, you can change **roles[ ]** as you defined at `[users]` section. | ||
|
|
||
| <br/> | ||
| > **NOTE :** All of the above configurations are defined in the `conf/shiro.ini` file. This documentation is originally from [SECURITY-README.md](https://github.com/apache/zeppelin/blob/master/SECURITY-README.md). |
There was a problem hiding this comment.
Is there any particular reason to remove this sentence?
"All of the above configurations are defined in the conf/shiro.ini file."
There was a problem hiding this comment.
IDK its after doing my rebase. should i bring it back?
There was a problem hiding this comment.
i think it exists in master, so may need to bring it back. @AhyoungRyu as original author may check it
There was a problem hiding this comment.
Just pushed the fix, @AhyoungRyu sorry about that.
There was a problem hiding this comment.
@anthonycorbacho It's fine :) @khalidhuseynov thanks for your explanation!
|
LGTM |
|
LGTM 👍 |
|
merging if no more discussion |
|
@anthonycorbacho I've tried to merge this PR into master and branch-0.6. I've succeeded to merge it into master but failed doing into branch-0.6. Is it OK? |
|
@jongyoul sure, no problemo |
### What is this PR for? Add a new Shiro Realm that lets users authenticate in Apache Zeppelin using their ZeppelinHub credentials. ### What type of PR is it? `Feature` ### Todos * [x] - Create ZeppelinHub Realm that extends `AuthorizingRealm`. * [x] - Update `shiro.ini` file and add ZeppelinHub configuration template. * [x] - Add documentation ### What is the Jira issue? [Issue 1164](https://issues.apache.org/jira/browse/ZEPPELIN-1164) ### How should this be tested? - Assuming that you already have an account [Zeppelinhub](https://www.zeppelinhub.com/register), edit `conf/shiro.ini` file and uncomment ZeppelinHub related configuration. - Start your Zeppelin - Login with your ZeppelinHub credentials. ### Screenshots (if appropriate) ### Questions: * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? YES Author: Anthony Corbacho <corbacho.anthony@gmail.com> Closes apache#1173 from anthonycorbacho/feat/ZeppelinHubAuthentication and squashes the following commits: 63b06c6 [Anthony Corbacho] Fix rebase mistake in documentation 0f16344 [Anthony Corbacho] Fix typo in documentation 5a27871 [Anthony Corbacho] Add Documentation about ZeppelinHub Realm configuration 8347fa9 [Anthony Corbacho] Handle long line > 100 char 9bf96ba [Anthony Corbacho] Remove author tag... 64154d4 [Anthony Corbacho] Add more method comments. c207b5e [Anthony Corbacho] Change check of token.getUsername() in doGetAuthenticationInfo by using StringUtils::isBlank instead of checking only null. 38683e1 [Anthony Corbacho] Add new setting in Shiri.ini to handle ZeppelinHub realm. 34a8e5e [Anthony Corbacho] Create new Apache Shiro Realm for ZeppelinHub
Add a new Shiro Realm that lets users authenticate in Apache Zeppelin using their ZeppelinHub credentials. `Feature` * [x] - Create ZeppelinHub Realm that extends `AuthorizingRealm`. * [x] - Update `shiro.ini` file and add ZeppelinHub configuration template. * [x] - Add documentation [Issue 1164](https://issues.apache.org/jira/browse/ZEPPELIN-1164) - Assuming that you already have an account [Zeppelinhub](https://www.zeppelinhub.com/register), edit `conf/shiro.ini` file and uncomment ZeppelinHub related configuration. - Start your Zeppelin - Login with your ZeppelinHub credentials. * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? YES Author: Anthony Corbacho <corbacho.anthony@gmail.com> Closes apache#1173 from anthonycorbacho/feat/ZeppelinHubAuthentication and squashes the following commits: 63b06c6 [Anthony Corbacho] Fix rebase mistake in documentation 0f16344 [Anthony Corbacho] Fix typo in documentation 5a27871 [Anthony Corbacho] Add Documentation about ZeppelinHub Realm configuration 8347fa9 [Anthony Corbacho] Handle long line > 100 char 9bf96ba [Anthony Corbacho] Remove author tag... 64154d4 [Anthony Corbacho] Add more method comments. c207b5e [Anthony Corbacho] Change check of token.getUsername() in doGetAuthenticationInfo by using StringUtils::isBlank instead of checking only null. 38683e1 [Anthony Corbacho] Add new setting in Shiri.ini to handle ZeppelinHub realm. 34a8e5e [Anthony Corbacho] Create new Apache Shiro Realm for ZeppelinHub
Just a backport of #1173 Author: Anthony Corbacho <corbacho.anthony@gmail.com> Closes #1344 from bzz/branch-0.6-add-realm and squashes the following commits: fbf8615 [Anthony Corbacho] [ZEPPELIN-1164] ZeppelinHub Realm
Add a new Shiro Realm that lets users authenticate in Apache Zeppelin using their ZeppelinHub credentials. `Feature` * [x] - Create ZeppelinHub Realm that extends `AuthorizingRealm`. * [x] - Update `shiro.ini` file and add ZeppelinHub configuration template. * [x] - Add documentation [Issue 1164](https://issues.apache.org/jira/browse/ZEPPELIN-1164) - Assuming that you already have an account [Zeppelinhub](https://www.zeppelinhub.com/register), edit `conf/shiro.ini` file and uncomment ZeppelinHub related configuration. - Start your Zeppelin - Login with your ZeppelinHub credentials. * Does the licenses files need update? No * Is there breaking changes for older versions? No * Does this needs documentation? YES Author: Anthony Corbacho <corbacho.anthony@gmail.com> Closes #1173 from anthonycorbacho/feat/ZeppelinHubAuthentication and squashes the following commits: 63b06c6 [Anthony Corbacho] Fix rebase mistake in documentation 0f16344 [Anthony Corbacho] Fix typo in documentation 5a27871 [Anthony Corbacho] Add Documentation about ZeppelinHub Realm configuration 8347fa9 [Anthony Corbacho] Handle long line > 100 char 9bf96ba [Anthony Corbacho] Remove author tag... 64154d4 [Anthony Corbacho] Add more method comments. c207b5e [Anthony Corbacho] Change check of token.getUsername() in doGetAuthenticationInfo by using StringUtils::isBlank instead of checking only null. 38683e1 [Anthony Corbacho] Add new setting in Shiri.ini to handle ZeppelinHub realm. 34a8e5e [Anthony Corbacho] Create new Apache Shiro Realm for ZeppelinHub (cherry picked from commit e6f51e7) Signed-off-by: Mina Lee <minalee@apache.org> Conflicts: docs/security/shiroauthentication.md
What is this PR for?
Add a new Shiro Realm that lets users authenticate in Apache Zeppelin using their ZeppelinHub credentials.
What type of PR is it?
FeatureTodos
AuthorizingRealm.shiro.inifile and add ZeppelinHub configuration template.What is the Jira issue?
Issue 1164
How should this be tested?
conf/shiro.inifile and uncomment ZeppelinHub related configuration.Screenshots (if appropriate)
Questions: