Closed
Description
If xpack.security.authc.api_key.enabled=false
then the API keys API responds to requests with this error:
{
status: 500,
displayName: 'InternalServerError',
message: '[illegal_state_exception] api keys are not enabled',
body: {
error: {
root_cause: [
Array
],
type: 'illegal_state_exception',
reason: 'api keys are not enabled'
},
status: 500
},
statusCode: 500
}
Currently, the UI needs to inspect the message
string to determine whether the error is due to API keys being disabled or something else. This is brittle because there's no guarantee this message won't change.
This could be addressed by #35665.