Skip to content

Commit

Permalink
docs - Clarify how to use 'certificate' for servers (#36991) (#37006)
Browse files Browse the repository at this point in the history
The docs didn't show where to put issuer certificate in the context
of TLS servers. This explains how to build up a PEM certificate bundle

(cherry picked from commit 009b3f0)

Co-authored-by: Andrew Kroh <[email protected]>
  • Loading branch information
mergify[bot] and andrewkroh authored Oct 31, 2023
1 parent bd90c05 commit 28eca91
Showing 1 changed file with 74 additions and 24 deletions.
98 changes: 74 additions & 24 deletions libbeat/docs/shared-ssl-config.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -443,42 +443,92 @@ certificate_authorities:
[[server-certificate]]
==== `certificate: "/etc/server/cert.pem"`

For server authentication, the path to the SSL authentication certificate must
be specified for TLS. If the certificate is not specified, startup will fail.
The end-entity (leaf) certificate that the server uses to identify itself.
If the certificate is signed by a certificate authority (CA), then it should
include intermediate CA certificates, sorted from leaf to root.
For servers, a `certificate` and <<server-key,`key`>> must be specified.

When this option is configured, the <<server-key,`key`>> option is also required.
The certificate option support embedding of the certificate:
The certificate option supports embedding of the PEM certificate content. This
example contains the leaf certificate followed by issuer's certificate.

[source,yaml]
----
certificate: |
-----BEGIN CERTIFICATE-----
MIIDCjCCAfKgAwIBAgITJ706Mu2wJlKckpIvkWxEHvEyijANBgkqhkiG9w0BAQsF
ADAUMRIwEAYDVQQDDAlsb2NhbGhvc3QwIBcNMTkwNzIyMTkyOTA0WhgPMjExOTA2
MjgxOTI5MDRaMBQxEjAQBgNVBAMMCWxvY2FsaG9zdDCCASIwDQYJKoZIhvcNAQEB
BQADggEPADCCAQoCggEBANce58Y/JykI58iyOXpxGfw0/gMvF0hUQAcUrSMxEO6n
fZRA49b4OV4SwWmA3395uL2eB2NB8y8qdQ9muXUdPBWE4l9rMZ6gmfu90N5B5uEl
94NcfBfYOKi1fJQ9i7WKhTjlRkMCgBkWPkUokvBZFRt8RtF7zI77BSEorHGQCk9t
/D7BS0GJyfVEhftbWcFEAG3VRcoMhF7kUzYwp+qESoriFRYLeDW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PizMXou9xKzypeSW
qtNdwtg62jKWDaVriBfrvoCnyjjCIjmcTcvA2VLmeZShyTuIucd0lkg2NKIGeM7I
o33hmdiKaop1fVtj8zqXvCRa3ecmlvcxPKX0otVFORFNOfaPjH/CjW0CnP0LByGK
YW19w0ncJZa9cc1SlNL28lnBhW+i1+ViR02wtjabH9XO+mtxuaEPDZ1hLhhjktqI
Y2oFUso4C5xiTU/hrH8+cFv0dn/+zyQoLfJEQbUX9biFeytt7T4Yynwhdy7jryqH
fdy/QM26YnsE8D7l4mv99z+zII0IRGnQOuLTuNAIyGJUf69hCDubZFDeHV/IB9hU
6GA6lBpsJlTDgfJLbtKuAHxdn1DO+uGg0GxgwggH6Vh9x9yQK2E6BaepJisL/zNB
RQQmEyTn1hn/eA==
-----END CERTIFICATE-----
----

[float]
[[server-key]]
==== `key: "/etc/server/cert.key"`

The server certificate key used for authentication is required.
The key option support embedding of the private key:
The key option supports embedding of the private key:

[source,yaml]
----
Expand Down

0 comments on commit 28eca91

Please sign in to comment.