Skip to content

Commit e564f83

Browse files
erikgbSgtCoDFish
andcommitted
Add/update docs for new trust-manager features
Co-authored-by: Ashley Davis <SgtCoDFish@users.noreply.github.com> Signed-off-by: Erik Godding Boye <egboye@gmail.com>
1 parent 2c72ba0 commit e564f83

File tree

4 files changed

+161
-12
lines changed

4 files changed

+161
-12
lines changed

.spelling

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ OpenWRT
214214
OperatorHub
215215
OperatorHub.io
216216
PEM
217+
PKCS12-formatted
217218
PKCS#12
218219
PKCS#8
219220
Pomerium
@@ -402,6 +403,7 @@ ndegory
402403
oauth2
403404
onwards
404405
openshift-supported-versions
406+
plaintext
405407
powershell
406408
pre
407409
preemptible
@@ -458,6 +460,8 @@ upstream
458460
userinfo
459461
vhosakot
460462
v0.5.0
463+
v0.7.0
464+
v0.7.0.
461465
v0.16
462466
v0.23.1
463467
v1

content/docs/trust/trust-manager/README.md

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ and enables cluster administrators to easily automate providing a secure bundle
2121
to worry about rebuilding containers to update trust stores.
2222

2323
It's designed to complement cert-manager and works well when consuming CA certificates from a
24-
cert-manager `Issuer` or `ClusterIssuer` but can be used entirely independently from cert-manager
24+
cert-manager `Issuer` or `ClusterIssuer` but can be used entirely independently of cert-manager
2525
if needed.
2626

2727
## Usage
@@ -70,12 +70,15 @@ spec:
7070
# Sync the bundle to a ConfigMap called `my-org.com` in every namespace which
7171
# has the label "linkerd.io/inject=enabled"
7272
# All ConfigMaps will include a PEM-formatted bundle, here named "root-certs.pem"
73-
# and in this case we also request a binary JKS formatted bundle, here named "bundle.jks"
73+
# and in this case we also request binary formatted bundles in JKS and PKCS#12 formats,
74+
# here named "bundle.jks" and "bundle.p12".
7475
configMap:
7576
key: "root-certs.pem"
7677
additionalFormats:
7778
jks:
7879
key: "bundle.jks"
80+
pkcs12:
81+
key: "bundle.p12"
7982
namespaceSelector:
8083
matchLabels:
8184
linkerd.io/inject: "enabled"
@@ -88,18 +91,23 @@ spec:
8891
- `inLine` - a manually specified string containing at least one certificate
8992
- `useDefaultCAs` - usually, a bundle of publicly trusted certificates
9093

91-
These sources, along with the single currently supported target type (`configMap`)
92-
are documented in the trust-manager [API reference documentation](./api-reference.md).
94+
`ConfigMap` is the default target type, but as of v0.7.0 trust-manager also supports `Secret` resources as targets.
95+
96+
Support for `Secret` targets must be explicitly enabled in the trust-manager controller; see details below under "Enable Secret targets".
97+
98+
All sources and target options are documented in the trust-manager [API reference documentation](./api-reference.md).
9399

94100
#### Targets
95101

96-
All `Bundle` targets are written to `ConfigMap`s whose name matches that of the `Bundle`, and every
97-
target has a PEM-formatted bundle included.
102+
All `Bundle` targets are written to `ConfigMap`s (and/or `Secret`s) whose name matches that of the
103+
`Bundle`, and every target has a PEM-formatted bundle included.
104+
105+
Users can also optionally choose to write JKS/PKCS#12 formatted binary trust store(s) to targets.
106+
JKS has been supported since v0.5.0, and PKCS#12 since v0.7.0.
98107

99-
Users can also optionally - as of trust-manager v0.5.0 - choose to write a JKS formatted binary
100-
bundle to the target. We understand that most Java applications tend to require a password on JKS
101-
files (even though trust bundles don't contain secrets), so all trust-manager JKS bundles use the
102-
default password `changeit`.
108+
Applications consuming JKS and PKCS#12 trust stores often require a password to be set for legacy reasons. These passwords are often security theater - either they use very weak encryption or the passwords are provided in plaintext next to the files they encrypt which defeats the purpose of having them.
109+
110+
Trust bundles do not contain private keys, and so for most use cases there wouldn't be any security benefit to encrypting them. As such, passwords for trust stores are hard-coded to `changeit` for JKS and `""` (the empty string or "password-less") for PKCS#12. Future releases of trust-manager may make these passwords configurable.
103111

104112
#### Namespace Selector
105113

@@ -132,7 +140,16 @@ helm upgrade -i -n cert-manager cert-manager jetstack/cert-manager --set install
132140
helm upgrade -i -n cert-manager trust-manager jetstack/trust-manager --wait
133141
```
134142

135-
### approver-policy Integration
143+
#### Enable Secret targets
144+
145+
`Secret` targets are supported as of trust-manager v0.7.0, but need to be explicitly enabled on the controller.
146+
The feature can be enabled with a Helm value `--set secretTargets.enabled=true`, but since the controller needs
147+
RBAC to read and update secrets, you also need to set `secretTargets.authorizedSecretsAll` or `secretTargets.authorizedSecrets`.
148+
Please consult the
149+
[trust-manager Helm chart docs](https://github.com/cert-manager/trust-manager/blob/main/deploy/charts/trust-manager/README.md#values)
150+
for details and trade-offs.
151+
152+
#### approver-policy Integration
136153

137154
If you're running [approver-policy](../../policy/approval/approver-policy/README.md) then cert-manager's default approver will be disabled which will mean that
138155
trust-manager's webhook certificate will - by default - block when you install the Helm chart until it's manually approved.

content/docs/trust/trust-manager/api-reference.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,13 @@ Target is the target location in all namespaces to sync source data to.
246246
NamespaceSelector will, if set, only sync the target resource in Namespaces which match the selector.<br/>
247247
</td>
248248
<td>false</td>
249+
</tr><tr>
250+
<td><b><a href="#bundlespectargetsecret">secret</a></b></td>
251+
<td>object</td>
252+
<td>
253+
Secret is the target Secret that all Bundle source data will be synced to. Using Secrets as targets is only supported if enabled at trust-manager startup. By default, trust-manager has no permissions for writing to secrets and can only read secrets in the trust namespace.<br/>
254+
</td>
255+
<td>false</td>
249256
</tr></tbody>
250257
</table>
251258

@@ -271,6 +278,13 @@ AdditionalFormats specifies any additional formats to write to the target
271278
JKS requests a JKS-formatted binary trust bundle to be written to the target. The bundle is created with the hardcoded password "changeit".<br/>
272279
</td>
273280
<td>false</td>
281+
</tr><tr>
282+
<td><b><a href="#bundlespectargetadditionalformatspkcs12">pkcs12</a></b></td>
283+
<td>object</td>
284+
<td>
285+
PKCS12 requests a PKCS12-formatted binary trust bundle to be written to the target. The bundle is created without a password.<br/>
286+
</td>
287+
<td>false</td>
274288
</tr></tbody>
275289
</table>
276290

@@ -300,6 +314,31 @@ JKS requests a JKS-formatted binary trust bundle to be written to the target. Th
300314
</table>
301315

302316

317+
### `Bundle.spec.target.additionalFormats.pkcs12`
318+
319+
320+
PKCS12 requests a PKCS12-formatted binary trust bundle to be written to the target. The bundle is created without a password.
321+
322+
<table>
323+
<thead>
324+
<tr>
325+
<th>Name</th>
326+
<th>Type</th>
327+
<th>Description</th>
328+
<th>Required</th>
329+
</tr>
330+
</thead>
331+
<tbody><tr>
332+
<td><b>key</b></td>
333+
<td>string</td>
334+
<td>
335+
Key is the key of the entry in the object's `data` field to be used.<br/>
336+
</td>
337+
<td>true</td>
338+
</tr></tbody>
339+
</table>
340+
341+
303342
### `Bundle.spec.target.configMap`
304343

305344

@@ -350,6 +389,31 @@ NamespaceSelector will, if set, only sync the target resource in Namespaces whic
350389
</table>
351390

352391

392+
### `Bundle.spec.target.secret`
393+
394+
395+
Secret is the target Secret that all Bundle source data will be synced to. Using Secrets as targets is only supported if enabled at trust-manager startup. By default, trust-manager has no permissions for writing to secrets and can only read secrets in the trust namespace.
396+
397+
<table>
398+
<thead>
399+
<tr>
400+
<th>Name</th>
401+
<th>Type</th>
402+
<th>Description</th>
403+
<th>Required</th>
404+
</tr>
405+
</thead>
406+
<tbody><tr>
407+
<td><b>key</b></td>
408+
<td>string</td>
409+
<td>
410+
Key is the key of the entry in the object's `data` field to be used.<br/>
411+
</td>
412+
<td>true</td>
413+
</tr></tbody>
414+
</table>
415+
416+
353417
### `Bundle.status`
354418

355419

@@ -488,6 +552,13 @@ Target is the current Target that the Bundle is attempting or has completed sync
488552
NamespaceSelector will, if set, only sync the target resource in Namespaces which match the selector.<br/>
489553
</td>
490554
<td>false</td>
555+
</tr><tr>
556+
<td><b><a href="#bundlestatustargetsecret">secret</a></b></td>
557+
<td>object</td>
558+
<td>
559+
Secret is the target Secret that all Bundle source data will be synced to. Using Secrets as targets is only supported if enabled at trust-manager startup. By default, trust-manager has no permissions for writing to secrets and can only read secrets in the trust namespace.<br/>
560+
</td>
561+
<td>false</td>
491562
</tr></tbody>
492563
</table>
493564

@@ -513,6 +584,13 @@ AdditionalFormats specifies any additional formats to write to the target
513584
JKS requests a JKS-formatted binary trust bundle to be written to the target. The bundle is created with the hardcoded password "changeit".<br/>
514585
</td>
515586
<td>false</td>
587+
</tr><tr>
588+
<td><b><a href="#bundlestatustargetadditionalformatspkcs12">pkcs12</a></b></td>
589+
<td>object</td>
590+
<td>
591+
PKCS12 requests a PKCS12-formatted binary trust bundle to be written to the target. The bundle is created without a password.<br/>
592+
</td>
593+
<td>false</td>
516594
</tr></tbody>
517595
</table>
518596

@@ -542,6 +620,31 @@ JKS requests a JKS-formatted binary trust bundle to be written to the target. Th
542620
</table>
543621

544622

623+
### `Bundle.status.target.additionalFormats.pkcs12`
624+
625+
626+
PKCS12 requests a PKCS12-formatted binary trust bundle to be written to the target. The bundle is created without a password.
627+
628+
<table>
629+
<thead>
630+
<tr>
631+
<th>Name</th>
632+
<th>Type</th>
633+
<th>Description</th>
634+
<th>Required</th>
635+
</tr>
636+
</thead>
637+
<tbody><tr>
638+
<td><b>key</b></td>
639+
<td>string</td>
640+
<td>
641+
Key is the key of the entry in the object's `data` field to be used.<br/>
642+
</td>
643+
<td>true</td>
644+
</tr></tbody>
645+
</table>
646+
647+
545648
### `Bundle.status.target.configMap`
546649

547650

@@ -590,3 +693,28 @@ NamespaceSelector will, if set, only sync the target resource in Namespaces whic
590693
<td>false</td>
591694
</tr></tbody>
592695
</table>
696+
697+
698+
### `Bundle.status.target.secret`
699+
700+
701+
Secret is the target Secret that all Bundle source data will be synced to. Using Secrets as targets is only supported if enabled at trust-manager startup. By default, trust-manager has no permissions for writing to secrets and can only read secrets in the trust namespace.
702+
703+
<table>
704+
<thead>
705+
<tr>
706+
<th>Name</th>
707+
<th>Type</th>
708+
<th>Description</th>
709+
<th>Required</th>
710+
</tr>
711+
</thead>
712+
<tbody><tr>
713+
<td><b>key</b></td>
714+
<td>string</td>
715+
<td>
716+
Key is the key of the entry in the object's `data` field to be used.<br/>
717+
</td>
718+
<td>true</td>
719+
</tr></tbody>
720+
</table>

scripts/gendocs/generate-trust-manager

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,6 @@ gendocs() {
5959
echo "+++ Cloning trust-manager repository..."
6060
git clone "https://github.com/cert-manager/trust-manager.git" "$tmpdir"
6161

62-
checkout "v0.6.0"
62+
checkout "v0.7.0"
6363

6464
gendocs "$REPO_ROOT/content/docs/trust/trust-manager/api-reference.md"

0 commit comments

Comments
 (0)