-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Changing from manage_api_key to manage_own_api_key can cause an error and non-deleted key #54525
Comments
Pinging @elastic/kibana-alerting-services (Team:Alerting Services) |
I was able to reproduce using just the elasticsearch apis. I think the issue is
Here are the same steps done with the API Step 1: create user and two roles - one with
Step 2: assign the api_key_manager role to the user, and create an API key:
Step 3: change the role to own_api_key_manager, and then invalidate the key:
Result:
cc @pmuellr |
So alerts should probably only be managed in 7.6 using roles having the If you have the
|
Related to: elastic/elasticsearch#48716 which will allow kibana system to create API keys on behalf of users and we can avoid these issues. |
We should certainly doc this - in the README I guess. Note that Frank says things work as expected, the new key is actually used, the only technical problem is that the old api key is not invalidated. I wonder if there is some chance we could have the Kibana system user invalidate these, instead of using the user's permission? |
it's good point - elastic/elasticsearch#48716 as it's currently scoped won't be enough, since it only covers creation. We'll need create and delete |
It is possible for a user with The options are:
|
I just merged the README note, but am wondering whether we should apply a fix suggested by @tvernum ^^^ to get it to work with 7.6, or a 7.6.x release, so re-opened. |
If you create an alert with a role that has permissions of
manage_api_key
ormanage_security
and then later change that role to have the permissions ofmanage_own_api_key
when you next update an alert by enabling/disabling it you get this error message in your console:Everything still runs as expected as the new key is replaced but the existing/old key is not deleted from the console logs and you are left with a dangling key.
The text was updated successfully, but these errors were encountered: