Skip to content

Commit 5ea341c

Browse files
authored
Add vpn-service (#76)
1 parent 2f183a3 commit 5ea341c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1929
-110
lines changed

_typos.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ extend-ignore-re = [
77
]
88

99
[default.extend-words]
10+
PN = "PN"
1011

1112
[files]
1213
extend-exclude = [

doc/index.html

Lines changed: 292 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,6 +1782,52 @@ <h2>Table of Contents</h2>
17821782
</li>
17831783

17841784

1785+
<li>
1786+
<a href="#metalstack%2fapi%2fv2%2fvpn.proto">metalstack/api/v2/vpn.proto</a>
1787+
<ul>
1788+
1789+
<li>
1790+
<a href="#metalstack.api.v2.VPNNode"><span class="badge">M</span>VPNNode</a>
1791+
</li>
1792+
1793+
1794+
1795+
1796+
</ul>
1797+
</li>
1798+
1799+
1800+
<li>
1801+
<a href="#metalstack%2fadmin%2fv2%2fvpn.proto">metalstack/admin/v2/vpn.proto</a>
1802+
<ul>
1803+
1804+
<li>
1805+
<a href="#metalstack.admin.v2.VPNServiceAuthKeyRequest"><span class="badge">M</span>VPNServiceAuthKeyRequest</a>
1806+
</li>
1807+
1808+
<li>
1809+
<a href="#metalstack.admin.v2.VPNServiceAuthKeyResponse"><span class="badge">M</span>VPNServiceAuthKeyResponse</a>
1810+
</li>
1811+
1812+
<li>
1813+
<a href="#metalstack.admin.v2.VPNServiceListNodesRequest"><span class="badge">M</span>VPNServiceListNodesRequest</a>
1814+
</li>
1815+
1816+
<li>
1817+
<a href="#metalstack.admin.v2.VPNServiceListNodesResponse"><span class="badge">M</span>VPNServiceListNodesResponse</a>
1818+
</li>
1819+
1820+
1821+
1822+
1823+
<li>
1824+
<a href="#metalstack.admin.v2.VPNService"><span class="badge">S</span>VPNService</a>
1825+
</li>
1826+
1827+
</ul>
1828+
</li>
1829+
1830+
17851831
<li>
17861832
<a href="#metalstack%2fapi%2fv2%2fhealth.proto">metalstack/api/v2/health.proto</a>
17871833
<ul>
@@ -7290,6 +7336,13 @@ <h3 id="metalstack.api.v2.MachineAllocationQuery">MachineAllocationQuery</h3>
72907336
<td><p>Labels for which this machine allocation should get filtered </p></td>
72917337
</tr>
72927338

7339+
<tr>
7340+
<td>vpn</td>
7341+
<td><a href="#metalstack.api.v2.MachineVPN">MachineVPN</a></td>
7342+
<td>optional</td>
7343+
<td><p>VPN query if this machine has a vpn configuration </p></td>
7344+
</tr>
7345+
72937346
</tbody>
72947347
</table>
72957348

@@ -8615,9 +8668,14 @@ <h3 id="metalstack.api.v2.MachineVPN">MachineVPN</h3>
86158668
<td>connected</td>
86168669
<td><a href="#bool">bool</a></td>
86178670
<td></td>
8618-
<td><p>Connected indicate if this machine is connected to the VPN
8619-
8620-
TODO add machine ips </p></td>
8671+
<td><p>Connected indicate if this machine is connected to the VPN </p></td>
8672+
</tr>
8673+
8674+
<tr>
8675+
<td>ips</td>
8676+
<td><a href="#string">string</a></td>
8677+
<td>repeated</td>
8678+
<td><p>IPs of the machine connected to the vpn </p></td>
86218679
</tr>
86228680

86238681
</tbody>
@@ -14598,6 +14656,237 @@ <h3 id="metalstack.admin.v2.TokenService">TokenService</h3>
1459814656

1459914657

1460014658

14659+
<div class="file-heading">
14660+
<h2 id="metalstack/api/v2/vpn.proto">metalstack/api/v2/vpn.proto</h2><a href="#title">Top</a>
14661+
</div>
14662+
<p></p>
14663+
14664+
14665+
<h3 id="metalstack.api.v2.VPNNode">VPNNode</h3>
14666+
<p>VPNNode is a machine connected to the vpn</p>
14667+
14668+
14669+
<table class="field-table">
14670+
<thead>
14671+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
14672+
</thead>
14673+
<tbody>
14674+
14675+
<tr>
14676+
<td>id</td>
14677+
<td><a href="#uint64">uint64</a></td>
14678+
<td></td>
14679+
<td><p>Id of this node </p></td>
14680+
</tr>
14681+
14682+
<tr>
14683+
<td>name</td>
14684+
<td><a href="#string">string</a></td>
14685+
<td></td>
14686+
<td><p>Name of this node </p></td>
14687+
</tr>
14688+
14689+
<tr>
14690+
<td>project</td>
14691+
<td><a href="#string">string</a></td>
14692+
<td></td>
14693+
<td><p>Project of this node, maps to a project </p></td>
14694+
</tr>
14695+
14696+
<tr>
14697+
<td>ip_addresses</td>
14698+
<td><a href="#string">string</a></td>
14699+
<td>repeated</td>
14700+
<td><p>IPAddresses of this node in the vpn </p></td>
14701+
</tr>
14702+
14703+
<tr>
14704+
<td>last_seen</td>
14705+
<td><a href="#google.protobuf.Timestamp">google.protobuf.Timestamp</a></td>
14706+
<td></td>
14707+
<td><p>LastSeen timestamp when this node reached out the the control plane </p></td>
14708+
</tr>
14709+
14710+
<tr>
14711+
<td>online</td>
14712+
<td><a href="#bool">bool</a></td>
14713+
<td></td>
14714+
<td><p>Online indicates if this node is online </p></td>
14715+
</tr>
14716+
14717+
</tbody>
14718+
</table>
14719+
14720+
14721+
14722+
14723+
14724+
14725+
14726+
14727+
14728+
14729+
14730+
14731+
14732+
<div class="file-heading">
14733+
<h2 id="metalstack/admin/v2/vpn.proto">metalstack/admin/v2/vpn.proto</h2><a href="#title">Top</a>
14734+
</div>
14735+
<p></p>
14736+
14737+
14738+
<h3 id="metalstack.admin.v2.VPNServiceAuthKeyRequest">VPNServiceAuthKeyRequest</h3>
14739+
<p>VPNServiceAuthKeyRequest is the request payload for a vpn authkey request.</p>
14740+
14741+
14742+
<table class="field-table">
14743+
<thead>
14744+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
14745+
</thead>
14746+
<tbody>
14747+
14748+
<tr>
14749+
<td>project</td>
14750+
<td><a href="#string">string</a></td>
14751+
<td></td>
14752+
<td><p>Project for which a vpn authkey should be generated. </p></td>
14753+
</tr>
14754+
14755+
<tr>
14756+
<td>ephemeral</td>
14757+
<td><a href="#bool">bool</a></td>
14758+
<td></td>
14759+
<td><p>Ephemeral defines if the authkey should be ephemeral. </p></td>
14760+
</tr>
14761+
14762+
<tr>
14763+
<td>expires</td>
14764+
<td><a href="#google.protobuf.Duration">google.protobuf.Duration</a></td>
14765+
<td></td>
14766+
<td><p>Expires defines the duration after which the authkey expires. </p></td>
14767+
</tr>
14768+
14769+
</tbody>
14770+
</table>
14771+
14772+
14773+
14774+
14775+
14776+
<h3 id="metalstack.admin.v2.VPNServiceAuthKeyResponse">VPNServiceAuthKeyResponse</h3>
14777+
<p>VPNServiceAuthKeyResponse is the request payload for a authkey response</p>
14778+
14779+
14780+
<table class="field-table">
14781+
<thead>
14782+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
14783+
</thead>
14784+
<tbody>
14785+
14786+
<tr>
14787+
<td>address</td>
14788+
<td><a href="#string">string</a></td>
14789+
<td></td>
14790+
<td><p>Address is the address of the vpn control plane. </p></td>
14791+
</tr>
14792+
14793+
<tr>
14794+
<td>auth_key</td>
14795+
<td><a href="#string">string</a></td>
14796+
<td></td>
14797+
<td><p>AuthKey is the key to connect to the vpn at the given address.
14798+
This key can only be seen once. </p></td>
14799+
</tr>
14800+
14801+
</tbody>
14802+
</table>
14803+
14804+
14805+
14806+
14807+
14808+
<h3 id="metalstack.admin.v2.VPNServiceListNodesRequest">VPNServiceListNodesRequest</h3>
14809+
<p>VPNServiceListNodesRequest is the request payload for a vpn list nodes request</p>
14810+
14811+
14812+
<table class="field-table">
14813+
<thead>
14814+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
14815+
</thead>
14816+
<tbody>
14817+
14818+
<tr>
14819+
<td>project</td>
14820+
<td><a href="#string">string</a></td>
14821+
<td>optional</td>
14822+
<td><p>Project if given only nodes of this user are returned </p></td>
14823+
</tr>
14824+
14825+
</tbody>
14826+
</table>
14827+
14828+
14829+
14830+
14831+
14832+
<h3 id="metalstack.admin.v2.VPNServiceListNodesResponse">VPNServiceListNodesResponse</h3>
14833+
<p>VPNServiceListNodesResponse is the response payload for a vpn list nodes request</p>
14834+
14835+
14836+
<table class="field-table">
14837+
<thead>
14838+
<tr><td>Field</td><td>Type</td><td>Label</td><td>Description</td></tr>
14839+
</thead>
14840+
<tbody>
14841+
14842+
<tr>
14843+
<td>nodes</td>
14844+
<td><a href="#metalstack.api.v2.VPNNode">metalstack.api.v2.VPNNode</a></td>
14845+
<td>repeated</td>
14846+
<td><p>Nodes connected to the vpn </p></td>
14847+
</tr>
14848+
14849+
</tbody>
14850+
</table>
14851+
14852+
14853+
14854+
14855+
14856+
14857+
14858+
14859+
14860+
14861+
14862+
<h3 id="metalstack.admin.v2.VPNService">VPNService</h3>
14863+
<p>VPNService serves vpn related functions</p>
14864+
<table class="enum-table">
14865+
<thead>
14866+
<tr><td>Method Name</td><td>Request Type</td><td>Response Type</td><td>Description</td></tr>
14867+
</thead>
14868+
<tbody>
14869+
14870+
<tr>
14871+
<td>AuthKey</td>
14872+
<td><a href="#metalstack.admin.v2.VPNServiceAuthKeyRequest">VPNServiceAuthKeyRequest</a></td>
14873+
<td><a href="#metalstack.admin.v2.VPNServiceAuthKeyResponse">VPNServiceAuthKeyResponse</a></td>
14874+
<td><p>AuthKey generates a authkey for a project to join a machine to the project vpn</p></td>
14875+
</tr>
14876+
14877+
<tr>
14878+
<td>ListNodes</td>
14879+
<td><a href="#metalstack.admin.v2.VPNServiceListNodesRequest">VPNServiceListNodesRequest</a></td>
14880+
<td><a href="#metalstack.admin.v2.VPNServiceListNodesResponse">VPNServiceListNodesResponse</a></td>
14881+
<td><p>ListNodes returns a list of machines actually connected to the vpn</p></td>
14882+
</tr>
14883+
14884+
</tbody>
14885+
</table>
14886+
14887+
14888+
14889+
1460114890
<div class="file-heading">
1460214891
<h2 id="metalstack/api/v2/health.proto">metalstack/api/v2/health.proto</h2><a href="#title">Top</a>
1460314892
</div>

go.mod

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module github.com/metal-stack/api
33
go 1.25
44

55
require (
6-
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20251209175733-2a1774d88802.1
6+
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20251209175733-2a1774d88802.1
77
buf.build/go/protovalidate v1.1.0
88
connectrpc.com/connect v1.19.1
99
github.com/bufbuild/protocompile v0.14.1
@@ -12,7 +12,7 @@ require (
1212
github.com/google/go-cmp v0.7.0
1313
github.com/klauspost/connect-compress/v2 v2.1.0
1414
github.com/stretchr/testify v1.11.1
15-
google.golang.org/protobuf v1.36.10
15+
google.golang.org/protobuf v1.36.11
1616
)
1717

1818
require (
@@ -28,8 +28,8 @@ require (
2828
github.com/stretchr/objx v0.5.3 // indirect
2929
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 // indirect
3030
golang.org/x/text v0.32.0 // indirect
31-
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 // indirect
32-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 // indirect
31+
google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2 // indirect
32+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 // indirect
3333
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
3434
gopkg.in/yaml.v3 v3.0.1 // indirect
3535
)

go.sum

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20251209175733-2a1774d88802.1 h1:ZnX3qpF/pDiYrf+Q3p+/zCzZ5ELSpszy5hdVarDMSV4=
2-
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.10-20251209175733-2a1774d88802.1/go.mod h1:fUl8CEN/6ZAMk6bP8ahBJPUJw7rbp+j4x+wCcYi2IG4=
1+
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20251209175733-2a1774d88802.1 h1:j9yeqTWEFrtimt8Nng2MIeRrpoCvQzM9/g25XTvqUGg=
2+
buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/go v1.36.11-20251209175733-2a1774d88802.1/go.mod h1:tvtbpgaVXZX4g6Pn+AnzFycuRK3MOz5HJfEGeEllXYM=
33
buf.build/go/protovalidate v1.1.0 h1:pQqEQRpOo4SqS60qkvmhLTTQU9JwzEvdyiqAtXa5SeY=
44
buf.build/go/protovalidate v1.1.0/go.mod h1:bGZcPiAQDC3ErCHK3t74jSoJDFOs2JH3d7LWuTEIdss=
55
cel.dev/expr v0.25.1 h1:1KrZg61W6TWSxuNZ37Xy49ps13NUovb66QLprthtwi4=
@@ -60,12 +60,12 @@ golang.org/x/exp v0.0.0-20251209150349-8475f28825e9 h1:MDfG8Cvcqlt9XXrmEiD4epKn7
6060
golang.org/x/exp v0.0.0-20251209150349-8475f28825e9/go.mod h1:EPRbTFwzwjXj9NpYyyrvenVh9Y+GFeEvMNh7Xuz7xgU=
6161
golang.org/x/text v0.32.0 h1:ZD01bjUt1FQ9WJ0ClOL5vxgxOI/sVCNgX1YtKwcY0mU=
6262
golang.org/x/text v0.32.0/go.mod h1:o/rUWzghvpD5TXrTIBuJU77MTaN0ljMWE47kxGJQ7jY=
63-
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217 h1:fCvbg86sFXwdrl5LgVcTEvNC+2txB5mgROGmRL5mrls=
64-
google.golang.org/genproto/googleapis/api v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto=
65-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217 h1:gRkg/vSppuSQoDjxyiGfN4Upv/h/DQmIR10ZU8dh4Ww=
66-
google.golang.org/genproto/googleapis/rpc v0.0.0-20251202230838-ff82c1b0f217/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
67-
google.golang.org/protobuf v1.36.10 h1:AYd7cD/uASjIL6Q9LiTjz8JLcrh/88q5UObnmY3aOOE=
68-
google.golang.org/protobuf v1.36.10/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
63+
google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2 h1:7LRqPCEdE4TP4/9psdaB7F2nhZFfBiGJomA5sojLWdU=
64+
google.golang.org/genproto/googleapis/api v0.0.0-20251213004720-97cd9d5aeac2/go.mod h1:+rXWjjaukWZun3mLfjmVnQi18E1AsFbDN9QdJ5YXLto=
65+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2 h1:2I6GHUeJ/4shcDpoUlLs/2WPnhg7yJwvXtqcMJt9liA=
66+
google.golang.org/genproto/googleapis/rpc v0.0.0-20251213004720-97cd9d5aeac2/go.mod h1:7i2o+ce6H/6BluujYR+kqX3GKH+dChPTQU19wjRPiGk=
67+
google.golang.org/protobuf v1.36.11 h1:fV6ZwhNocDyBLK0dj+fg8ektcVegBBuEolpbTQyBNVE=
68+
google.golang.org/protobuf v1.36.11/go.mod h1:HTf+CrKn2C3g5S8VImy6tdcUvCska2kB7j23XfzDpco=
6969
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
7070
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
7171
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

0 commit comments

Comments
 (0)