[ZEPPELIN-1210] Run interpreter per user#1265
[ZEPPELIN-1210] Run interpreter per user#1265jongyoul wants to merge 34 commits intoapache:masterfrom
Conversation
|
Quickly went through the changes, but not sure to get it. |
| # To use a different strategy (LDAP / Database / ...) check the shiro doc at http://shiro.apache.org/configuration.html#Configuration-INISections | ||
| admin = password | ||
| admin = password, admin | ||
| user1 = user1, role1 |
There was a problem hiding this comment.
I think you should revert this file.
There was a problem hiding this comment.
@prabhjyotsingh It's not affected actually because the default option for security is none. It would be affected if /** = authc is activated but there's no test for it.
|
@echarles For now, Zeppelin supports |
|
@jongyoul this looks very interesting! Could you plz help me to understand - does this changes mean for Zeepelin to run a new separate interpreter process for every user and schedulle only his jobs to be executed there? |
|
@jongyoul Does that mean the login user is the process owner ? Because it matters for security reason.
BTW, could you write a simple design doc, as the PR is pretty large, not easy to review without a design doc. |
|
@bzz If different users run a same interpreter with 'isolated', Zeppelin runs multiple process for that interpreters, and with 'scoped', Zeppelin runs a single process for it but the users feel like a separate process because Zeppelin interpreter use different class loader per user. For instance, if some users use SparkInterpreter with 'isolated' and 'scoped', all users look like running each SparkInterpreter. |
|
@zjffdu This is a first step for resolving security issues. For the next step, I'll pass some properties for identifying user. BTW, InterpreterContext includes user information, actually, thus it might not be a big change. :-) |
37183db to
3c2a04f
Compare
|
@jongyoul For example if there is a folder/table in HDFS/FileServer/Hive which user is trying to access he/she should not be able to access that unless he/she is authorized for the same. To enable this, while starting the spark-submit, Zepplein needs to ensure that it is started with the current user mode (the Shiro user). Regards, |
|
@sourav-mazumder 's suggestion is about another point of multiple user support, this is might not be a trivial task to implement in this PR. I think we have a discussion about the multiple-user support for zeppelin in the mail list recently. There's lots of works to do, I will create a umbrella ticket for that so that we can have a more clear whole picture of that. |
|
Create umbrella ticket for multiple user support. |
|
Merging if there's no more discussion |
|
@jongyoul Thanks for the great work. I tested this PR a bit and it works as expected. However, when i remove a Note, (with "perNote" checked), i think removal of Interpreter Process (isolated mode) or Interpreter Instance (scoped mode) related to that Note is expected. However this PR does not remove them. The same interpreter process/instance removal should happen when user unbind interpreter setting from Note. Could you check these cases? |
|
@Leemoonsoo Thanks for the review. I'll check that. |
7384ce3 to
f77edc9
Compare
2c0d69e to
2f1f6cb
Compare
|
@Leemoonsoo I've fixed it. Check it please. This is because remoteProcess doesn't destroy correctly. |
|
@jongyoul I don't see the |
|
It looks looks like a browser cache issue. Can you clean cache and try it On Friday, 2 September 2016, Jeff Zhang notifications@github.com wrote:
이종열, Jongyoul Lee, 李宗烈 |
|
Thanks @jongyoul after clean cache, I can see the |
Added fromMessage.principal to get right user
b6fd580 to
ad80951
Compare
|
Tested. |
|
@jongyoul my mistake, it works now. |
Fixed flaky test
|
@cloverhearts Thank you!! |
|
CI become green and @cloverhearts tested almost cases. Merging if there's no more discussion. |
### What is this PR for? Enabling each user to run same interpreter. ### What type of PR is it? [Improvement] ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1210 ### How should this be tested? 1. Enable shiro to use authentication mode 1. Check `per user` in your interpreter tab 1. Run different paragraphs with different users 1. Run `%spark sc.version`, you will see the two `res0: ...` in your paragraphs ### 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: CloverHearts <cloverheartsdev@gmail.com> Author: Jongyoul Lee <jongyoul@gmail.com> Closes apache#1265 from jongyoul/ZEPPELIN-1210 and squashes the following commits: 48a0d8e [Jongyoul Lee] Fixed ZEPPELIN-1542 Fixed flaky test e84703d [Jongyoul Lee] Fixed ZEPPELIN-1542 ad80951 [Jongyoul Lee] Fixed some wrong logic of getInterpreterInstanceKey cee39f4 [Jongyoul Lee] Fixed to pass shiro information to InterpreterFactory from ZeppelinServer 5e7da34 [Jongyoul Lee] Changed instanceKey and processKey for dealing with new UI d201950 [CloverHearts] fix eqeqeq issue for frontweb b18bff4 [CloverHearts] implement frontend for interpreter per user mode and misc mode 1f64e52 [CloverHearts] change default value for pernote and peruser 787a366 [CloverHearts] change Back-end test cases and member type (perNote, perUser) 8586e1f [CloverHearts] change ui for interpreter running Per x mode 0b5d671 [Jongyoul Lee] Fixed the style 960bde1 [Jongyoul Lee] Removed SecurityUtils.getPrincipal Added fromMessage.principal to get right user 01c7cf1 [Jongyoul Lee] Fixed NPE while testing ZeppelinSparkClusterTest 1fb50ab [Jongyoul Lee] Fixed NPE while testing ZeppelinSparkClusterTest d1c4344 [Jongyoul Lee] Fixed getEditorSetting for having users' info 12a27db [Jongyoul Lee] Fixed test after rebase 510942b [Jongyoul Lee] Fixed test after rebase cb66946 [Jongyoul Lee] Fixed test after rebase 18b39bd [Jongyoul Lee] Fixed test after rebase daa634f [Jongyoul Lee] Fixed some tests after rebase ed558be [Jongyoul Lee] Fixed some tests after rebase fa7fccb [Jongyoul Lee] Fixed destroying process of remoteInterpreterProcess 0a73241 [Jongyoul Lee] Fixed conflict while rebasing. df423d3 [Jongyoul Lee] Fixed NotebookRestApiTest b151366 [Jongyoul Lee] Fixed some codes after rebase a32afd7 [Jongyoul Lee] Fixed some tests 7b7eb78 [Jongyoul Lee] Fixed some tests 47cc668 [Jongyoul Lee] Fixed tests to use AuthenticationInfo 012cf99 [Jongyoul Lee] Fixed some mismatch after rebase 9a03d40 [Jongyoul Lee] Reverted some value to default ones 8589545 [Jongyoul Lee] Added option in UI ccbedc1 [Jongyoul Lee] WIP 94dfed2 [Jongyoul Lee] WIP 6480d1d [Jongyoul Lee] resolved conflicts
### What is this PR for? Enabling each user to run same interpreter. ### What type of PR is it? [Improvement] ### What is the Jira issue? https://issues.apache.org/jira/browse/ZEPPELIN-1210 ### How should this be tested? 1. Enable shiro to use authentication mode 1. Check `per user` in your interpreter tab 1. Run different paragraphs with different users 1. Run `%spark sc.version`, you will see the two `res0: ...` in your paragraphs ### 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: CloverHearts <cloverheartsdev@gmail.com> Author: Jongyoul Lee <jongyoul@gmail.com> Closes apache#1265 from jongyoul/ZEPPELIN-1210 and squashes the following commits: 48a0d8e [Jongyoul Lee] Fixed ZEPPELIN-1542 Fixed flaky test e84703d [Jongyoul Lee] Fixed ZEPPELIN-1542 ad80951 [Jongyoul Lee] Fixed some wrong logic of getInterpreterInstanceKey cee39f4 [Jongyoul Lee] Fixed to pass shiro information to InterpreterFactory from ZeppelinServer 5e7da34 [Jongyoul Lee] Changed instanceKey and processKey for dealing with new UI d201950 [CloverHearts] fix eqeqeq issue for frontweb b18bff4 [CloverHearts] implement frontend for interpreter per user mode and misc mode 1f64e52 [CloverHearts] change default value for pernote and peruser 787a366 [CloverHearts] change Back-end test cases and member type (perNote, perUser) 8586e1f [CloverHearts] change ui for interpreter running Per x mode 0b5d671 [Jongyoul Lee] Fixed the style 960bde1 [Jongyoul Lee] Removed SecurityUtils.getPrincipal Added fromMessage.principal to get right user 01c7cf1 [Jongyoul Lee] Fixed NPE while testing ZeppelinSparkClusterTest 1fb50ab [Jongyoul Lee] Fixed NPE while testing ZeppelinSparkClusterTest d1c4344 [Jongyoul Lee] Fixed getEditorSetting for having users' info 12a27db [Jongyoul Lee] Fixed test after rebase 510942b [Jongyoul Lee] Fixed test after rebase cb66946 [Jongyoul Lee] Fixed test after rebase 18b39bd [Jongyoul Lee] Fixed test after rebase daa634f [Jongyoul Lee] Fixed some tests after rebase ed558be [Jongyoul Lee] Fixed some tests after rebase fa7fccb [Jongyoul Lee] Fixed destroying process of remoteInterpreterProcess 0a73241 [Jongyoul Lee] Fixed conflict while rebasing. df423d3 [Jongyoul Lee] Fixed NotebookRestApiTest b151366 [Jongyoul Lee] Fixed some codes after rebase a32afd7 [Jongyoul Lee] Fixed some tests 7b7eb78 [Jongyoul Lee] Fixed some tests 47cc668 [Jongyoul Lee] Fixed tests to use AuthenticationInfo 012cf99 [Jongyoul Lee] Fixed some mismatch after rebase 9a03d40 [Jongyoul Lee] Reverted some value to default ones 8589545 [Jongyoul Lee] Added option in UI ccbedc1 [Jongyoul Lee] WIP 94dfed2 [Jongyoul Lee] WIP 6480d1d [Jongyoul Lee] resolved conflicts





What is this PR for?
Enabling each user to run same interpreter.
What type of PR is it?
[Improvement]
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1210
How should this be tested?
per userin your interpreter tab%spark sc.version, you will see the twores0: ...in your paragraphsScreenshots (if appropriate)
Questions: