Skip to content

Add project and silo ids to VM attestation#1114

Draft
augustuswm wants to merge 2 commits intomasterfrom
awm/add-instance-meta
Draft

Add project and silo ids to VM attestation#1114
augustuswm wants to merge 2 commits intomasterfrom
awm/add-instance-meta

Conversation

@augustuswm
Copy link
Copy Markdown

@augustuswm augustuswm commented Apr 13, 2026

This relies on vm-attest#68 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. For instance if we are rolling deployments we may bring up multiple VMs and move IPs between them to roll a release forwards or backwards. It would be a lot of coordination to propagate that value to all of the policy deciders during a deploy when what we would really want is to specify a policy for all VMs in a project (or possibly with a tag in a future world).

There is not much interesting going on outside of piping the ids through. That said, it makes the API for prepare_instance_conf pretty nasty as we are passing three opaque Uuids that rely on their order to be correct. Happy to change this to something like a builder or some other pattern to avoid errors.

The primary focus of this PR though is to discuss if this the correct path to passing the data to the attestation. Notably we do not provide any access to sled metadata so as to split this conversion from concerns about exposing placement data.

@augustuswm augustuswm requested a review from flihp April 13, 2026 19:05
@morlandi7 morlandi7 requested a review from papertigers April 16, 2026 18:17
@flihp
Copy link
Copy Markdown

flihp commented Apr 16, 2026

💯 agree w/ policy element here. In your case you're looking for something akin to a group membership instead of a unique identifier for the instance. These are the only notion of "group" that we have currently but, as you note, a generic tag would be nice as a way to keep us from overloading the notion of project and silo too badly. Generally this seems like a reasonable evolution to me. I also agree that this makes some interfaces a bit precarious.

prepare_instance_conf takes all of the elements in the VmInstanceConf structure as parameters + the crucible volume that it uses to calculate the boot_digest. May be cleaner to instantiate & populate the VmInstanceConf structure around where we call prepare_instance_conf and just pass the VmInstanceConf through w/ the crucible volume. The VmInstanceConf passed to prepare_instance_conf would need to have the boot_digest set to None and prepare_instance_conf would eventually cause this to be set to Some(digest) if it can. This makes prepare_instance_conf a bit of a misnomer as it's not preparing the VmInstanceConf but instead just the boot_digest (which was all it did anyway i think?).

@iximeow
Copy link
Copy Markdown
Member

iximeow commented Apr 16, 2026

May be cleaner to instantiate & populate the VmInstanceConf structure around where we call prepare_instance_conf and just pass the VmInstanceConf through w/ the crucible volume

totally agree that setting up an initial VmInstanceConf and passing that along to get "finalized" would make the UUIDs less confusion-prone and probably automagically Do The Right Thing when we add more later.

This makes prepare_instance_conf a bit of a misnomer as it's not preparing the VmInstanceConf but instead just the boot_digest (which was all it did anyway i think?).

I'm pretty sure we just picked the name prepare_... because it's where it seemed we'd put any measurement of the guest VM that isn't statically derived from the instance spec. but yeah the only thing we're doing right now is measuring the boot digest. kinda getting ahead of ourselves on the naming!

@augustuswm
Copy link
Copy Markdown
Author

Thanks! I'll take another pass here and cleanup that interface.

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