chore(auth): expose observer decisions in runtime logs - #6855
Merged
Conversation
Contributor
There was a problem hiding this comment.
Ladon verdict: Approve
Approve — observe-only follow-up to #6841/#6827.
Checked:
- Server-only change (
server/src/middleware/organization-authorization-observer.ts+ its unit test). No protocol surface (static/schemas/source/**,docs/reference/**,dist/**) touched, so no schema↔docs coherence, oneOf, artifact-immutability, or changeset-scope concern applies. No changeset required. - New
recordAuthorizationObservationhelper wraps the four existing captureEvent sites and emitslogger.infothrough an explicit field allowlist (decision, method, response_status, selector_source, explicit_organization, allow booleans, role slugs). Route/path, credential, identity, and organization values are deliberately excluded, matching the stated safety claim. - No auth-decision behavior changed — this only mirrors the existing shadow comparison into a Fly/Grafana-queryable log line.
Gates: gated_paths: false, high_risk: false, no no-auto-approve team match, no prior decision. Reviewer reported no findings. review_decision: REVIEW_REQUIRED does not force escalation because no gated path or prose hard gate applies. Falls through to row 9.
This was referenced Aug 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rollout purpose
Follow-up to #6841 and #6827. The observe-only authorization comparison currently reaches PostHog, but the production PostHog project is not independently accessible from the rollout session. This adds the same comparison outcome to the Fly/Grafana runtime stream so enforcement remains gated on a queryable signal.
Safety
ORG_AUTHORIZATION_OBSERVER_ENABLED=false.Verification