Review and correct checks for AuthenticationType.API_KEY #81425
Labels
:Security/Authentication
Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)
Team:Security
Meta label for security team
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 isAuthentication#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.The text was updated successfully, but these errors were encountered: