fix(auth): avoid leaking or over-persisting affinity keys

Stop using one-shot idempotency keys as long-lived auth-affinity identifiers and remove raw affinity-key values from debug logs so sticky routing keeps its continuity benefits without creating avoidable memory growth or credential exposure risks.
This commit is contained in:
VooDisss
2026-03-27 18:34:51 +02:00
parent 26eca8b6ba
commit 4c4cbd44da
2 changed files with 1 additions and 3 deletions
-2
View File
@@ -211,8 +211,6 @@ func requestExecutionMetadata(ctx context.Context) map[string]any {
if executionSessionID := executionSessionIDFromContext(ctx); executionSessionID != "" {
meta[coreexecutor.ExecutionSessionMetadataKey] = executionSessionID
meta[authAffinityMetadataKey] = executionSessionID
} else if explicitIdempotencyKey != "" {
meta[authAffinityMetadataKey] = explicitIdempotencyKey
} else if ctx != nil {
if ginCtx, ok := ctx.Value("gin").(*gin.Context); ok && ginCtx != nil {
if apiKey, exists := ginCtx.Get("apiKey"); exists && apiKey != nil {