Thanks for the answer @Eugene7,
FYI, the above tests were done on 2.7.0, I ran the same on 2.9.0. Now errors are returned as response from the API, which is better.
Here are the results alongside with further info as requested.
GET _plugins/_security/api/internalusers/trelo
{
"trelo" : {
"hash" : "",
"reserved" : false,
"hidden" : false,
"backend_roles" : [
""
],
"attributes" : { },
"opendistro_security_roles" : [ ],
"static" : false
}
}
GET _plugins/_security/api/account?pretty
{
"user_name" : "trelo",
"is_reserved" : false,
"is_hidden" : false,
"is_internal_user" : true,
"user_requested_tenant" : null,
"backend_roles" : [
""
],
"custom_attribute_names" : [ ],
"tenants" : {
"global_tenant" : true,
"audit_logs" : true,
"trelo" : true
},
"roles" : [
"own_index",
"kibana_user",
"security_rest_api_access",
"all_access"
]
}
GET _plugins/_security/health
{
"message" : null,
"mode" : "strict",
"status" : "UP"
}
GET _plugins/_security/api/tenants
{
"global_tenant" : {
"reserved" : true,
"hidden" : false,
"description" : "Global tenant",
"static" : true
},
"audit_logs" : {
"reserved" : false,
"hidden" : false,
"description" : "Tenant for the audit logs",
"static" : false
}
}
GET _plugins/_security/api/allowlist
{
"status" : "FORBIDDEN",
"message" : "API allowed only for super admin."
}
GET _plugins/_security/api/ssl/certs
{
"status" : "FORBIDDEN",
"message" : ""
}
PUT _plugins/_security/api/ssl/http/reloadcerts
{
"status" : "FORBIDDEN",
"message" : ""
}
PUT _plugins/_security/api/ssl/transport/reloadcerts
{
"status" : "FORBIDDEN",
"message" : ""
}
Finally, I ran the last three commands authenticating with certificate, and this time everything worked as expected:
curl --cert admin.pem --key admin.key https://localhost:9200/_plugins/_security/api/allowlist
{ }
curl --cert admin.pem --key admin.key https://localhost:9200/_plugins/_security/api/ssl/certs
{
"http_certificates_list" : [
{
"issuer_dn" : "blah blah",
"subject_dn" : "blah blah",
"san" : "blah blah",
"not_before" : "blah blah",
"not_after" : "blah blah"
}
],
"transport_certificates_list" : [
{
"issuer_dn" : "blah blah",
"subject_dn" : "blah blah",
"san" : "blah blah",
"not_before" : "blah blah",
"not_after" : "blah blah"
}
]
}
curl -XPUT --cert admin.pem --key admin.key https://localhost:9200/_plugins/_security/api/ssl/http/reloadcerts
{
"message" : "updated http certs"
}
curl -XPUT --cert admin.pem --key admin.key https://localhost:9200/_plugins/_security/api/ssl/transport/reloadcerts
{
"message" : "updated transport certs"
}
So in the end, the question is, why as trelo
user I cannot use the APIs:
- GET _plugins/_security/api/allowlist
- GET _plugins/_security/api/ssl/certs
- PUT _plugins/_security/api/ssl/http/reloadcerts
- PUT _plugins/_security/api/ssl/transport/reloadcerts
And how to enable that (if possible). Thanks again in advance for your time.