fix IAM security event correlation id
This commit is contained in:
@@ -53,9 +53,10 @@ public class SecurityEventOutboxService {
|
||||
long aggregateVersion, Object value) {
|
||||
JsonNode payload = objectMapper.valueToTree(value);
|
||||
String hash = EventPayloadHash.sha256(EventPayloadCanonicalizer.canonicalize(payload));
|
||||
String flowId = EventIdentifiers.newUuid();
|
||||
EventEnvelope envelope = new EventEnvelope(EventIdentifiers.newUuid(), type, IamSecurityEventsV1.VERSION,
|
||||
Instant.now(), RegionCode.CN, RegionCode.OVERSEAS, String.valueOf(tenantId), aggregateType,
|
||||
aggregateId, aggregateVersion, null, EventIdentifiers.newUuid(), null, null, payload, hash).requireValid();
|
||||
aggregateId, aggregateVersion, null, flowId, flowId, null, payload, hash).requireValid();
|
||||
try {
|
||||
jdbc.update("INSERT INTO iam_security_event_outbox(event_id,event_type,aggregate_type,aggregate_id,payload_json) "
|
||||
+ "VALUES (?,?,?,?,CAST(? AS JSON))", envelope.eventId(), type, aggregateType, aggregateId,
|
||||
|
||||
Reference in New Issue
Block a user