Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't fallback to anonymous user when anonymous access is enabled for invalid access token/api key #50171

Closed
jkakavas opened this issue Dec 13, 2019 · 2 comments · Fixed by #51042
Labels
>bug :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)

Comments

@jkakavas
Copy link
Member

Currently, when anonymous access is enabled, a request with an invalid/expired/wrong access token or an API Key would fallback to being authenticated as the anonymous user, as if the request wouldn't contain any Authorization header. This might be a confusing behavior for users and we should be explicit in our responses about treating no credentials and wrong credentials differently, even when anonymous access is enabled.

@jkakavas jkakavas added >bug :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc) labels Dec 13, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-security (:Security/Authentication)

@kobelb
Copy link
Contributor

kobelb commented Jan 13, 2020

Hey @jkakavas, is there any chance of getting this addressed for 7.6? Otherwise, any of Kibana's token based auth providers aren't going to work properly after a token expires for long enough that it's purged from the .security-tokens-7 index and anonymous access is enabled. This is compounded by the fact that Cloud uses an anonymous user that has no privileges.

jkakavas added a commit to jkakavas/elasticsearch that referenced this issue Jan 15, 2020
This commit changes our behavior so that when we receive a
request with an invalid/expired/wrong access token or API Key
we do not fallback to authenticating as the anonymous user even if
anonymous access is enabled for Elasticsearch.

Resolves:  elastic#50171
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Security/Authentication Logging in, Usernames/passwords, Realms (Native/LDAP/AD/SAML/PKI/etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants