Skip to content

Commit 6da3342

Browse files
committed
Add Certificate Revocation List (CRL) support
Signed-off-by: zulacha <charan.ulasala.ext@ericsson.com>
1 parent 8d9d794 commit 6da3342

12 files changed

Lines changed: 865 additions & 7 deletions
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Use this changelog template to create an entry for release notes.
2+
3+
# One of 'breaking', 'deprecation', 'new_component', 'enhancement', 'bug_fix'
4+
change_type: enhancement
5+
6+
# The name of the component, or a single word describing the area of concern, (e.g. receiver/otlp)
7+
component: pkg/config/configtls
8+
9+
# A brief description of the change. Surround your text with quotes ("") if it needs to start with a backtick (`).
10+
note: Add support for checking peer certificates against a Certificate Revocation List (CRL).
11+
12+
# One or more tracking issues or pull requests related to the change
13+
issues: [12997]
14+
15+
# (Optional) One or more lines of additional information to render under the primary note.
16+
# These lines will be padded with 2 spaces and then inserted directly into the document.
17+
# Use pipe (|) for multiline entries.
18+
subtext: |
19+
New `crl_file` and `crl_reload_interval` options allow configuring a PEM-encoded CRL that peer
20+
certificates are checked against during the TLS handshake, aborting the handshake on a revoked
21+
certificate.
22+
23+
# Optional: The change log or logs in which this entry should be included.
24+
# e.g. '[user]' or '[user, api]'
25+
# Include 'user' if the change is relevant to end users.
26+
# Include 'api' if there is a change to a library API.
27+
# Default: '[user]'
28+
change_logs: [user, api]

config/configtls/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,48 @@ Additionally certificates may be reloaded by setting the below configuration.
8181
Accepts a [duration string](https://pkg.go.dev/time#ParseDuration),
8282
valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
8383

84+
## CRL (Certificate Revocation List) Configuration
85+
86+
CRL checking can be enabled to verify that peer certificates have not been
87+
revoked. When a CRL is configured, every peer certificate presented during
88+
the TLS handshake is checked against the revocation list. If a revoked
89+
certificate is found, the TLS handshake is aborted.
90+
91+
- `crl_file`: Path to a CRL file in PEM format. (optional)
92+
93+
- `crl_reload_interval` (optional): Specifies the duration after which the CRL file will be
94+
reloaded from disk. If not set, the CRL is loaded once at startup and never refreshed.
95+
Accepts a [duration string](https://pkg.go.dev/time#ParseDuration),
96+
valid time units are "ns", "us" (or "µs"), "ms", "s", "m", "h".
97+
98+
Example (client with CRL checking):
99+
```yaml
100+
exporters:
101+
otlp:
102+
endpoint: myserver.local:55690
103+
tls:
104+
ca_file: ca.crt
105+
cert_file: client.crt
106+
key_file: client.key
107+
crl_file: revoked-certs.pem
108+
crl_reload_interval: 1h
109+
```
110+
111+
Example (server with CRL checking):
112+
```yaml
113+
receivers:
114+
otlp:
115+
protocols:
116+
grpc:
117+
endpoint: mysite.local:55690
118+
tls:
119+
cert_file: server.crt
120+
key_file: server.key
121+
client_ca_file: client-ca.crt
122+
crl_file: revoked-certs.pem
123+
crl_reload_interval: 30m
124+
```
125+
84126
How TLS/mTLS is configured depends on whether configuring the client or server.
85127
See below for examples.
86128

0 commit comments

Comments
 (0)