Skip to content

Add metadata to exception when ApiKey/Token services are not enabled #52311

Closed
@tvernum

Description

@tvernum

Replaces: #51585
Relates: elastic/kibana#55255

There are cases where the ApiKeyService and TokenService throw exceptions if they are disabled (e.g. you cannot list API Keys, or create an API Key if the service is disabled).

In these cases we should add a metadata field to the thrown exception (e.g. "es.disabled.feature" : "API-Key-Service") so that consumers of the REST API can detect this root cause without needing to parse error messages.

Metadata

Metadata

Assignees

No one assigned

    Labels

    :Security/AuthenticationLogging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions