Skip to content

Commit 2d79457

Browse files
Update rewrap.go
1 parent 2b52452 commit 2d79457

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

service/kas/access/rewrap.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,8 +1113,9 @@ func (p *Provider) nanoTDFRewrap(ctx context.Context, requests []*kaspb.Unsigned
11131113
if auditEvent != nil {
11141114
auditEvent.UpdatePolicy(*kasPolicy)
11151115
} else {
1116-
p.Logger.WarnContext(ctx, "audit event not found for KAO in nano rewrap",
1116+
p.Logger.WarnContext(ctx, "audit event not found for policy KAO in nano rewrap",
11171117
slog.String("policy_id", policyID),
1118+
slog.Any("policy.uuid", policyObj.UUID),
11181119
slog.String("kao_id", kaoID))
11191120
}
11201121
}
@@ -1157,14 +1158,16 @@ func (p *Provider) nanoTDFRewrap(ctx context.Context, requests []*kaspb.Unsigned
11571158
if !ok { // this should not happen
11581159
continue
11591160
}
1160-
kaoResults, ok := results[req.GetPolicy().GetId()]
1161+
policyID := req.GetPolicy().GetId()
1162+
kaoResults, ok := results[policyID]
11611163
if !ok { // this should not happen
11621164
//nolint:sloglint // reference to key is intentional
1163-
p.Logger.WarnContext(ctx, "policy not found in policyReq response", "policy.uuid", policy.UUID)
1165+
p.Logger.WarnContext(ctx, "policy not found in policyReq response",
1166+
slog.String("policy_id", policyID),
1167+
slog.Any("policy.uuid", policy.UUID))
11641168
continue
11651169
}
11661170
access := pdpAccess.Access
1167-
policyID := req.GetPolicy().GetId()
11681171

11691172
for _, kao := range req.GetKeyAccessObjects() {
11701173
kaoID := kao.GetKeyAccessObjectId()
@@ -1176,6 +1179,7 @@ func (p *Provider) nanoTDFRewrap(ctx context.Context, requests []*kaspb.Unsigned
11761179
if !exists {
11771180
p.Logger.WarnContext(ctx, "audit event not found for KAO in nano rewrap",
11781181
slog.String("policy_id", policyID),
1182+
slog.Any("policy.uuid", policy.UUID),
11791183
slog.String("kao_id", kaoID))
11801184
continue
11811185
}

0 commit comments

Comments
 (0)