feat(observability): count bounded auth outcomes - #273
Conversation
Expose exactly two preinitialized authentication outcome series at the local verifier boundary while retaining legacy refusal counting and refusal-only audit and log sinks. GSTACK-Checkpoint: 2026-07-18/e10-auth-outcome-counter#1 Signed-off-by: Gnani Rahul Nutakki <gnani.nutakki@gmail.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (16)
📝 WalkthroughWalkthroughAuthentication verification now emits accepted and refused outcomes, exposes bounded Prometheus attempt counters, preserves the legacy refusal counter, and prevents accepted events from reaching audit or logging sinks. Documentation and tests cover the new boundaries. ChangesAuthentication outcome observability
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Client
participant Authentication
participant Observers
participant Metrics
Client->>Authentication: submit credentials
Authentication->>Observers: emit accepted or refused AuthEvent
Observers->>Metrics: increment outcome counter
Observers-->>Client: preserve authentication response
Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
Closes #272
Parent: #28 (E10)
Summary
sith_auth_attempts_total{outcome="accepted|refused"}series through the existing optional loopback metrics endpointacceptedimmediately after bearer-token or browser-session verifier success and before workspace authorizationsith_auth_refusals_total, incremented exactly once per refusalSecurity and semantics
Verification
make cipasses with zero lint issues, no reachable vulnerabilities, repository race/coverage, policy gates, alert-rule validation, latency guard, tagged e2e, and build; observability coverage is 94.7%Signed checkpoint
89cffa5cb6f4e51c8c5f4ef9410f323ee044f493fa22b073dc2870537ebff05b4f4bf83b19885b54GSTACK-Checkpoint: 2026-07-18/e10-auth-outcome-counter#1Exact-head hosted CI, CodeQL, and review remain required before merge. Exact post-merge
devCI and CodeQL remain required before closeout.Summary by CodeRabbit
New Features
Bug Fixes
Documentation