-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program
Description
Description
Add middleware that resolves API key from header (e.g. Authorization: Bearer or X-Api-Key: ), looks up key by prefix, verifies full key hash, loads user and vault and API/endpoint. Attach to request: user, vault, api, endpoint, apiKeyRecord. Return 401 if invalid or revoked.
Requirements and context
- Must be used by gateway routes that proxy to upstream APIs
- Rate limit and balance check can be separate middleware
Suggested execution
- Fork the repo and create a branch
git checkout -b feature/api-key-auth-middleware- Implement changes
- Middleware: extract key, find by prefix, verify hash, load user/vault/api/endpoint
- Return 401 with clear message if not found or revoked
- Add unit tests for middleware
- Test and commit
- Run tests
- Example commit message:
feat: API key auth middleware for gateway
Guidelines
- Constant-time key comparison where applicable
- Clear documentation
- Timeframe: 96 hours
- Project details: #
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Stellar WaveIssues in the Stellar wave programIssues in the Stellar wave program