Why this matters
Consistent identifiers support SOC 2 investigations.
Populate MDC with userId and traceId; include them in log pattern; log security events as JSON.
Consistent identifiers support SOC 2 investigations.
Side-by-side examples engineers can pattern-match during review.
log.info("login ok")MDC.put("userId", uid); MDC.put("traceId", tid); log.info("{"action":"auth.login","result":"success"}");MDC.put("traceId", tid)MDC.clear()From the same buckets as this rule.
Public services must require TLSv1.2 or higher and set HSTS (max-age ≥ 15552000, includeSubDomains). Reject plaintext HTTP and weak ciphers; cookies must be Secure and HttpOnly with SameSite set.