fix: Key details as string (#719)

* fix: correct env var for tracing type

* fix: local env tracing

* fix: key in detail as string
This commit is contained in:
Silvan 2020-09-09 16:19:17 +02:00 committed by GitHub
parent 46adcf8fe2
commit 463294669e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")