KEYLIME-POLICY(1)
π 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 toDEBUG(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 (ecdsaorx509)-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 tologging.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
- centos-stream 10: python3-keylime 7.14.3-3.el10 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms