Skip to content

Commit

Permalink
Update internal/pkg/policy/secret.go
Browse files Browse the repository at this point in the history
Co-authored-by: Josh Dover <[email protected]>
  • Loading branch information
juliaElastic and joshdover authored Aug 9, 2023
1 parent 90c6814 commit 077cd6e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions internal/pkg/policy/secret.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,23 @@ func getSecretReferences(ctx context.Context, secretRefsRaw json.RawMessage, bul
if secretRefsRaw == nil {
return nil, nil
}

var secretReferences []SecretReference
err := json.Unmarshal([]byte(secretRefsRaw), &secretReferences)
if err != nil {
return nil, err
}

ids := make([]string, 0)
for _, ref := range secretReferences {
ids = append(ids, ref.ID)
}

results, err := bulker.ReadSecrets(ctx, ids)
if err != nil {
return nil, err
}

return results, nil
}

Expand Down

0 comments on commit 077cd6e

Please sign in to comment.