-
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
[Fleet] Add support for authorizing kibana fleet or fleet server apis using the security api key #93051
Comments
/cc @ruflin |
Pinging @elastic/fleet (Team:Fleet) |
I need to read up on this more but I think a role can be specified for an API but in the end the API Key only gets the permissions of the role itself. So if we check for the role, it will not be there and is the reason why it doesn't work. @narph What is the API call you are making? Is this for |
@ruflin , atm we are making the following calls to the kibana fleet apis:
Also, right now we use the |
Pinging @tvernum on this. We are checking for a |
You are correct @ruflin - API keys do not have roles, so it is impossible to check whether an API key is The stack doesn't really work well with role (name) based checks. We have the same issue with Kibana reporting's reliance on We need to move Fleet to a model where it is checking explicit privileges for each API rather than just leveraging |
@tvernum I'm tempted to say we have already enough issue at the same time it means if anyone wants to setup Fleet through the API, username / password is required. I assume if we would have here service accounts, we would have a role if the token is used? |
When calling the Kibana Fleet apis and using the ApIKey authorization instead of Basic auth (username:password) the response is:
{"statusCode":403,"error":"Forbidden","message":"Access to Fleet API require the superuser role."}
The user creating the api key has superuser role, also this was tested with an api key which had as role decriptors a superuser role.
More on the security api key here: https://www.elastic.co/guide/en/elasticsearch/reference/current/security-api-create-api-key.html
It looks like this is not supported atm and @nchaulet confirmed this.
The text was updated successfully, but these errors were encountered: