Skip to content

Add API keys, CI workflow, Paystack key hygiene, and fix webhook_events scope - #1003

Open
brite-side0 wants to merge 1 commit into
kellymusk:masterfrom
brite-side0:feat/api-keys-ci-and-paystack-key-hygiene
Open

Add API keys, CI workflow, Paystack key hygiene, and fix webhook_events scope#1003
brite-side0 wants to merge 1 commit into
kellymusk:masterfrom
brite-side0:feat/api-keys-ci-and-paystack-key-hygiene

Conversation

@brite-side0

@brite-side0 brite-side0 commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #973
closes #974
closes #975
closes #976

Docs (README.md, API.md, openapi.yaml) updated for all four.

Test plan

  • cargo check passes (lib compiles clean, only pre-existing warnings).
  • Test code intentionally left untouched per task scope.

…ts scope

Closes kellymusk#973, kellymusk#974, kellymusk#975, kellymusk#976.

- Add .github/workflows/ci.yml running fmt, clippy, and cargo test against a
  Postgres 16 service container, with TEST_DATABASE_URL always set so the
  silent-skip integration-test gap can't produce a false-green run in CI.
- Wrap the Paystack secret key in SecretString and give PaystackProvider a
  redacting Debug impl, so the key cannot reach a log through {:?} or a
  tracing field. Document the one path that still can (reqwest's own
  unscoped debug/trace logging) in .env.example and README.
- Implement the api_keys table: POST/GET /api-keys and DELETE /api-keys/{id},
  Argon2-hashed secrets, an sk_<env>_<prefix><secret> format, and extractor
  support so either a JWT or an API key authenticates a request. Key
  creation is session-only so a leaked key can't mint its own replacement.
- Make webhook_events.merchant_id nullable (migration 0007): Paystack events
  are platform-level and must be recorded for the UNIQUE(provider,
  external_id) dedup constraint to work before a merchant can be attributed.
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@brite-side0 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment