Apache Zeppelin 的 shiro.ini 简单配置说明

开启Zeppelin的账号密码模式要先把zeppelin-site.xml里的匿名访问模式(zeppelin.anonymous.allowed)设成false

shiro 本身也是一个apache项目。

shiro.ini 位于 Zeppelin 的 conf 文件夹下。

[users] 

配置用户名密码和role,格式:

username = password, role1, role2

[roles] 

配置roles

如果shiro 和 LDAP或者Window AD有关联,可以在roles里填组名

如果没有,就是 “rolename = *”

[urls] 

决定各种URL能被哪些role访问

URL表示访问的目的地址。

关键词: anon、authc、roles[]

/api/version = anon  #这句表示任何人都能访问/api/version这个页面,anon是anonymous的缩写。

/api/interpreter/setting/restart/** = authc  #这句表示所有登陆的用户都能访问/api/interpreter/setting/restart/**,即能重启解释器。

/api/configurations/** = authc, roles[admin]  #这句表示登陆用户并拥有admin这个role就能进行配置。

roles[]参数可以写多个,多个时必须加上引号,并且参数之间用逗号分割,当有多个参数时,例如/admins/user/**=roles[admin,guest]

posted @ 2020-02-10 16:55  爱知菜  阅读(61)  评论(0编辑  收藏  举报