-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[ZEPPELIN-1320] Run zeppelin interpreter process as web front end user #1554
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
know issue: restart of interpreter does not work as expected. |
|
@prabhjyotsingh Do you think is there a way to impersonate without adding ssh key when user logged in using PAM authentication #1589? |
|
Sure let me check, I think it could be possible. |
|
Updated screen shot, ready for review. @Leemoonsoo I'll try to take care of "PAM authentication" in a different PR. |
cf4e346 to
1b26cc0
Compare
|
@prabhjyotsingh LGTM. |
bin/interpreter.sh
Outdated
| getZeppelinVersion | ||
| ;; | ||
| u) | ||
| ZEPPELIN_SSH_COMMAND="ssh ${OPTARG}@localhost " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about make ZEPPELIN_SSH_COMMAND configurable? because some user may run ssh in non standard port, some user may even want to use different command, like sudo, to impersonate.
The idea is, we can make this part just get impersonate user
u)
ZEPPELIN_IMPERSONATE_USER="${OPTARG}"and then we can define ZEPPELIN_IMPERSONATE_CMD from bin/common.sh in configurable way
if [[ -z "$ZEPPELIN_IMPERSONATE_CMD" ]]; then
ZEPPELIN_IMPERSONATE_CMD=`echo "ssh ${ZEPPELIN_IMPERSONATE_USER}@localhost"`
else
ZEPPELIN_IMPERSONATE_CMD=$(eval "echo ${ZEPPELIN_IMPERSONATE_CMD}")
fiSo user can override ZEPPELIN_IMPERSONATE_CMD in conf/zeppelin-env.sh or inside of interpreter property, for example
ZEPPELIN_IMPERSONATE_CMD='sudo -u ${ZEPPELIN_IMPERSONATE_USER}'
what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, sure, that totally make sense. I'll do it right away.
|
LGTM and merge to master if there're no further comments. |
Have recreated this from apache#1322 ### What is this PR for? While running a Notebook using shell, spark, python uses same user as which zeppelin server is running. Which means these interprets have same permission on file system as zeppelin server. IMO users should be able to impersonate themselves as a complete security system. ### What type of PR is it? [Improvement] ### Todos - [x] - Update doc - [x] - FIX NPEs - [x] - FIX CI ### What is the Jira issue? - [ZEPPELIN-1320](https://issues.apache.org/jira/browse/ZEPPELIN-1320) ### How should this be tested? - Enable shiro auth in shiro.ini - Add ssh key for the same user you want to try and impersonate (say user1). ``` adduser user1 ssh-keygen ssh user1localhost mkdir -p .ssh cat ~/.ssh/id_rsa.pub | ssh user1localhost 'cat >> .ssh/authorized_keys' ``` - Start zeppelin server, try and run following in paragraph in a notebook - Go to interpreter setting page, and enable "User Impersonate" in any of the interpreter (in my example its shell interpreter) ``` %sh whoami ``` Check that it should run as new user, i.e. "user1" ### 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: Prabhjyot Singh <[email protected]> Closes apache#1554 from prabhjyotsingh/ZEPPELIN-1320-2 and squashes the following commits: dc69c9d [Prabhjyot Singh] @Leemoonsoo review comment: making ZEPPELIN_SSH_COMMAND configurable 1b26cc0 [Prabhjyot Singh] add doc 5a76839 [Prabhjyot Singh] show User Impersonate only when interpreter setting is "per user" and "isolated" 02c3084 [Prabhjyot Singh] Merge remote-tracking branch 'origin/master' into ZEPPELIN-1320-2 03b2f20 [Prabhjyot Singh] use user instead of "" 0ff80ec [Prabhjyot Singh] Merge remote-tracking branch 'origin/master' into ZEPPELIN-1320-2 dd0731d [Prabhjyot Singh] fix missing test cases aff1bf0 [Prabhjyot Singh] user should have option to run these interpreters as different user.
### What is this PR for? #1554 added a `processenduser.md`, but the navigation menu different name on it's link `userimpersonation.html` This PR changes filename from `processenduser.md` to `userimpersonation.md`. ### What type of PR is it? Hot Fix ### Todos * [x] - Change file name ### What is the Jira issue? #1554 ### How should this be tested? build docs and navigate "Interpreter -> Interpreter User Impersonation" ### 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: Lee moon soo <[email protected]> Closes #1704 from Leemoonsoo/fix_link and squashes the following commits: 8ede96e [Lee moon soo] Change filename
Have recreated this from #1322
What is this PR for?
While running a Notebook using shell, spark, python uses same user as which zeppelin server is running. Which means these interprets have same permission on file system as zeppelin server.
IMO users should be able to impersonate themselves as a complete security system.
What type of PR is it?
[Improvement]
Todos
What is the Jira issue?
How should this be tested?
Check that it should run as new user, i.e. "user1"
Screenshots (if appropriate)
Questions: