coreos / coreos/ignition

Luks Blackbox Testing add tpm validation support.

Open
#1,877 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.