KEYLIME-POLICY(1)

πŸ“¦
version 7.14.3 Β· 3 versions
, in centos-stream 10

πŸ’– KEYLIME-POLICY πŸ’–

okay so bestie, welcome to keylime-policy(1) β€” a General Commands Manual situation and honestly it's giving main character energy for your whole attestation setup ✨ this is the Keylime policy creation and signing tool, and by the end of this page you're gonna know her like the back of your hand 🫢


✨ SYNOPSIS ✨

keylime-policy {create,sign} [OPTIONS]
⚠️ (Requires root privileges, use with sudo) β€” like, actually. sudo or nothing, bestie πŸ’…

🌸 DESCRIPTION 🌸

keylime-policy is a utility for creating and signing Keylime policies. That's the whole vibe ngl πŸ’œ

She supports creating runtime policies (for IMA/filesystem attestation) and measured boot policies (for boot-time attestation), and she also signs runtime policies using DSSE (Dead Simple Signing Envelope). Dead Simple, and yet so iconic 😭πŸ”₯


πŸ‘‘ COMMANDS πŸ‘‘

πŸŽ€ keylime-policy create runtime [OPTIONS]

Create runtime policies from filesystem, allowlists, RPM repositories, or IMA measurement lists. pick your source, she's flexible πŸ’…

Options:

  • -o, --output OUTPUT β€” Output file (defaults to stdout, if you're feeling ✨ spontaneous ✨)
  • -p, --base-policy BASE_POLICY β€” Merge new data into existing JSON runtime policy
  • -k, --keyrings β€” Create keyrings policy entries
  • -b, --ima-buf β€” Process ima-buf entries other than keyrings
  • -a, --allowlist ALLOWLIST β€” Read checksums from plain-text allowlist
  • -e, --excludelist EXCLUDE_LIST_FILE β€” Add IMA exclude list to policy
  • -m, --ima-measurement-list [IMA_MEASUREMENT_LIST] β€” Use IMA measurement list for hash/keyring extraction
  • --ignored-keyrings IGNORED_KEYRINGS β€” Ignore specified keyring (repeatable β€” yes you can stack her πŸ“)
  • --add-ima-signature-verification-key IMA_SIGNATURE_KEYS β€” Add x509/key to tenant_keyring (repeatable, same deal πŸ’–)
  • --show-legacy-allowlist β€” Display digests in legacy allowlist format
  • -v, --verbose β€” Set log level to DEBUG (she gets chatty πŸ‘€)

Filesystem scanning:

  • --algo {sha1,sha256,sha384,sha512,sm3_256} β€” Checksum algorithm, pick your fave
  • --ramdisk-dir RAMDISK_DIR β€” Path to initrds (e.g., /boot)
  • --rootfs ROOTFS β€” Path to root filesystem (e.g., /)
  • -s, --skip-path SKIP_PATH β€” Comma-separated directories to skip (bye bye πŸ‘‹)

Repository scanning:

  • --local-rpm-repo LOCAL_RPM_REPO β€” Local RPM repository directory
  • --remote-rpm-repo REMOTE_RPM_REPO β€” Remote RPM repository URL

πŸ¦‹ keylime-policy create measured-boot [OPTIONS]

Create measured boot reference state policies from UEFI event logs. boot-time attestation era πŸ’€βœ¨

Options:

  • -e, --eventlog-file EVENTLOG_FILE β€” Binary UEFI eventlog (required β€” no cap, you need this one)
  • --without-secureboot, -i β€” Create policy without SecureBoot (MeasuredBoot only)
  • -o, --output OUTPUT β€” Output path for generated measured boot policy

🌈 keylime-policy sign runtime [OPTIONS]

Sign runtime policies using DSSE. glow-up time for your policy πŸ”₯

Options:

  • -o, --output OUTPUT_FILE β€” Output file for DSSE-signed policy
  • -r, --runtime-policy POLICY β€” Runtime policy file to sign (required πŸ’…)
  • -k, --keyfile KEYFILE β€” EC private key for signing
  • -p, --keypath KEYPATH β€” Output filename for created private key
  • -b, --backend {ecdsa,x509} β€” DSSE backend (ecdsa or x509)
  • -c, --cert-outfile CERT_OUTFILE β€” Output file for x509 certificate (x509 backend)

πŸ’– EXAMPLES πŸ’–

Create runtime policy from filesystem:

sudo keylime-policy create runtime --rootfs / --output my-policy.json

Create runtime policy from allowlist:

sudo keylime-policy create runtime --allowlist my-allowlist.txt --output policy.json

Create measured boot policy:

sudo keylime-policy create measured-boot -e /sys/kernel/security/tpm0/binary_bios_measurements -o mb-policy.json

Sign runtime policy:

sudo keylime-policy sign runtime -r policy.json -k signing-key.pem -o signed-policy.json

see how every single one is sudo? yeah. she meant it 🫢


🧚 ENVIRONMENT 🧚

  • KEYLIME_LOGGING_CONFIG β€” Path to logging.conf

⭐ NOTES ⭐

  • All operations require root privileges πŸ‘‘
  • Runtime policies use JSON format
  • Measured boot policies require binary UEFI event logs
  • DSSE signing supports both ECDSA and x509 backends

πŸ“ SEE ALSO πŸ“

keylime_tenant(1), keylime_verifier(8), keylime_registrar(8) β€” go read the whole friend group, iykyk πŸ’œ


πŸ™ˆ BUGS πŸ™ˆ

Report bugs at https://github.com/keylime/keylime/issues β€” not me filing a bug report at 2am but like... do it, they wanna know 😭


πŸ’œ AUTHOR πŸ’œ

Keylime Developers β€” legends, honestly πŸ‘‘


and that's the page!! brought to you by the General Commands Manual girlies, keylime-policy(1), dated September 2025 πŸŒΈπŸŽ€βœ¨ go forth and sign your policies, bestie πŸ’…

πŸ“¦ where this page comes from