-
Notifications
You must be signed in to change notification settings - Fork 592
Add vTPM specification #920
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -352,6 +352,24 @@ type LinuxRdma struct { | |
| HcaObjects *uint32 `json:"hcaObjects,omitempty"` | ||
| } | ||
|
|
||
| // LinuxVTPM for vTPM definition | ||
| type LinuxVTPM struct { | ||
| // Path on host where vTPM writes state to | ||
| StatePath string `json:"statePath,omitempty"` | ||
| // Whether runc is allowed to delete the 'Statepath' once the TPM is destroyed | ||
| StatePathIsManaged bool `json:"statePathIsManaged,omitempty"` | ||
| // Version of the TPM that is emulated | ||
| TPMVersion string `json:"vtpmVersion,omitempty"` | ||
| // Whether to create certificates upon first start of vTPM | ||
| CreateCertificates bool `json:"createCerts,omitempty"` | ||
| // The PCR banks to enable | ||
| PcrBanks string `json:"pcrBanks,omitempty"` | ||
| // Under what user to run the vTPM process | ||
| RunAs string `json:"runAs,omitempty"` | ||
| // The password to derive the encryption key from | ||
| EncryptionPassword string `json:"encryptionPassword,omitempty"` | ||
| } | ||
|
|
||
| // LinuxResources has container runtime resource constraints | ||
| type LinuxResources struct { | ||
| // Devices configures the device whitelist. | ||
|
|
@@ -372,12 +390,16 @@ type LinuxResources struct { | |
| // Limits are a set of key value pairs that define RDMA resource limits, | ||
| // where the key is device name and value is resource limits. | ||
| Rdma map[string]LinuxRdma `json:"rdma,omitempty"` | ||
| // VTPM configuration | ||
| VTPMs []LinuxVTPM `json:"vtpms,omitempty"` | ||
| } | ||
|
|
||
| // LinuxDevice represents the mknod information for a Linux special device file | ||
| type LinuxDevice struct { | ||
| // Path to the device. | ||
| Path string `json:"path"` | ||
| // Path of passed-through device on host | ||
| Devpath string `json:"devpath"` | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What is this needed for? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So that /dev/tpm10 on the host can appear as /dev/tpm0 inside the container. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to know the host path or the entity creating the config.json can get the host device major / minor? For e.g. docker/podman have this feature: The config.json snippet for this: |
||
| // Device type, block, char, etc. | ||
| Type string `json:"type"` | ||
| // Major is the device's major number. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does it make sense to run this as the container user or it is typically set to a separate
tssuser?