Zeppelin을 설치하면 기본적으로 익명 접속으로 접근할 수 있게 되어 있다.
하지만 이리 사용하는 것은 말도 안되니깐 로그인을 통한 권한 설정을 할 수 있도록 변경한다.
권한 설정 방법은 간단하다.$ZEPPELIN_HOME/conf
디렉토리에서 shiro.ini
및 zeppelin-site.xml
파일 수정을 통해서 권한을 설정한다.
- shiro.ini
[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 = q1w2e3, admin user1 = password2, role1, role2 user2 = password3, role3 user3 = password4, role2 [urls] # This section is used for url-based security. # You can secure interpreter, configuration and credential information by urls. Comment or uncomment the below urls that you want to hide. # anon means the access is anonymous. # authc means Form based Auth Security # To enfore security, comment the line below and uncomment the next one #/api/version = anon /api/version = authc #/api/interpreter/** = authc, roles[admin] #/api/configurations/** = authc, roles[admin] #/api/credential/** = authc, roles[admin] #/** = anon /** = authc
접속할 계정에 대한 변경 방법은 [users] 카테고리에서 아이디 = 비밀번호, 권한
순으로 변경을 하면 된다.
접근할 URL
별로 권한을 설정하고 싶다면 [urls] 카테고리에서 URI
규칙을 설정하여 권한을 부여하면 된다.