Documentation ¶
Overview ¶
Package server implements the gRPC endpoint of Constellation's node join service.
Index ¶
- type Server
- func (s *Server) IssueJoinTicket(ctx context.Context, req *joinproto.IssueJoinTicketRequest) (*joinproto.IssueJoinTicketResponse, error)
- func (s *Server) IssueRejoinTicket(ctx context.Context, req *joinproto.IssueRejoinTicketRequest) (*joinproto.IssueRejoinTicketResponse, error)
- func (s *Server) Run(creds credentials.TransportCredentials, port string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct { joinproto.UnimplementedAPIServer // contains filtered or unexported fields }
Server implements the core logic of Constellation's node join service.
func New ¶
func New( measurementSalt []byte, ca certificateAuthority, joinTokenGetter joinTokenGetter, dataKeyGetter dataKeyGetter, log *logger.Logger, ) (*Server, error)
New initializes a new Server.
func (*Server) IssueJoinTicket ¶
func (s *Server) IssueJoinTicket(ctx context.Context, req *joinproto.IssueJoinTicketRequest) (*joinproto.IssueJoinTicketResponse, error)
IssueJoinTicket handles join requests of Constellation nodes. A node will receive: - stateful disk encryption key. - Kubernetes join token. - measurement salt and secret, to mark the node as initialized. In addition, control plane nodes receive: - a decryption key for CA certificates uploaded to the Kubernetes cluster.
func (*Server) IssueRejoinTicket ¶
func (s *Server) IssueRejoinTicket(ctx context.Context, req *joinproto.IssueRejoinTicketRequest) (*joinproto.IssueRejoinTicketResponse, error)
IssueRejoinTicket issues a ticket for nodes to rejoin cluster.
func (*Server) Run ¶
func (s *Server) Run(creds credentials.TransportCredentials, port string) error
Run starts the gRPC server on the given port, using the provided tlsConfig.