Skip to content

[ZEPPELIN-1164] ZeppelinHub Realm#1173

Closed
anthonycorbacho wants to merge 9 commits intoapache:masterfrom
anthonycorbacho:feat/ZeppelinHubAuthentication
Closed

[ZEPPELIN-1164] ZeppelinHub Realm#1173
anthonycorbacho wants to merge 9 commits intoapache:masterfrom
anthonycorbacho:feat/ZeppelinHubAuthentication

Conversation

@anthonycorbacho
Copy link
Contributor

@anthonycorbacho anthonycorbacho commented Jul 13, 2016

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

  • - Create ZeppelinHub Realm that extends AuthorizingRealm.
  • - Update shiro.ini file and add ZeppelinHub configuration template.
  • - Add documentation

What is the Jira issue?

Issue 1164

How should this be tested?

  • Assuming that you already have an account Zeppelinhub, 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

@anthonycorbacho anthonycorbacho changed the title ZeppelinHub Realm [ZEPPELIN-1164] ZeppelinHub Realm Jul 13, 2016
public ZeppelinHubRealm() {
super();
LOG.debug("Init ZeppelinhubRealm");
//TODO(anthonyc): think about more setting for this HTTP client. eg: if user use proxy etcetc...
Copy link
Member

@khalidhuseynov khalidhuseynov Jul 13, 2016

Choose a reason for hiding this comment

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

may need to address line length here, build fails with

ZeppelinHubRealm.java[68] (sizes) LineLength: Line is longer than 100 characters (found 101).

@khalidhuseynov
Copy link
Member

build failed on zeppelin-web, which is not relevant. can we still re-trigger CI here?

@anthonycorbacho
Copy link
Contributor Author

all green

// eg: if user uses proxy etcetc...
httpClient = new HttpClient();
gson = new Gson();
name = getClass().getName() + "_" + INSTANCE_COUNT.getAndIncrement();
Copy link
Member

Choose a reason for hiding this comment

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

one question, why we have INSTANCE_COUNT here and how name is used?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

its a shiro specific needs for unique name.

@khalidhuseynov
Copy link
Member

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?

@anthonycorbacho
Copy link
Contributor Author

@khalidhuseynov i think it make sense to do it in this PR.

@anthonycorbacho
Copy link
Contributor Author

@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).
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there any particular reason to remove this sentence?

"All of the above configurations are defined in the conf/shiro.ini file."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

IDK its after doing my rebase. should i bring it back?

Copy link
Member

Choose a reason for hiding this comment

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

i think it exists in master, so may need to bring it back. @AhyoungRyu as original author may check it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just pushed the fix, @AhyoungRyu sorry about that.

Copy link
Contributor

Choose a reason for hiding this comment

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

@anthonycorbacho It's fine :) @khalidhuseynov thanks for your explanation!

@khalidhuseynov
Copy link
Member

LGTM

@AhyoungRyu
Copy link
Contributor

LGTM 👍

@anthonycorbacho
Copy link
Contributor Author

merging if no more discussion

@asfgit asfgit closed this in e6f51e7 Aug 3, 2016
@jongyoul
Copy link
Member

jongyoul commented Aug 3, 2016

@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?

@anthonycorbacho
Copy link
Contributor Author

@jongyoul sure, no problemo
Thanks

@anthonycorbacho anthonycorbacho deleted the feat/ZeppelinHubAuthentication branch August 4, 2016 01:42
PhilippGrulich pushed a commit to SWC-SENSE/zeppelin that referenced this pull request Aug 8, 2016
### 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
bzz pushed a commit to bzz/incubator-zeppelin that referenced this pull request Aug 19, 2016
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
asfgit pushed a commit that referenced this pull request Aug 19, 2016
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
asfgit pushed a commit that referenced this pull request Aug 29, 2016
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
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.

4 participants