-
Notifications
You must be signed in to change notification settings - Fork 118
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
Support API Key as environment variable #1633
Comments
There are currently issues installing packages with API keys elastic/kibana#166473 |
@jsoriano Is this unblocked when elastic/kibana#178120 is merged? |
Looks like that, yes. |
We need API key support for interacting with Serverless projects. Unless you create the project through the API you won't have an admin user/pass and you cannot create local users. So API key is the only option. I hacked on this for a few minutes at andrewkroh@6e7f9c2 and was able to do some operations like install packages on serverless, but hit other issues for system tests. |
Updated description with related PRs. Apart from changes similar to Andrew's (thanks!), I am adding an "environment" stack provider that can be used when elastic-package is configured with environment variables, to fill the gaps for system testing. |
…2307) Stop using the internal `_reset-internal-credentials` API to obtain the credentials used for serverless stacks managed by elastic-package. This API is only available to Elastic employees. There were two reasons to obtain credentials this way: - Some APIs were restricted in serverless to credentials obtained this way. From these internal APIs, the only one we use now is the one to check the cluster status (`_cluster/health`). In this case, if normal credentials are used, it returns HTTP status 410 (Gone) if the cluster is alive and the credentials are valid. We can consider this as an OK for this case. - At some point during development the project creation API didn't return credentials with enough permissions, so we needed to request them using the reset credentials APIs. Serverless is GA now, and the project creation API returns user and password with admin privileges, what is enough for all elastic-package operations. As these reasons are not strong enough anymore, it would be better to avoid these resets, what will allow to use elastic-package more openly. This is also needed for API keys support (#1633), because API keys neither have access to these internal APIs.
Currently if connecting elastic-package to a remote Elastic Stack, only username / password as environment variable are supported. As we are moving more and more to API Keys, also an API key should be supported. See #1627 for more discussions.
Stretch goal: Ideally we would have an easy way to create an API Key either through and API call or in the UI in Kibana with the right permissions ...
Related PRs:
The text was updated successfully, but these errors were encountered: