-
Notifications
You must be signed in to change notification settings - Fork 2.8k
[Zeppelin-1611] - Support PAM (System User) Authentication #1589
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
|
Thank you for contribution! There are few things need to be taken care here:
|
|
Thanks for your feedback @bzz I applied the changes required for 1. and 2.
|
|
Provided documentation as well. |
|
👍 for docs in same PR, it looks great. On CI, I think that's relatively minor and if that's too complicated to configure - we can can opt out for manual test run+instruction in docs. Double-checking that we have all Licenses for dependencies (and transitive dependencies) logged is important though. BTW, are you sure that all those commits belong to this branch? |
|
Cool! Just to be clear the test will simply be ignored with Concerning the licenses we should be fairly save. libpam4j mainly dependence on JNA and maven. JNA version >4 is available as Apache and actually was already introduced with selenium dependency in this project. I rebased and pulled in a way that created a little mess here. What I could do is create a new branch with cherry-picked changes and created a new PR based on this, or? Let me know? I think the Travis build failed because of issue with the other changes, or? |
Leemoonsoo
left a comment
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.
| ``` | ||
| [main] | ||
| pamRealm=org.apache.zeppelin.realm.PamRealm | ||
| pamRealm.service=sshd |
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.
Could you also add configuration into conf/shiro.ini.template?
This PR adds [PAM](https://en.wikipedia.org/wiki/Pluggable_authentication_module) authentication support based on the introduced Shiro security implementation. With PAM support system users have immediate access to a secured Zeppelin instance. Feature * [x] - Create PAM realm * [x] - Create test for PAM authentication * [x] - Test with running Zeppelin instance [ZEPPELIN-1611](https://issues.apache.org/jira/browse/ZEPPELIN-1611]) `PamRealmTest` executes an automated test if the environment variables `PAM_USER` and `PAM_PASS` are set. This should be set to system username and password. The test also includes a main function to manually execute the test. Setting the environment variables for example on MacOS for your IDE use `launchctl setenv PAM_USER user` and `launchctl setenv PAM_PASS xxxxx`, the test can then be run from your IDE. * Does the licenses files need update? Yes * Is there breaking changes for older versions? No * Does this needs documentation? Yes
|
Thank you @bzz and @Leemoonsoo , I rewrote history and added the shiro.ini.template. I think we should be fine here now, or? Please let me know, if you have further remarks. Just so you are aware, I believe this currently does not support the resolution/listing of users and groups in UI for example for notebook authorization. Usernames and groups will stay empty with this. I created ZEPPELIN-1631 as a followup. I already have an idea on how to solve this and might be able to contribute this within next weeks. |
|
Tested and LGTM. |
What is this PR for?
This PR adds PAM authentication support based on the introduced Shiro security implementation. With PAM support system users have immediate access to a secured Zeppelin instance.
What type of PR is it?
Feature
Todos
What is the Jira issue?
ZEPPELIN-1611
How should this be tested?
PamRealmTestexecutes an automated test if the environment variablesPAM_USERandPAM_PASSare set. This should be set to system username and password.The test also includes a main function to manually execute the test. Setting the environment variables for example on MacOS for your IDE use
launchctl setenv PAM_USER userandlaunchctl setenv PAM_PASS xxxxx, the test can then be run from your IDE.Screenshots (if appropriate)
Questions: