Skip to content

Conversation

@majst01
Copy link
Contributor

@majst01 majst01 commented Dec 8, 2025

Description

Add VPN related Service.

@majst01 majst01 requested a review from a team as a code owner December 8, 2025 15:21
@metal-robot metal-robot bot added this to Development Dec 8, 2025
@majst01 majst01 self-assigned this Dec 22, 2025
// VPNService serves vpn related functions
service VPNService {
// AuthKey generates a authkey for a project to join a machine to the project vpn
rpc Authkey(VPNServiceAuthkeyRequest) returns (VPNServiceAuthkeyResponse) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
rpc Authkey(VPNServiceAuthkeyRequest) returns (VPNServiceAuthkeyResponse) {
rpc AuthKey(VPNServiceAuthkeyRequest) returns (VPNServiceAuthkeyResponse) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

}
// ListNodes returns a list of machines actually connected to the vpn
rpc ListNodes(VPNServiceListNodesRequest) returns (VPNServiceListNodesResponse) {
option (metalstack.api.v2.admin_roles) = ADMIN_ROLE_EDITOR;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
option (metalstack.api.v2.admin_roles) = ADMIN_ROLE_EDITOR;
option (metalstack.api.v2.admin_roles) = ADMIN_ROLE_EDITOR;
option (metalstack.api.v2.admin_roles) = ADMIN_ROLE_VIEWER;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

string address = 1;
// Authkey is the key to connect to the vpn at the given address.
// This key can only be seen once.
string authkey = 2;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
string authkey = 2;
string auth_key = 2;

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

// VPNServiceListNodesRequest is the request payload for a vpn list nodes request
message VPNServiceListNodesRequest {
// User if given only nodes of this user are returned
optional string user = 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe also use project and do not expose how headscale looks

Copy link
Contributor Author

@majst01 majst01 Jan 12, 2026

Choose a reason for hiding this comment

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

done

// Name of this node
string name = 2;
// User of this node, maps to a project
optional string user = 3;
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe project. Why can this be null?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

renamed, not optional anymore

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

4 participants