-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Security api responses when security is disabled #50288
Copy link
Copy link
Closed
Labels
Description
This request:
curl -XPOST http://localhost:9200/_security/user/_has_privileges -H "Content-Type: application/json" -d '{"foo": 1}' -s | jq
when security is disabled results in:
{
"error": {
"root_cause": [
{
"type": "illegal_argument_exception",
"reason": "request [POST /_security/user/_has_privileges] does not support having a body"
}
],
"type": "illegal_argument_exception",
"reason": "request [POST /_security/user/_has_privileges] does not support having a body"
},
"status": 400
}
However, this request:
curl -XPOST http://localhost:9200/_security/user/_has_privileges -H "Content-Type: application/json" -s | jq
results in:
{
"error": {
"root_cause": [
{
"type": "exception",
"reason": "Security must be explicitly enabled when using a [trial] license. Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file and restart the node."
}
],
"type": "exception",
"reason": "Security must be explicitly enabled when using a [trial] license. Enable security by setting [xpack.security.enabled] to [true] in the elasticsearch.yml file and restart the node."
},
"status": 500
}
Is it a bug that they don't return the same error message when security is disabled? Can this be normalized?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.