How to enable Basic Authentication for Zeppelin UI and add Users?
In this article we will see how to add sample users and enable password based authentication for the Zeppelin UI.
By default when we access Zeppelin we see that we are able to access it as "anonymous" user. (means users are not challenged to provide credentials)
.
1. Login to Ambari UI and then navigate to :
Ambari UI --> Zeppelin Notebook --> Configs --> Advanced --> Advanced zeppelin-shiro-ini
2. Then add the users inside the "[users]" section as following:
[users]
# List of users with their password allowed to access Zeppelin.
# To use a different strategy (LDAP / Database / ...) check the shiro doc at http://shiro.apache.org/configuration.html
#Configuration-INISections
admin = admin
user1=user1pwd
user2=user2pwd
3. Also edit the "[urls]" section and add "authBasic" as following to tell which all URL patterns needs to be protected:
[urls]
# anon means the access is anonymous.
# authcBasic means Basic Auth Security
# To enfore security, comment the line below and uncomment the next one /api/version = anon
#/** = anon
/** = authcBasic
4. Restart Zeppelin and then users can try accessing the Zeppelin Notebook UI and you will see that it presents a Basic Authentication window to enter username & password.
.
NOTE: Zeppelin can also be configured to leverage an organization's Active Directory infrastructure for user authentication. By doing this, the existing Active Directory users can login to Zeppelin UI using their Active Directory credentials. In order to enable Active Directory based authentication for Zeppelin then you can refer to the following article: https://community.hortonworks.com/articles/70392/how-to-configure-zeppelin-for-active-directory-use.html

