BIOS Operations

BIOS/UEFI configuration and management commands.

BIOS Certificate

Check BIOS Options on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYesbios certificate managementCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersBIOS Certificate OptionsYesOptions passed into BIOS Certificate

BIOS Certificate Options

AttributeTypeRequiredDefaultDescription
passwordstringEither of*BIOS Password
old_passwordstringEither of*Old BIOS Password
cert_pathstringEither of*BIOS Certificate
key_pathstringEither of*BIOS Certificate Private Key
serialstringEither of*Serial number of device
expectBIOS Certificate Expect OptionsNoArray of expected BIOS Certificate Options

BIOS Certificate Expect Options

AttributeTypeRequiredDefaultDescription
should_failboolYesBIOS Option

BIOS Certificate Example

- cmd: bios certificate management
  name: Enable certificate
  transport: *transport
  parameters:
    command: enable
    password: mypassword
    cert_path: /root/default-tools/system-suite/4k/new/cert.pem
- cmd: bios certificate management
  name: Check certificate thumbprint
  transport: *transport
  parameters:
    command: check
    cert_path: /root/default-tools/system-suite/4k/new/cert.pem
- cmd: bios certificate management
  name: Disable certificate
  transport: *transport
  parameters:
    command: disable
    key_path: /root/default-tools/system-suite/4k/new/key.pem
    password: mypassword
- cmd: bios certificate management
  name: Clear certificate
  transport: *transport
  parameters:
    command: clear
    key_path: /root/default-tools/system-suite/4k/new/key.pem
- cmd: bios certificate management
  name: Update password
  transport: *transport
  parameters:
    command: set-password
    old_password: mypassword
    password: mynewpassword

BIOS Settings Get

Check BIOS Options on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYesget bios settingCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersBIOS Settings Get OptionsYesOptions passed into BIOS Settings Get

BIOS Settings Get Options

AttributeTypeRequiredDefaultDescription
expect[]BIOS Settings Get Expect OptionsYesArray of expected BIOS Settings

BIOS Settings Get Expect Options

AttributeTypeRequiredDefaultDescription
optionstringYesBIOS Option
valuestringYesExpected Value (supports regex)

BIOS Settings Get Example

cmd: get bios setting
name: "Check BIOS Settings"
transport: *transport
parameters:
  expect:
    - option: BootDisplayDevice
      value: LCD
    - option: BootMode
      value: Quick
    - option: BootOrderLock
      value: Disable

BIOS Settings Set

Try to set BIOS Options on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYesset bios settingCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersBIOS Settings Set OptionsYesOptions passed into BIOS Settings Set

BIOS Settings Set Options

AttributeTypeRequiredDefaultDescription
passwordstringNoBIOS Password
key_pathstringNoBIOS Cert Key
bios_options[]BIOS OptionsYesArray of BIOS Options to set

BIOS Options

AttributeTypeRequiredDefaultDescription
optionstringYesBIOS Option
valuestringYesValue to set
should_failboolNoSet to true, if the cmd should fail

BIOS Settings Set Example

cmd: set bios setting
name: "Set Target BIOS Settings"
transport: *transport
parameters:
  password: <bios-password>
  bios_options:
    - option: AlwaysOnUSB
      value: Disable
    - option: FingerprintPasswordAuthentication
      value: Disable

SecureBoot Management

Run different commands, based on sbctl on the DUT.

AttributeTypeRequiredDefaultDescription
cmdconstYesSecure Boot ManagementCommand Name
namestringYesName to uniquely identify the teststep. This name will show up in reports, logs and the WebUI
transportTransportObjectYesAdditional transport options
optionsOptionsObjectNoAdditional command options
parametersSecureBoot OptionsYesOptions passed into the Secure Boot Management cmd

SecureBoot Options

AttributeTypeRequiredDefaultDescription
commandstringYesCommand to execute. Can be one of: status, enroll-key, rotate-key, reset, custom-key.
hierarchystringYesHierarchy to use for the key. Can be one of: db, dbx, KEK, PK.
key_filestringNoPath to the key file used for enroll-key and rotate-key commands.
custom_key_filestringNoPath to the custom key file used for custom-key command.
cert_filestringNoPath to the certificate file used for enroll-key and rotate-key commands.
signing_key_filestringNoPath to the signing key file used for enroll-key and rotate-key commands.
signing_cert_filestringNoPath to the signing certificate file used for enroll-key and rotate-key commands.
appendbooleanNofalseAppend the key to the existing key database.
expectSecureBoot Expect OptionsNoparametersExpectations for the command execution.

SecureBoot Expect Options

AttributeTypeRequiredDefaultDescription
should_failbooleanNofalseIf set to true, the test step will fail if the command does not fail.
secure_bootbooleanYesfalseIf set to true, the test step will fail if Secure Boot is not enabled.
setup_modebooleanYesfalseIf set to true, the test step will fail if Secure Boot is not in setup mode.

SecureBoot Management Examples

- cmd: Secure Boot Management
  name: Check if SetupMode is enabled
  transport: *transport
  parameters:
    command: status
    expect:
      secure_boot: false
      setup_mode: true

- cmd: Secure Boot Management
  name: Enroll invalid signed PK key
  transport: *transport
  parameters:
    command: custom-key
    hierarchy: PK
    custom_key_file: /tmp/sbctl/keys/invalidPK.auth
    expect:
      should_fail: true

- cmd: Secure Boot Management
  name: Enroll db key
  transport: *transport
  parameters:
    command: enroll-key
    hierarchy: db
    key_file: /tmp/sbctl/keys/DB.key
    cert_file: /tmp/sbctl/keys/DB.crt
    signing_key_file: /tmp/sbctl/keys/KEK.key
    signing_cert_file: /tmp/sbctl/keys/KEK.crt
    append: true

- cmd: Secure Boot Management
  name: Rotate db key
  transport: *transport
  parameters:
    command: rotate-key
    hierarchy: db
    key_file: /tmp/sbctl/keys-new/DB.key
    cert_file: /tmp/sbctl/keys-new/DB.crt
    signing_key_file: /tmp/sbctl/keys/KEK.key
    signing_cert_file: /tmp/sbctl/keys/KEK.crt

- cmd: Secure Boot Management
  name: Reset db key
  transport: *transport
  parameters:
    command: reset
    hierarchy: db
    signing_key_file: /tmp/sbctl/keys/KEK.key
    signing_cert_file: /tmp/sbctl/keys/KEK.crt
    cert_file: /tmp/sbctl/keys/DB.crt