Skip to content

Comments

feat: add apikey management#14

Merged
ontehfritz merged 6 commits intomainfrom
feat-api-key
Feb 9, 2026
Merged

feat: add apikey management#14
ontehfritz merged 6 commits intomainfrom
feat-api-key

Conversation

@ontehfritz
Copy link
Contributor

No description provided.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds account-scoped API key management (CRUD + enable/suspend) backed by MongoDB, wired into the Echo API, with repository tests and integration coverage for the new endpoints.

Changes:

  • Introduces ApiKeyService + MongoDB repository with a unique index on (tenantId, accountId, name)
  • Adds /accounts/:id/apikeys routes + handlers and wires them into cmd/bulwarkauthadmin/main.go
  • Adds integration tests for API key lifecycle and repository-level tests for Mongo behavior/isolation

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
tests/integration/accounts/account_apikey_integration_test.go Integration tests for API key endpoints (create/list/get/enable/suspend/revoke).
internal/utils/encryption.go Adds bcrypt-based hashing/verification helper used by API key generation.
internal/accounts/error.go Adds a domain error type for duplicate API key names.
internal/accounts/apikey/mongodb_apikey_repository_test.go Unit tests for MongoDB API key repository CRUD and tenant/account isolation.
internal/accounts/apikey/mongodb_apikey_repository.go MongoDB repository implementation + unique index for API keys.
internal/accounts/apikey/apikey.go API key domain model + service implementation for generating and managing keys.
cmd/bulwarkauthadmin/main.go Wires API key repository/service/handler into the tenant API group.
api/accounts/apikey/accounts_routes.go Registers account API key routes.
api/accounts/apikey/accounts_handler.go Implements HTTP handlers for API key management.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ontehfritz ontehfritz merged commit ebef97d into main Feb 9, 2026
4 checks passed
@ontehfritz ontehfritz deleted the feat-api-key branch February 9, 2026 02:08
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