SolrCloud security.json无法按预期工作

时间:2019-06-11 06:24:41

标签: authentication solr authorization basic-authentication solrcloud

SolrCloud版本:7.1.0

security.json

"authentication":{
    "class":"solr.BasicAuthPlugin",
    "blockUnknown":true,
    "credentials":{
      "user":"******************",
      "admin":"******************"}
  },
"authorization":{
    "class":"solr.RuleBasedAuthorizationPlugin",
    "permissions":[
        {
        "name":"security-read",
        "role":"*"
    },
    {
        "name":"schema-read",
        "role":"*"
    },
    {
        "name":"core-admin-read",
        "role":"*"
    },
    {
        "name":"config-read",
        "role":"*"
    },
    {
        "name":"collection-admin-read",
        "role":"*"
    },
    {
        "name":"read",
        "role":"*"
    },
    {
        "name":"all",
        "role":"admin_role"
    }],
    "user-role":{"user":"user_role", "admin":"admin_role"}
  }
}

使用上述security.json配置,我希望“用户”具有所有读取权限,而“管理员”具有所有权限。但是,发生的事情是管理员能够按预期执行所有操作,并且用户能够访问所有读取的API,但是只有管理员才能访问Solr Admin UI。对于“用户”,它说

有人可以告诉我我是否缺少某些东西或有错误吗?

0 个答案:

没有答案