Debian Codegraph @

ansible_collections/dellemc/openmanage/docs/modules/idrac_secure_boot.rst

raw
1 .. _idrac_secure_boot_module:
2
3
4 idrac_secure_boot -- Configure attributes, import, or export secure boot certificate, and reset keys.
5 =====================================================================================================
6
7 .. contents::
8 :local:
9 :depth: 1
10
11
12 Synopsis
13 --------
14
15 This module allows you to perform the following operations.\`
16
17 Import or Export Secure Boot certificate.
18
19 Enable or disable Secure Boot mode.
20
21 Configure Platform Key (PK) and Key Exchange Key (KEK) policies
22
23 Configure Allow Database (DB) and Disallow Database (DBX) certificates.
24
25 Reset UEFI Secure Boot keys.
26
27
28
29 Requirements
30 ------------
31 The below requirements are needed on the host that executes this module.
32
33 - python \>= 3.9.6
34
35
36
37 Parameters
38 ----------
39
40 boot_mode (optional, str, None)
41 Boot mode of the iDRAC. Not supported for 17G iDRAC10 and later.
42
43 :literal:`Uefi` enables the secure boot in UEFI mode.
44
45 :literal:`Bios` enables the secure boot in BIOS mode.
46
47
48 secure_boot (optional, str, None)
49 UEFI Secure Boot.
50
51 The :emphasis:`secure\_boot` can be :literal:`Enabled` only if :emphasis:`boot\_mode` is :literal:`UEFI` and :emphasis:`force\_int\_10` is :literal:`Disabled`.
52
53 :literal:`Disabled` disables the secure boot mode.
54
55 :literal:`Enabled` enables the secure boot mode.
56
57
58 secure_boot_mode (optional, str, None)
59 The UEFI Secure Boot mode configures how to use the Secure Boot Policy.
60
61 :literal:`AuditMode` sets the Secure Boot mode to an Audit mode when Platform Key is not installed on the system. The BIOS does not authenticate updates to the policy objects and transition between modes. BIOS performs a signature verification on pre-boot images and logs the results in the Image Execution Information table, where it processes the images whether the status of verification is pass or fail.
62
63 :literal:`DeployedMode` sets the Secure Boot mode to a Deployed mode when Platform Key is installed on the system, and then BIOS performs a signature verification to update the policy objects.
64
65 :literal:`UserMode` sets the Secure Boot mode to a User mode when Platform Key is installed on the system, and then BIOS performs signature verification to update policy objects.
66
67
68 secure_boot_policy (optional, str, None)
69 The following are the types of Secure Boot policy.
70
71 :literal:`Custom` inherits the standard certificates and image digests that are loaded in the system by default. You can modify the certificates and image digests.
72
73 :literal:`Standard` indicates that the system has default certificates, image digests, or hash loaded from the factory.
74
75 When the Secure Boot Policy is set to Custom, you can perform following operations such as viewing, exporting, importing, deleting, deleting all, and resetting policies.
76
77
78 force_int_10 (optional, str, None)
79 Determines whether the system BIOS loads the legacy video (INT 10h) option ROM from the video controller.
80
81 This parameter is supported only in UEFI boot mode. If UEFI Secure Boot mode is enabled, you cannot enable this parameter.
82
83 This parameter is not supported for 17G iDRAC10 and later.
84
85 :literal:`Disabled` if the operating system supports UEFI video output standards.
86
87 :literal:`Enabled` if the operating system does not support UEFI video output standards.
88
89
90 export_certificates (optional, bool, None)
91 Export all the available certificates in the specified directory for the given keys.
92
93 :emphasis:`export\_cetificates` is mutually exclusive with :emphasis:`import`.
94
95 :emphasis:`export\_cetificates` is :literal:`true` either of :emphasis:`platform\_key` or i(key\_exchange\_key) or :emphasis:`database` - or :emphasis:`disallow\_database` is required.
96
97
98 import_certificates (optional, bool, None)
99 Import all the specified key certificates.
100
101 When :emphasis:`import\_certificates` is :literal:`true`\ , then either :emphasis:`platform\_key`\ , :emphasis:`KEK`\ , :emphasis:`database`\ , or :emphasis:`disallow\_database` is required.
102
103
104 platform_key (optional, path, None)
105 The absolute path of the Platform key certificate file for UEFI secure boot.
106
107 Directory path with write permission when :emphasis:`export\_certificates` is :literal:`true`.
108
109
110 KEK (optional, list, None)
111 A list of absolute paths of the Key Exchange Key (KEK) certificate file for UEFI secure boot.
112
113 Directory path with write permission when :emphasis:`export\_certificates` is :literal:`true`.
114
115
116 database (optional, list, None)
117 A list of absolute paths of the Allow Database(DB) certificate file for UEFI secure boot.
118
119 Directory path with write permission when :emphasis:`export\_certificates` is :literal:`true`.
120
121
122 disallow_database (optional, list, None)
123 A list of absolute paths of the Disallow Database(DBX) certificate file for UEFI secure boot.
124
125 Directory path with write permission when :emphasis:`export\_certificates` is :literal:`true`.
126
127
128 reset_keys (optional, str, None)
129 Resets the UEFI Secure Boot keys.
130
131 :literal:`DeleteAllKeys` deletes the content of all UEFI Secure Boot key databases (PK, KEK, DB, and DBX). This choice configures the system in Setup Mode.
132
133 :literal:`DeletePK` deletes the content of the PK UEFI Secure Boot database. This choice configures the system in Setup Mode.
134
135 :literal:`ResetAllKeysToDefault` resets the content of all UEFI Secure Boot key databases (PK, KEK, DB, and DBX) to their default values.
136
137 :literal:`ResetDB` resets the content of the DB UEFI Secure Boot database to its default values.
138
139 :literal:`ResetDBX` resets the content of the DBX UEFI Secure Boot database to its default values.
140
141 :literal:`ResetKEK` resets the content of the KEK UEFI Secure Boot database to its default values.
142
143 :literal:`ResetPK` resets the content of the PK UEFI Secure Boot database to its default values.
144
145
146 restart (optional, bool, False)
147 Secure boot certificate import operation requires a server restart. This parameter provides an option to restart the server.
148
149 :literal:`true` restarts the server.
150
151 :literal:`false` does not restart the server.
152
153 :emphasis:`restart` is applicable when :emphasis:`import\_certificates` is :literal:`true`.
154
155 :emphasis:`restart` will be ignored only when :emphasis:`export\_certificates` is :literal:`true`.
156
157
158 restart_type (optional, str, GracefulRestart)
159 Restart type of the server.
160
161 :literal:`ForceRestart` forcefully restarts the server.
162
163 :literal:`GracefulRestart` gracefully restarts the server.
164
165 :emphasis:`restart\_type` is applicable when :emphasis:`restart` is :literal:`true`.
166
167
168 job_wait (optional, bool, True)
169 Whether to wait till completion of the secure boot certificate operation. This is applicable when :emphasis:`restart` is :literal:`true`.
170
171
172 job_wait_timeout (optional, int, 1200)
173 The maximum wait time of :emphasis:`job\_wait` in seconds. The job is tracked only for this duration.
174
175 This option is applicable when :emphasis:`job\_wait` is :literal:`true`.
176
177
178 idrac_ip (True, str, None)
179 iDRAC IP Address.
180
181
182 idrac_user (False, str, None)
183 iDRAC username.
184
185 If the username is not provided, then the environment variable :envvar:`IDRAC\_USERNAME` is used.
186
187 Example: export IDRAC\_USERNAME=username
188
189
190 idrac_password (False, str, None)
191 iDRAC user password.
192
193 If the password is not provided, then the environment variable :envvar:`IDRAC\_PASSWORD` is used.
194
195 Example: export IDRAC\_PASSWORD=password
196
197
198 x_auth_token (False, str, None)
199 Authentication token.
200
201 If the x\_auth\_token is not provided, then the environment variable :envvar:`IDRAC\_X\_AUTH\_TOKEN` is used.
202
203 Example: export IDRAC\_X\_AUTH\_TOKEN=x\_auth\_token
204
205
206 idrac_port (optional, int, 443)
207 iDRAC port.
208
209
210 validate_certs (optional, bool, True)
211 If :literal:`false`\ , the SSL certificates will not be validated.
212
213 Configure :literal:`false` only on personally controlled sites where self-signed certificates are used.
214
215 Prior to collection version :literal:`5.0.0`\ , the :emphasis:`validate\_certs` is :literal:`false` by default.
216
217
218 ca_path (optional, path, None)
219 The Privacy Enhanced Mail (PEM) file that contains a CA certificate to be used for the validation.
220
221
222 timeout (optional, int, 30)
223 The socket level timeout in seconds.
224
225
226
227
228
229 Notes
230 -----
231
232 .. note::
233 - This module will always report changes found to be applied for :emphasis:`import\_certificates` when run in :literal:`check mode`.
234 - This module does not support idempotency when :emphasis:`reset\_type` or :emphasis:`export\_certificates` or :emphasis:`import\_certificates` is provided.
235 - To configure the secure boot settings, the idrac\_secure\_boot module performs the following order of operations set attributes, export certificate, reset keys, import certificate, and restart iDRAC.
236 - :emphasis:`export\_certificate` will export all the certificates of the key defined in the playbook.
237 - This module considers values of :emphasis:`restart` and :emphasis:`job\_wait` only for the last operation in the sequence.
238 - This module supports IPv4 and IPv6 addresses.
239 - Only :emphasis:`reset\_keys` is supported on iDRAC8.
240
241
242
243
244 Examples
245 --------
246
247 .. code-block:: yaml+jinja
248
249
250 ---
251 - name: Enable Secure Boot.
252 dellemc.openmanage.idrac_secure_boot:
253 idrac_ip: "192.168.1.2"
254 idrac_user: "user"
255 idrac_password: "password"
256 ca_path: "/path/to/ca_cert.pem"
257 secure_boot: "Enabled"
258
259 - name: Set Secure Boot mode, Secure Boot policy, and restart iDRAC.
260 dellemc.openmanage.idrac_secure_boot:
261 idrac_ip: "192.168.1.2"
262 idrac_user: "user"
263 idrac_password: "password"
264 ca_path: "/path/to/ca_cert.pem"
265 secure_boot: "Enabled"
266 secure_boot_mode: "UserMode"
267 secure_boot_policy: "Custom"
268 restart: true
269 restart_type: "GracefulRestart"
270
271 - name: Reset Secure Boot certificates.
272 dellemc.openmanage.idrac_secure_boot:
273 idrac_ip: "192.168.1.2"
274 idrac_user: "user"
275 idrac_password: "password"
276 ca_path: "/path/to/ca_cert.pem"
277 reset_keys: "ResetAllKeysToDefault"
278
279 - name: Export multiple Secure Boot certificate.
280 dellemc.openmanage.idrac_secure_boot:
281 idrac_ip: "192.168.1.2"
282 idrac_user: "user"
283 idrac_password: "password"
284 ca_path: "/path/to/ca_cert.pem"
285 export_certificates: true
286 platform_key: /user/name/export_cert/pk
287 KEK:
288 - /user/name/export_cert/kek
289 database:
290 - /user/name/export_cert/db
291 disallow_database:
292 - /user/name/export_cert/dbx
293
294 - name: Import multiple Secure Boot certificate without applying to iDRAC.
295 dellemc.openmanage.idrac_secure_boot:
296 idrac_ip: "192.168.1.2"
297 idrac_user: "user"
298 idrac_password: "password"
299 ca_path: "/path/to/ca_cert.pem"
300 import_certificates: true
301 platform_key: /user/name/certificates/pk.pem
302 KEK:
303 - /user/name/certificates/kek1.pem
304 - /user/name/certificates/kek2.pem
305 database:
306 - /user/name/certificates/db1.pem
307 - /user/name/certificates/db2.pem
308 disallow_database:
309 - /user/name/certificates/dbx1.pem
310 - /user/name/certificates/dbx2.pem
311
312 - name: Import a Secure Boot certificate and restart the server to apply it.
313 dellemc.openmanage.idrac_secure_boot:
314 idrac_ip: "192.168.1.2"
315 idrac_user: "user"
316 idrac_password: "password"
317 ca_path: "/path/to/ca_cert.pem"
318 import_certificates: true
319 platform_key: /user/name/certificates/pk.pem
320 restart: true
321 job_wait_timeout: 600
322
323
324
325 Return Values
326 -------------
327
328 msg (always, str, Successfully imported the SecureBoot certificate.)
329 Status of the secure boot operation.
330
331
332 error_info (on HTTP error, dict, {'error': {'code': 'Base.1.0.GeneralError', 'message': 'A general error has occurred. See ExtendedInfo for more information.', '@Message.ExtendedInfo': [{'MessageId': 'GEN1234', 'RelatedProperties': [], 'Message': 'Unable to process the request because an error occurred.', 'MessageArgs': [], 'Severity': 'Critical', 'Resolution': 'Retry the operation. If the issue persists, contact your system administrator.'}]}})
333 Details of the HTTP Error.
334
335
336
337
338
339 Status
340 ------
341
342
343
344
345
346 Authors
347 ~~~~~~~
348
349 - Abhishek Sinha(@ABHISHEK-SINHA10)
350 - Lovepreet Singh (@singh-lovepreet1)
351 - Rounak Adhikary (@rounak-adhikary)
352