use existing MasterSecret type + fix autoformatting

This commit is contained in:
miampf 2025-01-09 11:52:54 +01:00
parent 53b84d8398
commit 52792e2cde
No known key found for this signature in database
GPG key ID: EF039364B5B6886C
3 changed files with 13 additions and 20 deletions

View file

@ -24,11 +24,6 @@ import (
"golang.org/x/crypto/ssh"
)
type secret struct {
Key []byte `json:"key,omitempty"`
Salt []byte `json:"salt,omitempty"`
}
var permissions = ssh.Permissions{
Extensions: map[string]string{
"permit-port-forwarding": "yes",
@ -58,7 +53,7 @@ func runSSH(cmd *cobra.Command, _ []string) error {
}
// NOTE(miampf): Since other KMS aren't fully implemented yet, this commands assumes that the cKMS is used and derives the key accordingly.
var mastersecret secret
var mastersecret uri.MasterSecret
if err = fh.ReadJSON(fmt.Sprintf("%s.json", constants.ConstellationMasterSecretStoreName), &mastersecret); err != nil {
return fmt.Errorf("Failed to read constellation master secret: %s", err)
}