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

Invalidation of API key's fails using service token #380

Closed
blakerouse opened this issue May 20, 2021 · 1 comment · Fixed by #381
Closed

Invalidation of API key's fails using service token #380

blakerouse opened this issue May 20, 2021 · 1 comment · Fixed by #381
Assignees

Comments

@blakerouse
Copy link
Contributor

At the moment the invalidation of API keys from the UNENROLL ACK fails only when using the service token for authentication with elasticsearch.

The client.Security.InvalidateAPIKey needs to send owner: true in the request body, or elasticsearch will response with a permission error.

This relates to elastic/beats#25773 and elastic/elasticsearch#73278

@ph
Copy link
Contributor

ph commented May 20, 2021

Adding more context, we have been testing initially with the fleet_enroll user which has different permissions than the service token. The major difference is manage_api_key vs manage_own_api_key used by the service token. When this permission is used you absolutely need to send owner: true when doing the invalidation call if not Elasticsearch will refuse to do the operation.

We initially thought it was more a flakiness than a permission issue, but when investigating more we have found that the problem was actually when invalidating the key.

We also need to understand why this is not caugh in our end 2 end testing environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants