Simple secret-based auth for VM ownership #2
Labels
No labels
prio_critical
prio_low
type_bug
type_contact
type_issue
type_lead
type_question
type_story
type_task
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lhumina_code/hero_compute#2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Add a
secretfield to VM deployment so users can only see and manage their own VMs. No user accounts, no JWT; just a secret string stored on the VM record.How It Works
When deploying a VM, the user provides a secret:
deploy_vm(name, slice_sid, image, cpu_count, secret)The secret is stored on the Vm record. All subsequent operations require the same secret to be passed:
list_vms(secret)— returns only VMs matching the secretget_vm(sid, secret)— returns error if secret doesn't matchdelete_vm(sid, secret)— returns error if secret doesn't matchstart_vm,stop_vm,restart_vm— require secret tooVMs without a matching secret are invisible — not returned in lists, not accessible by sid. No indication they exist.
Changes Required
schemas/cloud/cloud.oschema— addsecret: strto Vm type and update all affected service methodsrpc.rs— validate secret on every VM operationhero_cloud_sdk— update all input types with secret fieldopenrpc.json— regenerate from schemadocs/api.md— document secret field and behaviorNotes
Fixed