Add API key authentication foundation #56
No reviewers
Labels
No labels
activitypub
admin
api
articles
auth
bug
cleanup
cli
comments
compatibility
config
contacts
database
deployment
design
dev-env
docs
documentation
email
enhancement
feature
federation
feed
homepage
implementation
integration
media
openapi
priority:high
priority:low
priority:medium
proof
public-routes
public-ui
release
safety
social
sources
status:active
status:canceled
status:done
status:inprogress
status:waiting
syndication
tailwind
template
test
web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
erik/slugkit!56
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/task-090a180b-api-key-auth-foundation"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
api_keysSQLite migration with hash-only API key storage, revocation metadata, and future-compatible scope storage.Testing
make check./scripts/pre-pr.shDATABASE_PATH=<temp>/slugkit.sqlite npm run db:migrate --workspace @slugkit/template-siteTask: #task-090a180b
PR Review: Approved
Summary
Reviewed PR #56 at commit
a2b674b. The PR implements the narrowed API key authentication foundation: adds anapi_keysmigration, hash-only key storage, creation/listing/revocation/verification helpers, a reusable DB-backed bearer validator, and tests proving migration, redaction, revocation, invalid/missing auth failures, and valid protected-route authentication.Acceptance Criteria
db:migratesmoke.createApiKeyreturnsrawKey; DB storeskey_hashand metadata only; tests assert raw key is not persisted.listApiKeysselects metadata columns only; tests assert norawKeyorkeyHash.revoked_atexcludes keys from verification; tests cover revoked key rejection.createBearerAuthMiddleware+createApiKeyValidator.make check,./scripts/pre-pr.sh, manual migration smoke, and Forgejo CI passed.Blocking Issues
None.
Warnings
None.
Verdict
Approved for merge.