docs: audit-logging recipe#15
Merged
Merged
Conversation
authlock stores only hashed counters, not an attempt log — but an audit trail is buildable from what already exists, and django-axes's AccessAttempt/AccessLog tables are the one capability worth answering (with docs, not a feature). - api-reference: an "Audit logging" section — log each attempt at your own reportFailure/reportSuccess call site (no per-failure hook by design), alert on transitions via onLockout, surface store errors via logger; a prominent "never log the credential, only dimensions" rule. - quick-start: cross-link to it. - nestjs README: a short pointer. - GUIDELINES §5: name un-normalized dimensions as a bypass vector and audit logging as an app responsibility bound by the never-log-credentials rule. Docs-only; no code, no version bump.
📊
|
| Metric | PR | Base | Diff | |
|---|---|---|---|---|
| Statements | ████████████████████ |
959/959 (100%) |
959/959 (100%) |
⚪ 0% |
| Branches | ████████████████████ |
165/165 (100%) |
165/165 (100%) |
⚪ 0% |
| Functions | ████████████████████ |
56/56 (100%) |
56/56 (100%) |
⚪ 0% |
| Lines | ████████████████████ |
959/959 (100%) |
959/959 (100%) |
⚪ 0% |
Updated for 2778e1b | Compared against base branch
⏱️ Performance Report
🐢 Slowest test suites
🐌 Slowest individual tests
Updated for |
🧠 Cognitive Complexity Report
🧩 Most complex functions
Updated for |
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.
The third django-axes gap — a persisted attempt/lockout audit trail (its
AccessAttempt/AccessLogtables). The honest answer is docs, not a feature: authlock keeps credentials out of its store by design and exposes the hooks to build the trail yourself.reportFailure/reportSuccesscall site (there is deliberately no per-failure hook — it would only echo what your handler already knows), alert on lock transitions viaonLockout, and surface store failures vialogger— always recording identity dimensions, never the credential.Docs-only; website builds (the
#audit-logginganchor resolves), readme-links gate green. No version bump — CHANGELOGUnreleasedgets the Docs bullet.