Skip to content

hypervisor: Add unauthenticated methods for read-only endpoints#228

Open
Vikramarjuna wants to merge 4 commits intoCloud-Foundations:masterfrom
Vikramarjuna:hypervisor-unauthenticated-method
Open

hypervisor: Add unauthenticated methods for read-only endpoints#228
Vikramarjuna wants to merge 4 commits intoCloud-Foundations:masterfrom
Vikramarjuna:hypervisor-unauthenticated-method

Conversation

@Vikramarjuna
Copy link
Copy Markdown
Contributor

@Vikramarjuna Vikramarjuna commented Feb 20, 2026

Add UnauthenticatedMethods configuration for hypervisor SRPC service.

These methods don't require TLS client certificates, matching the behavior
of their existing HTTP endpoint equivalents:

  • GetCapacity
  • GetVmInfo / GetVmInfos
  • GetVmLastPatchLog
  • ListSubnets
  • ListVMs

@Vikramarjuna Vikramarjuna marked this pull request as draft February 20, 2026 11:38
Comment thread hypervisor/rpcd/api.go Outdated
return manager.CheckOwnership(authInfo)
})
srpc.RegisterNameWithOptions("Hypervisor", srpcObj, srpc.ReceiverOptions{
UnauthenticatedMethods: []string{
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be gated with an option. See the imageserver for how this is done.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed

Comment thread hypervisor/rpcd/api.go
"DiscardVmOldUserData",
"DiscardVmSnapshot",
"ExportLocalVm",
"GetCapacity",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This and the other methods should not be removed from this list. Unauthenticated methods are not implicitly public methods.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed

Comment thread hypervisor/rpcd/api.go Outdated
}

func Setup(manager *manager.Manager, dhcpServer DhcpServer,
func Setup(config Config, manager *manager.Manager, dhcpServer DhcpServer,
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please also move the non-configuration parameters into a Params type, as was done for the Imageserver.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Addressed

@Vikramarjuna Vikramarjuna marked this pull request as ready for review April 29, 2026 18:41
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.

2 participants