veza/veza-backend-api/internal/api
senke 3cfefaa24c [BE-SEC-012] be-sec: Implement API key authentication for webhooks
- Added APIKey field to Webhook model with unique index
- Implemented GenerateAPIKey() method using crypto/rand for secure key generation
- Implemented ValidateAPIKey() method to authenticate webhook requests
- Implemented RegenerateAPIKey() method to rotate API keys
- Created WebhookAPIKeyMiddleware for validating API keys in requests
- Middleware supports X-API-Key header and Authorization: Bearer format
- Added endpoint POST /api/v1/webhooks/:id/regenerate-key
- API keys are prefixed with 'whk_' for identification
- Comprehensive unit tests for all API key functionality
- Inactive webhooks cannot authenticate with their API keys

Phase: PHASE-4
Priority: P2
Progress: 119/267 (44.57%)
2025-12-24 18:03:52 +01:00
..
admin adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
chat adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
collaboration adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
contest adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
education adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
graphql adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
grpc adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
handlers STABILISATION: phase 3–5 – API contract, tests & chat-server hardening 2025-12-06 17:21:59 +01:00
listing adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
message adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
offer adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
production_challenge adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
room adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
search adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
shared_resources adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
sound_design_contest adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
tag adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
track adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
user [BE-SVC-022] be-svc: Implement data export service 2025-12-24 18:01:00 +01:00
voting_system adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
websocket adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
api_manager.go adding initial backend API (Go) 2025-12-03 20:29:37 +01:00
router.go [BE-SEC-012] be-sec: Implement API key authentication for webhooks 2025-12-24 18:03:52 +01:00
versioning.go [BE-SVC-019] be-svc: Implement API versioning strategy 2025-12-24 17:07:30 +01:00
versioning_test.go [BE-SVC-019] be-svc: Implement API versioning strategy 2025-12-24 17:07:30 +01:00