ENG-10376 docs: add enterprise auth audit hook page - #6818
Conversation
Documents AuthPlugin(audit=...) — the observe-only audit hook shipping in reflex-enterprise 0.9.3 (reflex-dev/reflex-enterprise#200): configuration, action/outcome taxonomy, the AuditContext reference, and the fail-open, volume, privacy, and popup-flow semantics. Registers the page in the enterprise sidebar and the overview's Authentication block.
Greptile SummaryAdds documentation for the reflex-enterprise authentication audit hook.
Confidence Score: 5/5The documentation-only PR appears safe to merge, with no concrete blocking or non-blocking defects identified. The new markdown page follows the repository’s documentation routing conventions, its sidebar namespace resolves through the existing generated-page mechanism, and the overview count matches the seven listed authentication features.
|
| Filename | Overview |
|---|---|
| docs/enterprise/auth/audit.md | Adds a comprehensive audit-hook guide with configuration examples, contract details, event taxonomy, context fields, and operational guidance; no actionable defect was established. |
| docs/app/reflex_docs/templates/docpage/sidebar/sidebar_items/enterprise.py | Adds the generated audit page route to the Authentication sidebar using the established namespace and routing convention. |
| docs/enterprise/overview.md | Adds the Audit Hook feature card and consistently increases the Authentication feature count from six to seven. |
Reviews (1): Last reviewed commit: "ENG-10376 docs: add enterprise auth audi..." | Re-trigger Greptile
Merging this PR will not alter performance
Comparing Footnotes
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2e4ade4a58
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| `AuditAction` and `AuditOutcome` are str-valued enums and `AuditContext` is a | ||
| flat frozen dataclass, so events serialize into log/JSON sinks without | ||
| importing framework internals. Always read `.value` when formatting: on |
There was a problem hiding this comment.
Stop promising direct JSON serialization
For a hook that passes the event directly to a JSON/SIEM encoder, this claim is incorrect: frozen dataclasses are not JSON-serializable by default, and this context also contains live State, AuthUserState, and EventHandler objects plus an arbitrary payload. Standard encoders will raise TypeError, contradicting a central advertised use case. Clarify that callers must explicitly project the context to JSON-safe fields, as the preceding paragraph recommends, rather than implying the event itself can be serialized.
Useful? React with 👍 / 👎.
Summary
Documents the new
AuthPlugin(audit=...)observe-only audit hook (implemented in reflex-dev/reflex-enterprise#200, shipping in reflex-enterprise 0.9.3):docs/enterprise/auth/audit.md— configuration (callable / import-path string, eager validation), the action/outcome taxonomy tables, theAuditContextfield reference, and the semantics users need to know: observe-only + fail-open, awaited inline (keep hooks fast), what is and isn't audited,event_handler/allowedvolume, redaction responsibility, popup-flow event pairing, and writing events into app state viacontext.state.docs/enterprise/overview.md's Authentication block (count 6 → 7).Notes
reflex_enterprise.auth.auditmodule docstring and was validated against the implementation (all snippets exercised by the unit/integration tests in the enterprise PR).Testing
enterprise.auth.audit.pathand the sidebar entry verified to resolve viareflex_docsimport (docgen auto-generates the page from the md tree;/enterprise/authwhitelist prefix covers the route).