我想为我的Solr-Cloud-Cluster创建一个只读用户。为此,我创建了一个新的security.json文件,并将其上传到我的zookeeper服务器中。但是用户solr可以选择/插入,但是SOLRREAD用户只能插入。我希望SOLRREAD用户只能读取一个集合,而不能写入它。
Solr 5.5.0
你知道怎么了吗?
/usr/iop/4.2.0.0/solr/server/scripts/cloud-scripts/zkcli.sh -zkhost bdmstd001.zit.com:2181 -cmd put /solr/security.json '
{
"authentication": {
"blockUnknown": true,
"class": "solr.BasicAuthPlugin",
"credentials": {
"solr": "Some hash",
"SOLRREAD": "Some hash"
}
},
"":{"v":3},
"authorization": {
"class": "solr.RuleBasedAuthorizationPlugin",
"user-role": {
"solr": "admin",
"SOLRREAD" : "dev"
},
"permissions": [
{
"role": "dev",
"name": "collection-admin-read",
},
{
"role": "admin",
"name": "collection-admin-edit",
}
]
}
}
'