仅允许单个用户使用SOLR core
我找不到关于如何允许单个用户访问特定SOLR core的任何信息。我正在使用SOLR7。这就是我得到的: security.json仅允许单个用户使用SOLR core,solr,lucene,solr4,solrconfig,Solr,Lucene,Solr4,Solrconfig,我找不到关于如何允许单个用户访问特定SOLR core的任何信息。我正在使用SOLR7。这就是我得到的: security.json { "authentication": { "blockUnknown": true, "class": "solr.BasicAuthPlugin", "credentials": { "test_admin": "xxx", "infographics": "xxx", "test_user":
{
"authentication": {
"blockUnknown": true,
"class": "solr.BasicAuthPlugin",
"credentials": {
"test_admin": "xxx",
"infographics": "xxx",
"test_user": "xxx"
},
"": {
"v": 0
}
},
"authorization": {
"class": "solr.RuleBasedAuthorizationPlugin",
"permissions": [
{
"name": "all",
"role": "admin",
"index": 1
},
{
"name": "update",
"role": "general",
"index": 2
},
{
"name": "read",
"role": [
"general",
"infographics",
"test_user"
],
"index": 3
},
{
"name": "collection-admin-read",
"role": "general",
"index": 4
},
{
"name": "core-admin-read",
"role": "general",
"index": 5
},
{
"name": "core-specific-permission",
"collection": "test-core",
"role": "test_user",
"before": 3,
"index": 6
}
],
"user-role": {
"test_admin": [
"admin",
"general"
],
"infographics": "infographics",
"test_user": "test_user"
},
"": {
"v": 0
}
}
}
我为集合“test core”添加了权限:
我在调用时通过test\u user
进行身份验证:/solr/test core/select?q=*:*
,这可以正常工作,但它也可以访问其他核心,例如:/solr/other core/select?q=*:*
如果我从读取权限中删除test_用户:
{
"name": "read",
"role": [
"general",
"infographics"
],
"index": 3
},
那么我就无法查询任何核心。得到403。对于
test\u用户
我只允许访问这个核心/solr/test core/select?q=*:*
,其他什么都不允许。您知道如何实现这一点吗?我想知道您是否需要使用基于规则的授权插件()来实现这一点。我在那里看到一个集合
参数(在“管理权限”部分下),它看起来像您需要的。我想知道您是否需要为此使用基于规则的授权插件()。我在那里看到一个集合
参数(在“管理权限”部分下),它看起来像您需要的。
{
"name": "read",
"role": [
"general",
"infographics"
],
"index": 3
},