mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-07-22 06:50:43 -04:00
initserver: add client verification
This commit is contained in:
parent
bffa5c580c
commit
3b6bc3b28f
39 changed files with 704 additions and 175 deletions
|
@ -9,6 +9,7 @@ package qemu
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
|
@ -62,6 +63,15 @@ func (c *Cloud) GetLoadBalancerEndpoint(ctx context.Context) (string, error) {
|
|||
return endpoint, err
|
||||
}
|
||||
|
||||
// InitSecretHash returns the hash of the init secret.
|
||||
func (c *Cloud) InitSecretHash(ctx context.Context) ([]byte, error) {
|
||||
initSecretHash, err := c.retrieveMetadata(ctx, "/initsecrethash")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("could not retrieve init secret hash: %w", err)
|
||||
}
|
||||
return initSecretHash, nil
|
||||
}
|
||||
|
||||
// UID returns the UID of the constellation.
|
||||
func (c *Cloud) UID(ctx context.Context) (string, error) {
|
||||
// We expect only one constellation to be deployed in the same QEMU / libvirt environment.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue