Skip to content

Review and correct checks for AuthenticationType.API_KEY  #81425

@ywangd

Description

@ywangd

ES code has some specially handlings for API key authentication (by checking AuthenticationType.API_KEY). Some of these checks assume API key cannot run-as other users, which is no longer true since #79809. For example, GET _security/_authenticate does not print anonymous roles if the authentication type is API key. But this is incorrect if the API key run-as a regular user. Another example is Authentication#canAccessResourceOf which grants access if the API key is the same. But even when the API key is the same, it can run-as different users.

Metadata

Metadata

Assignees

Labels

:Security/AuthenticationLogging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)Team:SecurityMeta label for security team

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions