From 463294669ecfbd1d768197a506c121fd7ac5c20c Mon Sep 17 00:00:00 2001 From: Silvan Date: Wed, 9 Sep 2020 16:19:17 +0200 Subject: [PATCH] fix: Key details as string (#719) * fix: correct env var for tracing type * fix: local env tracing * fix: key in detail as string --- internal/api/grpc/management/user_machine_converter.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/api/grpc/management/user_machine_converter.go b/internal/api/grpc/management/user_machine_converter.go index c08112f1cf..cc53440691 100644 --- a/internal/api/grpc/management/user_machine_converter.go +++ b/internal/api/grpc/management/user_machine_converter.go @@ -92,12 +92,12 @@ func addMachineKeyFromModel(key *usr_model.MachineKey) *management.AddMachineKey detail, err := json.Marshal(struct { Type string `json:"type"` KeyID string `json:"keyId"` - Key []byte `json:"key"` + Key string `json:"key"` UserID string `json:"userId"` }{ Type: "serviceaccount", KeyID: key.KeyID, - Key: key.PrivateKey, + Key: string(key.PrivateKey), UserID: key.AggregateID, }) logging.Log("MANAG-lFQ2g").OnError(err).Warn("unable to marshall key")