Luks Blackbox Testing add tpm validation support.
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 974
- Forks
- 296
- Avg merge
- 6d 14h
- Merged PRs (30d)
- 9
Description
Feature Request
When testing luks and using a non static clevis binding as developer I would like to know that not only does the device get encrypted; But I want to verify the binding I used is what is reported after ignition runs.
Add support for ClevisBinding verification in the blackbox tests.
As an example,
func LuksWithTPM() types.Test {
name := "tpm.filesystem.luks.encrypt"
in := types.GetBaseDisk()
out := types.GetBaseDisk()
mntDevices := []types.MntDevice{
{
Label: "OEM",
Substitution: "$DEVICE",
},
}
config := `{
"ignition": { "version": "$version" },
"storage": {
"disks": [
{
"device": "$DEVICE",
"partitions": [
{
"label": "luks-device",
"sizeMiB": 0,
"startMiB": 0
}
],
"wipe_table": true
}
],
"luks": [
{
"clevis": {
"tpm2": true
},
"device": "$DEVICE",
"name": "$UUID",
"wipe_volume": true
}
]
}
}`
Would be verified by
in[0].Partitions.GetPartition("OEM").ClevisBinding = ""
out[0].Partitions.GetPartition("OEM").ClevisBinding = "tpm2"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the Go blackbox tests covering LUKS encryption and read how test input and output partitions are represented. Run the relevant LUKS blackbox tests, then add ClevisBinding verification so the TPM example reports an empty input binding and tpm2 in the output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100