Skip to content

CONV-294: Create API keys table#254

Merged
menvil merged 1 commit into
developfrom
feature/CONV-294-create-api-keys-table
Jun 3, 2026
Merged

CONV-294: Create API keys table#254
menvil merged 1 commit into
developfrom
feature/CONV-294-create-api-keys-table

Conversation

@menvil

@menvil menvil commented Jun 3, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds api_keys migration with user_id, name, token_hash (unique), last_used_at, revoked_at
  • Plain token is never stored — only SHA-256 hash
  • Index on (user_id, revoked_at) for efficient auth lookups

Test plan

  • Schema test verifies all required columns exist
  • composer test passes (536 tests)
  • composer lint passes

🤖 Generated with Claude Code


Summary by cubic

Create the api_keys table to support secure token-based auth with per-user revocation and last-used tracking. Aligns with CONV-294 by laying the backend foundation for API key management.

  • New Features
    • Added api_keys table with user_id (FK, cascade on delete), name, unique SHA-256 token_hash, last_used_at, revoked_at, and timestamps.
    • Indexed (user_id, revoked_at) for fast active-key lookups.
    • Added schema test to verify required columns.

Written for commit 3b488d2. Summary will update on new commits.

Review in cubic

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@menvil menvil merged commit d5aa65e into develop Jun 3, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • release

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 38ae9e14-774d-4245-9b84-8597da966f58

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/CONV-294-create-api-keys-table

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant