-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Impossible to create an api key: action_request_validation_exception: [action_request_validation_exception] Reason: Validation Failed #29811
Comments
Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane) |
Pinging @elastic/fleet (Team:Fleet) |
This seems to be a Kibana / Elasticsearch issue / change. The error comes from here: https://github.com/elastic/kibana/blob/6693ef371f887eca639b09c4c9b15701b4ebabd4/x-pack/plugins/fleet/server/services/api_keys/enrollment_api_key.ts#L226 And I think the relevant error is:
What is the |
Here is the code on the Elasticsearch side that throws the error: https://github.com/elastic/elasticsearch/blob/master/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/ApplicationPrivilege.java#L128 But it seems the pattern to match did not change recently? |
Looks like they added some validation in ES elastic/elasticsearch#82049 |
@nchaulet, are you handling the change in Kibana? Do we need to do any changes for the agent/fleet-server? |
If we change from @ywangd For awareness that your PR around validation broke Fleet. I wonder if we did something wrong before of this is a breaking change. |
Yes I can do the change, this should not affect previously created API key, (I am just going to test to be sure) |
@ruflin Thanks for the ping. It is a bug fix rather than breaking change. But technically any bug fix is likely a "breaking change". The validation has existed for long but it was never applied when creating API keys. ES does not allow application name (of application privilege) to begin with a dot. This is true when creating the actual application privilege, meaning the following does not work:
That is there is no way to define such application privilege. Before elastic/elasticsearch#82049, you can create an API key that contains invalid application name ( In summary, I'd recommend Fleet to change the API key creation. Or is it a BWC problem? EDIT: |
Thanks for the details @ywangd Is my understanding correct that the above means API keys created in previous versions of Elasticsearch with |
Let me open the issue, as the fixed application hasn't been released as a Docker image yet. I'm keeping an eye on it here: elastic/elastic-package#643, but I'm afraid that we're failing with the unified release process. |
Yes since enrollment API keys are used only for authentication purpose and intended to have no privileges at all. They should keep working. |
@mtojek are those docker images available now? |
@jlind23 Yes, I think we have already received the correct images. Feel free to close the issue. |
Hi Team,
we're facing issues with Elastic Agent with
elastic-package stack up --version 8.1.0-SNAPSHOT -v -d
in 8.1.0-SNAPSHOT. Would you mind taking a look? It's blocking for Integrations developers using the newest stack (Kubernetes development).elastic-agent:
(source)
fleet-server:
(source)
The text was updated successfully, but these errors were encountered: