Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Luks Blackbox Testing add tpm validation support. #1877

Open
prestist opened this issue May 29, 2024 · 0 comments
Open

Luks Blackbox Testing add tpm validation support. #1877

prestist opened this issue May 29, 2024 · 0 comments

Comments

@prestist
Copy link
Collaborator

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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant