I don’t think the PoC is working as expected. The following API should work in order to create index patterns in Kibana but it is giving the error.
Please suggest.
curl -k -u admin:container ‘https://localhost:9200/_field_caps?pretty&fields=message’
{
“error” : {
“root_cause” : [
{
“type” : “security_exception”,
“reason” : “action [indices:data/read/field_caps[n]] is unauthorized for user [_xpack] with roles [_xpack], this action is granted by the index privileges [view_index_metadata,manage,read,all]”
}
],
“type” : “security_exception”,
“reason” : “action [indices:data/read/field_caps[n]] is unauthorized for user [_xpack] with roles [_xpack], this action is granted by the index privileges [view_index_metadata,manage,read,all]”,
“caused_by” : {
“type” : “illegal_argument_exception”,
“reason” : “the action indices:data/read/field_caps[n] does not support wildcards; the provided index expression(s) [*] are not allowed”
}
},
“status” : 403
}
The Debug logs are:
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,586Z”, “level”: “DEBUG”, “component”: “i.n.h.s.SslHandler”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “[id: 0xbfdf5ef8, L:/[0:0:0:0:0:0:0:1]:9200 - R:/[0:0:0:0:0:0:0:1]:60680] HANDSHAKEN: protocol:TLSv1.3 cipher suite:TLS_AES_256_GCM_SHA384”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,587Z”, “level”: “DEBUG”, “component”: “t.b.r.e.h.r.c.t.IndicesReplaceableEsRequestContext”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “[889922824-2024090004#2355] Discovered indices: ", “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,587Z”, “level”: “DEBUG”, “component”: “t.b.r.a.l.AccessControlLoggingDecorator”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “checking request: 889922824-2024090004#2355”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,588Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.r.AuthKeyRule”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “Attempting Login as: admin rc: 889922824-2024090004#2355”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,588Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.Block”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: "\u001B[33m[::KIBANA-SRV::] the request matches no rules in this block: { ID:889922824-2024090004#2355, TYP:FieldCapabilitiesRequest, CGR:N/A, USR:admin (attempted), BRS:true, KDX:null, ACT:indices:data/read/field_caps, OA:127.0.0.1/32, XFF:null, DA:::1/32, IDX:, MET:GET, PTH:/_field_caps, CNT:<N/A>, HDR:Accept=/, Authorization=, Host=localhost:9200, User-Agent=curl/7.68.0, content-length=0, HIS:[::KIBANA-SRV::-> RULES:[auth_key->false] RESOLVED:[indices=]], } \u001B[0m", “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,588Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.r.AuthKeyRule”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “Attempting Login as: admin rc: 889922824-2024090004#2355”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,589Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.Block”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: "\u001B[33m[DEFAULT KIBANA USER] the request matches no rules in this block: { ID:889922824-2024090004#2355, TYP:FieldCapabilitiesRequest, CGR:N/A, USR:admin (attempted), BRS:true, KDX:null, ACT:indices:data/read/field_caps, OA:127.0.0.1/32, XFF:null, DA:::1/32, IDX:, MET:GET, PTH:/_field_caps, CNT:<N/A>, HDR:Accept=/, Authorization=, Host=localhost:9200, User-Agent=curl/7.68.0, content-length=0, HIS:[DEFAULT KIBANA USER-> RULES:[auth_key->false] RESOLVED:[indices=]], } \u001B[0m", “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,589Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.r.AuthKeyRule”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “Attempting Login as: admin rc: 889922824-2024090004#2355”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,589Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.Block”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: "\u001B[33m[PROBE] the request matches no rules in this block: { ID:889922824-2024090004#2355, TYP:FieldCapabilitiesRequest, CGR:N/A, USR:admin (attempted), BRS:true, KDX:null, ACT:indices:data/read/field_caps, OA:127.0.0.1/32, XFF:null, DA:::1/32, IDX:, MET:GET, PTH:/_field_caps, CNT:<N/A>, HDR:Accept=/, Authorization=, Host=localhost:9200, User-Agent=curl/7.68.0, content-length=0, HIS:[PROBE-> RULES:[auth_key->false] RESOLVED:[indices=]], } \u001B[0m", “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,589Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.r.AuthKeyRule”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “Attempting Login as: admin rc: 889922824-2024090004#2355”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,589Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.Block”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: "\u001B[33m[ELASTIC-INTERNAL] the request matches no rules in this block: { ID:889922824-2024090004#2355, TYP:FieldCapabilitiesRequest, CGR:N/A, USR:admin (attempted), BRS:true, KDX:null, ACT:indices:data/read/field_caps, OA:127.0.0.1/32, XFF:null, DA:::1/32, IDX:, MET:GET, PTH:/_field_caps, CNT:<N/A>, HDR:Accept=/, Authorization=, Host=localhost:9200, User-Agent=curl/7.68.0, content-length=0, HIS:[ELASTIC-INTERNAL-> RULES:[auth_key->false] RESOLVED:[indices=]], } \u001B[0m", “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,590Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.r.AuthKeyRule”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “Attempting Login as: admin rc: 889922824-2024090004#2355”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,590Z”, “level”: “DEBUG”, “component”: “t.b.r.a.b.Block”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: "\u001B[36mmatched { name: ‘CONTAINER ADMIN - file’, policy: ALLOW, rules: [auth_key] { found: user=admin;indices= }\u001B[0m”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,590Z”, “level”: “INFO”, “component”: “t.b.r.a.l.AccessControlLoggingDecorator”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “\u001B[36mALLOWED by { name: ‘CONTAINER ADMIN - file’, policy: ALLOW, rules: [auth_key] req={ ID:889922824-2024090004#2355, TYP:FieldCapabilitiesRequest, CGR:N/A, USR:admin, BRS:true, KDX:null, ACT:indices:data/read/field_caps, OA:127.0.0.1/32, XFF:null, DA:::1/32, IDX:, MET:GET, PTH:/_field_caps, CNT:<N/A>, HDR:Accept=/, Authorization=Basic YWRtaW46Y29udGFpbmVy, Host=localhost:9200, User-Agent=curl/7.68.0, content-length=0, HIS:[::KIBANA-SRV::-> RULES:[auth_key->false] RESOLVED:[indices=]], [DEFAULT KIBANA USER-> RULES:[auth_key->false] RESOLVED:[indices=]], [PROBE-> RULES:[auth_key->false] RESOLVED:[indices=]], [ELASTIC-INTERNAL-> RULES:[auth_key->false] RESOLVED:[indices=]], [CONTAINER ADMIN - file-> RULES:[auth_key->true] RESOLVED:[user=admin;indices=]], }\u001B[0m”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }
{“type”: “server”, “timestamp”: “2022-05-28T15:58:48,590Z”, “level”: “DEBUG”, “component”: “t.b.r.e.h.RegularRequestHandler”, “cluster.name”: “quickstart”, “node.name”: “quickstart-es-default-0”, “message”: “[889922824-2024090004#2355] Request processing time: 3ms”, “cluster.uuid”: “-wqFgRwWSW2y52F0eoJT-Q”, “node.id”: “9EhO7lBlTFKm03jvE31flg” }