curl --location --request PUT 'http://127.0.0.1:9200/_security/role/ops' \
--header 'Authorization: Basic 11111==' \
--header 'Content-Type: application/json' \
--data-raw '{
"cluster": [],
"indices": [
{
"names": [
"ops-gatewayprod-*","ops-prod-gateway-*"
],
"privileges": [
"read",
"view_index_metadata",
"read_cross_cluster"
],
"allow_restricted_indices": false
}
],
"applications": [
{
"application": "kibana-.kibana",
"privileges": [
"feature_discover.all",
"feature_visualize.all",
"feature_dashboard.all",
"feature_dev_tools.all",
"feature_savedObjectsManagement.all"
],
"resources": [
"*"
]
}
],
"run_as": [],
"metadata": {},
"transient_metadata": {
"enabled": true
}
}'
es remote cluster按角色查询数据,需要被查询集群与remote集群都有该角色
关注
打赏