-
Notifications
You must be signed in to change notification settings - Fork 8
Expose ability to set certificate renewal target times #453
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
doc-Service-Telemetry-Framework/modules/con_tls-certificates-duration.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
[id="tls-certificates-duration_{context}"] | ||
= Configuring the duration for the TLS certificates | ||
|
||
[role="_abstract"] | ||
To configure the duration of the TLS certificates that you use for the connections with | ||
Elasticsearch and {MessageBus} in {Project} ({ProjectShort}), | ||
modify the `ServiceTelemetry` object and configure the `certificates` parameters. | ||
|
||
[id="configuration-parameters-for-tls-certificates-duration_{context}"] | ||
== Configuration parameters for the TLS certificates | ||
|
||
You can configure the duration of the certificate with the following sub-parameters of the `certificates` parameter: | ||
|
||
endpointCertDuration:: The requested 'duration' or lifetime of the endpoint Certificate. | ||
Minimum accepted duration is 1 hour. Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration. | ||
The default value is `70080h`. | ||
caCertDuration:: The requested 'duration' or lifetime of the CA Certificate. | ||
Minimum accepted duration is 1 hour. Value must be in units accepted by Go time.ParseDuration https://golang.org/pkg/time/#ParseDuration. | ||
vkmc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
Default value is `70080h`. | ||
|
||
NOTE:: The default duration of certificates is long, because you usually copy a subset of them in the {OpenStack} deployment when the certificates renew. For more information about the QDR CA Certificate renewal process, see xref:assembly-renewing-the-amq-interconnect-certificate_assembly[] | ||
|
||
The `certificates` parameter for Elasticsearch is part of the `backends.events.elasticsearch` definition and is configured in the `ServiceTelemetry` object: | ||
vkmc marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
[source,yaml,options="nowrap"] | ||
---- | ||
apiVersion: infra.watch/v1beta1 | ||
kind: ServiceTelemetry | ||
metadata: | ||
name: default | ||
namespace: service-telemetry | ||
spec: | ||
... | ||
backends: | ||
... | ||
events: | ||
elasticsearch: | ||
enabled: true | ||
version: 7.16.1 | ||
certificates: | ||
endpointCertDuration: 70080h | ||
caCertDuration: 70080h | ||
... | ||
---- | ||
|
||
You can configure the `certificates` parameter for QDR that is part of the `transports.qdr` definition in the `ServiceTelemetry` object: | ||
|
||
[source,yaml,options="nowrap"] | ||
---- | ||
apiVersion: infra.watch/v1beta1 | ||
kind: ServiceTelemetry | ||
metadata: | ||
name: default | ||
namespace: service-telemetry | ||
spec: | ||
... | ||
transports: | ||
... | ||
qdr: | ||
enabled: true | ||
certificates: | ||
endpointCertDuration: 70080h | ||
caCertDuration: 70080h | ||
... | ||
---- |
54 changes: 54 additions & 0 deletions
54
...ice-Telemetry-Framework/modules/proc_configuring-tls-certificates-duration.adoc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
[id="configuring-tls-certificates-duration_{context}"] | ||
= Configuring TLS certificates duration | ||
|
||
[role="_abstract"] | ||
To configure the duration of the TLS certificates to use with {Project} ({ProjectShort}), modify the `ServiceTelemetry` object and configure the `certificates` parameter. | ||
|
||
.Prerequisites | ||
|
||
* You didn't deploy an instance of Service Telemetry Operator already. | ||
|
||
NOTE:: When you create the `ServiceTelemetry` object, the required certificates and their secrets for {ProjectShort} are also created. | ||
For more information about how to modify the certificates and the secrets, see: xref:assembly-renewing-the-amq-interconnect-certificate_assembly[] | ||
The following procedure is valid for new {ProjectShort} deployments. | ||
|
||
.Procedure | ||
|
||
To edit the duration of the TLS certificates, you can set the Elasticsearch `endpointCertDuration`, for example `26280h` for 3 years, and set the QDR `caCertDuration`, for example `87600h` for 10 years. | ||
You can use the default value of 8 years for the CA certificate for Elasticsearch and endpoint certificate: | ||
+ | ||
[source,yaml,options="nowrap",role="white-space-pre"] | ||
---- | ||
$ oc apply -f - <<EOF | ||
apiVersion: infra.watch/v1beta1 | ||
kind: ServiceTelemetry | ||
metadata: | ||
name: default | ||
namespace: service-telemetry | ||
spec: | ||
backends: | ||
events: | ||
elasticsearch: | ||
enabled: true | ||
certificates: | ||
endpointCertDuration: 26280h | ||
transport: | ||
qdr: | ||
enabled: true | ||
certificates: | ||
caCertDuration: 87600h | ||
EOF | ||
---- | ||
|
||
.Verification | ||
|
||
. Verify that the expiry date for the certificates is correct: | ||
+ | ||
[source,bash,options="nowrap"] | ||
---- | ||
$ oc get secret elasticsearch-es-cert -o jsonpath='{.data.tls\.crt}' | base64 -d | openssl x509 -in - -text | grep "Not After" | ||
Not After : Mar 9 21:00:16 2026 GMT | ||
|
||
$ oc get secret default-interconnect-selfsigned -o jsonpath='{.data.tls\.crt}' | base64 -d | openssl x509 -in - -text | grep "Not After" | ||
Not After : Mar 9 21:00:16 2033 GMT | ||
---- |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.