Skip to content

Add instance metadata#68

Open
augustuswm wants to merge 11 commits intomainfrom
awm/add-instance-meta
Open

Add instance metadata#68
augustuswm wants to merge 11 commits intomainfrom
awm/add-instance-meta

Conversation

@augustuswm
Copy link
Copy Markdown

@augustuswm augustuswm commented Apr 13, 2026

This is part of propolis#1114 to add support for including the project and silo ids in the VM instance configuration data provided by attestations. These PRs are meant as discussion points, and not intended to be merged yet. This change allows upstream callers to make richer policy decisions as project and silo ids are likely to be much more stable than VM ids.

The actual changes here are only to the data carrying type.

#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct VmInstanceConf {
    pub uuid: Uuid,
    pub project: Uuid,
    pub silo: Uuid,
    #[serde(rename = "boot-digest")]
    pub boot_digest: Option<Measurement>,
}

Copy link
Copy Markdown
Collaborator

@flihp flihp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These bits of metadata look like they'll be useful in access control as sort-of roles in the RBAC sense.

@flihp
Copy link
Copy Markdown
Collaborator

flihp commented Apr 16, 2026

since ixi has merged the branch this work builds on please do rebase on main, also seems like this can graduate from a draft once rebased

@iximeow
Copy link
Copy Markdown
Member

iximeow commented Apr 16, 2026

@flihp are we going to want a version number on VmInstanceConf at some point? presumably once we've gotten to a committed "V1" of instance data, which I know we're not really at either. just thinking about how user code in Propolis would know that an old attestation was valid if it's built against vm-attest/main and thinks there are fields outright missing?

@augustuswm
Copy link
Copy Markdown
Author

Certainly will get this rebased. To @iximeow's question. I did wonder if I should be introducing these as Option types, even though we declare the API to be unstable. As this change would break users that are tracking main and trying to deserialize existing R19 attestations.

@augustuswm augustuswm marked this pull request as ready for review April 21, 2026 15:22
@augustuswm
Copy link
Copy Markdown
Author

augustuswm commented Apr 21, 2026

Promoted to a real PR, and I'll put a note on the agenda for how much we want to lean in to a breaking API change (even though that it is clearly documented as unstable).

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

Successfully merging this pull request may close these issues.

3 participants