mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-30 10:38:46 -04:00
AB#1902 Ping Coordinator from initramfs for key (#53)
Signed-off-by: Daniel Weiße <dw@edgeless.systems>
This commit is contained in:
parent
7e990fb91a
commit
49a1a07049
20 changed files with 827 additions and 267 deletions
|
@ -2,6 +2,7 @@ package pubapi
|
|||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net"
|
||||
"time"
|
||||
|
@ -161,6 +162,21 @@ func (a *API) ActivateAdditionalNodes(in *pubproto.ActivateAdditionalNodesReques
|
|||
})
|
||||
}
|
||||
|
||||
// RequestStateDiskKey triggers the Coordinator to return a key derived from the Constellation's master secret to the caller.
|
||||
func (a *API) RequestStateDiskKey(ctx context.Context, in *pubproto.RequestStateDiskKeyRequest) (*pubproto.RequestStateDiskKeyResponse, error) {
|
||||
// TODO: Add Coordinator call to restarting node and deliver the key
|
||||
/*
|
||||
if err := a.core.RequireState(state.IsNode, state.ActivatingNodes); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
_, err := a.core.GetDataKey(ctx, in.DiskUuid, 32)
|
||||
if err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "")
|
||||
}
|
||||
*/
|
||||
return &pubproto.RequestStateDiskKeyResponse{}, errors.New("unimplemented")
|
||||
}
|
||||
|
||||
func (a *API) activateNodes(logToCLI logFunc, nodePublicEndpoints []string, coordPeer peer.Peer) error {
|
||||
// Create initial peer data to be sent to the nodes. Currently, this is just this Coordinator.
|
||||
initialPeers := peer.ToPubProto([]peer.Peer{coordPeer})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue