Skip to content

Commit 42fc489

Browse files
authored
Merge pull request #65077 from jldohmann/OSDOCS-6988
OSDOCS-6988: add offline tang provisioning
2 parents 40e6019 + 4eb241a commit 42fc489

File tree

1 file changed

+48
-16
lines changed

1 file changed

+48
-16
lines changed

modules/installation-special-config-storage.adoc

Lines changed: 48 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,10 @@ You can also configure the TPM v2 and Tang encryption modes simultaneously.
5454
This enables boot disk data decryption only if the TPM secure cryptoprocessor is present and the Tang servers are accessible over a secure network.
5555

5656
You can use the `threshold` attribute in your Butane configuration to define the minimum number of TPM v2 and Tang encryption conditions required for decryption to occur.
57-
The threshold is met when the stated value is reached through any combination of the declared conditions.
58-
For example, the `threshold` value of `2` in the following configuration can be reached by accessing the two Tang servers, or by accessing the TPM secure cryptoprocessor and one of the Tang servers:
57+
58+
The threshold is met when the stated value is reached through any combination of the declared conditions. In the case of offline provisioning, the offline server is accessed using an included advertisement, and only uses that supplied advertisement if the number of online servers do not meet the set threshold.
59+
60+
For example, the `threshold` value of `2` in the following configuration can be reached by accessing two Tang servers, with the offline server available as a backup, or by accessing the TPM secure cryptoprocessor and one of the Tang servers:
5961

6062
.Example Butane configuration for disk encryption
6163

@@ -76,15 +78,19 @@ boot_device:
7678
thumbprint: jwGN5tRFK-kF6pIX89ssF3khxxX
7779
- url: http://tang2.example.com:7500
7880
thumbprint: VCJsvZFjBSIHSldw78rOrq7h2ZF
79-
threshold: 2 <4>
81+
- url: http://tang3.example.com:7500
82+
thumbprint: PLjNyRdGw03zlRoGjQYMahSZGu9
83+
advertisement: "{\"payload\": \"...\", \"protected\": \"...\", \"signature\": \"...\"}" <4>
84+
threshold: 2 <5>
8085
openshift:
8186
fips: true
8287
----
8388
<1> Set this field to the instruction set architecture of the cluster nodes.
8489
Some examples include, `x86_64`, `aarch64`, or `ppc64le`.
8590
<2> Include this field if you want to use a Trusted Platform Module (TPM) to encrypt the root file system.
8691
<3> Include this section if you want to use one or more Tang servers.
87-
<4> Specify the minimum number of TPM v2 and Tang encryption conditions required for decryption to occur.
92+
<4> Optional: Include this field for offline provisioning. Ignition will provision the Tang server binding rather than fetching the advertisement from the server at runtime. This lets the server be unavailable at provisioning time.
93+
<5> Specify the minimum number of TPM v2 and Tang encryption conditions required for decryption to occur.
8894

8995
[IMPORTANT]
9096
====
@@ -151,11 +157,11 @@ $ sudo yum install clevis
151157
----
152158

153159
.. On the {op-system-base} 8 machine, run the following command to generate a thumbprint of the exchange key.
154-
Replace `\http://tang.example.com:7500` with the URL of your Tang server:
160+
Replace `\http://tang1.example.com:7500` with the URL of your Tang server:
155161
+
156162
[source,terminal]
157163
----
158-
$ clevis-encrypt-tang '{"url":"http://tang.example.com:7500"}' < /dev/null > /dev/null <1>
164+
$ clevis-encrypt-tang '{"url":"http://tang1.example.com:7500"}' < /dev/null > /dev/null <1>
159165
----
160166
<1> In this example, `tangd.socket` is listening on port `7500` on the Tang server.
161167
+
@@ -184,6 +190,28 @@ Some other distributions provide Clevis version 17 or later, which use the SHA-2
184190
You must use a Clevis version that uses SHA-1 to create the thumbprint, to prevent Clevis binding issues when you install {op-system-first} on your {product-title} cluster nodes.
185191
====
186192

193+
.. Optional: For offline Tang provisioning:
194+
195+
... Obtain the advertisement from the server using the `curl` command. Replace `\http://tang2.example.com:7500` with the URL of your Tang server:
196+
+
197+
[source,terminal]
198+
----
199+
$ curl -f http://tang2.example.com:7500/adv > adv.jws && cat adv.jws
200+
----
201+
+
202+
.Expected output
203+
[source,text]
204+
----
205+
{"payload": "eyJrZXlzIjogW3siYWxnIjogIkV", "protected": "eyJhbGciOiJFUzUxMiIsImN0eSI", "signature": "ADLgk7fZdE3Yt4FyYsm0pHiau7Q"}
206+
----
207+
208+
... Provide the advertisement file to Clevis for encryption:
209+
+
210+
[source,terminal]
211+
----
212+
$ clevis-encrypt-tang '{"url":"http://tang2.example.com:7500","adv":"adv.jws"}' < /dev/null > /dev/null
213+
----
214+
187215
.. If the nodes are configured with static IP addressing, run `coreos-installer iso customize --dest-karg-append` or use the `coreos-installer` `--append-karg` option when installing {op-system} nodes to set the IP address of the installed system.
188216
Append the `ip=` and other arguments needed for your network.
189217
+
@@ -219,15 +247,18 @@ boot_device:
219247
luks: <3>
220248
tpm2: true <4>
221249
tang: <5>
222-
- url: http://tang.example.com:7500 <6>
250+
- url: http://tang1.example.com:7500 <6>
223251
thumbprint: PLjNyRdGw03zlRoGjQYMahSZGu9 <7>
224-
threshold: 1 <8>
225-
mirror: <9>
226-
devices: <10>
252+
- url: http://tang2.example.com:7500
253+
thumbprint: VCJsvZFjBSIHSldw78rOrq7h2ZF
254+
advertisement: "{"payload": "eyJrZXlzIjogW3siYWxnIjogIkV", "protected": "eyJhbGciOiJFUzUxMiIsImN0eSI", "signature": "ADLgk7fZdE3Yt4FyYsm0pHiau7Q"}" <8>
255+
threshold: 1 <9>
256+
mirror: <10>
257+
devices: <11>
227258
- /dev/sda
228259
- /dev/sdb
229260
openshift:
230-
fips: true <11>
261+
fips: true <12>
231262
----
232263
+
233264
<1> For control plane configurations, replace `worker` with `master` in both of these locations.
@@ -240,13 +271,14 @@ For more details, see "About disk encryption".
240271
<6> Specify the URL of a Tang server.
241272
In this example, `tangd.socket` is listening on port `7500` on the Tang server.
242273
<7> Specify the exchange key thumbprint, which was generated in a preceding step.
243-
<8> Specify the minimum number of TPM v2 and Tang encryption conditions that must be met for decryption to occur.
274+
<8> Optional: Specify the advertisement for your offline Tang server in valid JSON format.
275+
<9> Specify the minimum number of TPM v2 and Tang encryption conditions that must be met for decryption to occur.
244276
The default value is `1`.
245277
For more information about this topic, see "Configuring an encryption threshold".
246-
<9> Include this section if you want to mirror the boot disk.
278+
<10> Include this section if you want to mirror the boot disk.
247279
For more details, see "About disk mirroring".
248-
<10> List all disk devices that should be included in the boot disk mirror, including the disk that {op-system} will be installed onto.
249-
<11> Include this directive to enable FIPS mode on your cluster.
280+
<11> List all disk devices that should be included in the boot disk mirror, including the disk that {op-system} will be installed onto.
281+
<12> Include this directive to enable FIPS mode on your cluster.
250282
+
251283
[IMPORTANT]
252284
====
@@ -451,4 +483,4 @@ In the example output, the `/boot` file system is mounted on the `/dev/md126` so
451483
[role="_additional-resources"]
452484
.Additional resources
453485

454-
* For more information about the TPM v2 and Tang encryption modes, see link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/configuring-automated-unlocking-of-encrypted-volumes-using-policy-based-decryption_security-hardening[Configuring automated unlocking of encrypted volumes using policy-based decryption].
486+
* For more information about the TPM v2 and Tang encryption modes, see link:https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/security_hardening/configuring-automated-unlocking-of-encrypted-volumes-using-policy-based-decryption_security-hardening[Configuring automated unlocking of encrypted volumes using policy-based decryption].

0 commit comments

Comments
 (0)