Skip to content

Conversation

@jsoriano
Copy link
Member

@jsoriano jsoriano commented Jan 3, 2025

Add support for API keys in clients and shellinit.

This is enough for some initial support of API keys (#1633), but many things can still fail, specially when running tests and so on. More about this in #2298.

Complementary to #2307 and #2309.

@jsoriano jsoriano requested a review from a team January 3, 2025 13:34
@jsoriano jsoriano self-assigned this Jan 3, 2025
Comment on lines +173 to +176
// Avoid returning an empty certificate path, fallback to the default path.
if caCertPath == "" {
caCertPath = profile.Path(CACertificateFile)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

In case of Serverless projects that are not required to set the CA certificate path, would this cause errors ?

Copy link
Member Author

Choose a reason for hiding this comment

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

It shouldn't, this CA certificate is only additive. Leaving this empty mounts an empty file in the dockerfile.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok 👍

I was wondering if it could affect in case it is used with a Serverless project that was created out of elastic-package. And the user sets the environment variables and it does not set the environment variable related to the CA to run for instance elastic-package install.

Copy link
Member Author

Choose a reason for hiding this comment

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

I haven't found regressions in the serverless provider with these changes.

Copy link
Contributor

@mrodm mrodm left a comment

Choose a reason for hiding this comment

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

👍

@jsoriano jsoriano merged commit e27598a into elastic:main Jan 8, 2025
3 checks passed
@jsoriano jsoriano deleted the api-key-clients branch January 8, 2025 09:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants