Skip to content

Conversation

slobodanadamovic
Copy link
Contributor

Backports the following commits to 9.0:

…astic#126376)

The `elasticsearch-certutil http` command, and security auto-configuration, 
generate the HTTP certificate and CA without setting the `keyUsage` extension.

This PR fixes this by setting (by default):
- `keyCertSign` and `cRLSign` for self-signed CAs 
- `digitalSignature` and `keyEncipherment` for HTTP certificates and CSRs

These defaults can be overridden when running `elasticsearch-certutil http` 
command. The user will be prompted to change them as they wish.

For `elasticsearch-certutil ca`, the default value can be overridden by passing 
the `--keysage` option, e.g.
```
elasticsearch-certutil ca --keyusage "digitalSignature,keyCertSign,cRLSign" -pem    
```

Fixes elastic#117769
@slobodanadamovic slobodanadamovic added :Security/TLS SSL/TLS, Certificates >bug auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport Team:Security Meta label for security team labels Apr 8, 2025
@elasticsearchmachine elasticsearchmachine merged commit 112859b into elastic:9.0 Apr 8, 2025
21 checks passed
@slobodanadamovic slobodanadamovic deleted the backport/9.0/pr-126376 branch April 8, 2025 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-merge-without-approval Automatically merge pull request when CI checks pass (NB doesn't wait for reviews!) backport >bug :Security/TLS SSL/TLS, Certificates Team:Security Meta label for security team v9.0.1

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants