Skip to content

Conversation

@ywangd
Copy link
Member

@ywangd ywangd commented Dec 23, 2021

Put Role API prevents creation of invalidate role descriptors by
validating that the given cluster privileges and index previleges can be
resolved. However, the same validation is not performed when creating
API keys. As a result, users are able to create invalidate API keys
which then fail at use time. The experience is not user friendly and
inconsistent. This PR fixes it by adding the same validation logic for
API key creation.

Resolves: #67311

Put Role API prevents creation of invalidate role descriptors by
validating that the given cluster privileges and index previleges can be
resolved. However, the same validation is not performed when creating
API keys. As a result, users are able to create invalidate API keys
which then fail at use time. The experience is not user friendly and
inconsistent. This PR fixes it by adding the same validation logic for
API key creation.

Resolves: elastic#67311
@ywangd ywangd added >bug :Security/Security Security issues without another label v8.1.0 labels Dec 23, 2021
@elasticmachine elasticmachine added the Team:Security Meta label for security team label Dec 23, 2021
@elasticmachine
Copy link
Collaborator

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

Copy link
Contributor

@albertzaharovits albertzaharovits left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for tackling this long standing bug!

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

Labels

>bug :Security/Security Security issues without another label Team:Security Meta label for security team v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

API keys should throw an error, if unknown privilege gets added

3 participants