Skip to content

Move bootstrap-audit-key to user-accessible endpoint#100

Merged
mkreyman merged 1 commit intomasterfrom
fix/bootstrap-key-user-accessible
Apr 13, 2026
Merged

Move bootstrap-audit-key to user-accessible endpoint#100
mkreyman merged 1 commit intomasterfrom
fix/bootstrap-key-user-accessible

Conversation

@mkreyman
Copy link
Copy Markdown
Owner

Summary

  • Moved bootstrap-audit-key from superadmin-only admin scope to user-accessible authenticated scope
  • Added ownership check (caller must own the tenant being bootstrapped)
  • Endpoint: POST /api/v1/tenants/:id/bootstrap-audit-key (user role required)
  • Removed redundant admin-only endpoint

Test plan

  • 2263 tests pass
  • Call with user key for own tenant → 200
  • Call for different tenant → 403
  • Call when key exists → 409

🤖 Generated with Claude Code

…heck

The superadmin-only admin endpoint was too restrictive — tenant
operators need to bootstrap their own key without a superadmin key.

Moved to POST /api/v1/tenants/:id/bootstrap-audit-key alongside
the existing rotate endpoint, with user role + ownership check.
Removed the now-redundant admin endpoint.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@mkreyman mkreyman merged commit 12779c7 into master Apr 13, 2026
6 checks passed
@mkreyman mkreyman deleted the fix/bootstrap-key-user-accessible branch April 13, 2026 04:20
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