blob: 44db0c55bce93bc95e22fe0c7a8bcd57fb783b2d [file] [log] [blame]
Serge Bazanski6bd41592021-08-23 13:18:37 +02001syntax = "proto3";
2package metropolis.proto.api;
3option go_package = "source.monogon.dev/metropolis/proto/api";
4
Serge Bazanskibc671d02021-10-05 17:53:32 +02005import "metropolis/proto/common/common.proto";
Serge Bazanski9ffa1f92021-09-01 15:42:23 +02006import "metropolis/proto/ext/authorization.proto";
7
Serge Bazanski6bd41592021-08-23 13:18:37 +02008// Management service available to Cluster Managers.
9service Management {
10 // GetRegisterTicket retrieves the current RegisterTicket which is required
11 // for new nodes to register into the cluster. Presenting this ticket on
12 // registration does not automatically grant access to arbitrary node
13 // registration. Instead, it is used to guard the API surface of the
14 // Register RPC from potential denial of service attacks, and can be
15 // regenerated at any time in case it leaks.
Serge Bazanski9ffa1f92021-09-01 15:42:23 +020016 rpc GetRegisterTicket(GetRegisterTicketRequest) returns (GetRegisterTicketResponse) {
17 option (metropolis.proto.ext.authorization) = {
18 need: PERMISSION_GET_REGISTER_TICKET
19 };
20 }
Serge Bazanskibc671d02021-10-05 17:53:32 +020021 // GetClusterInfo retrieves publicly available summary information about
22 // this cluster, notably data required for nodes to register into a cluster
23 // or join it (other than the Register Ticket, which is gated by an
24 // additional permission).
25 rpc GetClusterInfo(GetClusterInfoRequest) returns (GetClusterInfoResponse) {
26 option (metropolis.proto.ext.authorization) = {
27 need: PERMISSION_READ_CLUSTER_STATUS
28 };
29 }
Serge Bazanski6bd41592021-08-23 13:18:37 +020030}
31
32message GetRegisterTicketRequest {
33}
34
35message GetRegisterTicketResponse {
36 // Opaque bytes that comprise the RegisterTicket.
37 bytes ticket = 1;
Serge Bazanski2893e982021-09-09 13:06:16 +020038}
Serge Bazanskibc671d02021-10-05 17:53:32 +020039
40message GetClusterInfoRequest {
41}
42
43message GetClusterInfoResponse {
44 // cluster_directory contains information about individual nodes in the
45 // cluster that can be used to dial the cluster's services.
46 metropolis.proto.common.ClusterDirectory cluster_directory = 1;
Serge Bazanski2f58ac02021-10-05 11:47:20 +020047
Serge Bazanskifbd38e22021-10-08 14:41:16 +020048 // ca_certificate is the x509 DER encoded CA certificate of the cluster.
49 bytes ca_certificate = 2;
Serge Bazanskibc671d02021-10-05 17:53:32 +020050}