blob: 97cb3ec49f9bc2ccfad4df6432e588da96c70f8c [file] [log] [blame]
Serge Bazanskid7d6e022021-09-01 15:03:06 +02001package rpc
Serge Bazanski9ffa1f92021-09-01 15:42:23 +02002
3import (
Serge Bazanskid7d6e022021-09-01 15:03:06 +02004 cpb "source.monogon.dev/metropolis/node/core/curator/proto/api"
Serge Bazanski9ffa1f92021-09-01 15:42:23 +02005 apb "source.monogon.dev/metropolis/proto/api"
6 epb "source.monogon.dev/metropolis/proto/ext"
7)
8
Serge Bazanski3379a5d2021-09-09 12:56:40 +02009var (
10 // nodePermissions are the set of metropolis.common.ext.authorization
11 // permissions automatically given to nodes when connecting to curator gRPC
12 // services, either locally or remotely.
13 nodePermissions = Permissions{
14 epb.Permission_PERMISSION_READ_CLUSTER_STATUS: true,
Serge Bazanski2893e982021-09-09 13:06:16 +020015 epb.Permission_PERMISSION_UPDATE_NODE_SELF: true,
Serge Bazanski3379a5d2021-09-09 12:56:40 +020016 }
17)
18
Serge Bazanskif3c4b422022-03-10 00:37:57 +010019// ClusterServices is the interface containing all gRPC services that a
20// Metropolis Cluster implements. With the current implementation of Metropolis,
21// this is all implemented by the Curator.
22type ClusterServices interface {
Serge Bazanskid7d6e022021-09-01 15:03:06 +020023 cpb.CuratorServer
24 apb.AAAServer
25 apb.ManagementServer
Serge Bazanski9ffa1f92021-09-01 15:42:23 +020026}