Skip to content

Implement api key - #160

Open
akinerin wants to merge 3 commits into
ASTROIDX556:mainfrom
akinerin:Implement_API_Key
Open

Implement api key#160
akinerin wants to merge 3 commits into
ASTROIDX556:mainfrom
akinerin:Implement_API_Key

Conversation

@akinerin

Copy link
Copy Markdown
Contributor

closes #115

…nd exponential backoff

- Add generateWebhookSignature (timestamp + body -> HMAC-SHA256) and buildWebhookHeaders in crypto.util
- Add X-Astroid-Delivery and X-Astroid-Event headers constants
- Update WebhooksProcessor and WebhookWorker to sign timestamp-concatenated body, inject ConfigService fallback (WEBHOOK_SECRET / STELLAR_WEBHOOK_SECRET), include X-Astroid-Signature, X-Astroid-Delivery, X-Astroid-Event, X-Astroid-Timestamp headers with 5000ms fetch timeout
- Configure BullMQ retries up to 5 times with exponential backoff (2000ms base) and jitter
- Add webhook.service.spec.ts covering signature generation, header formatting, and retry behavior
- Update existing processor specs for new signing scheme

Closes #
…entation

- Confirm ApiKey schema stores SHA-256 hashedKey
- Verify ApiKeyGuard/RequireScopes with 401/403 handling
- All auth guard tests passing (483 tests)

Closes #
@mergekeeper

mergekeeper Bot commented Aug 30, 2026

Copy link
Copy Markdown

Needs review

Linked to #115, but the diff does not match the issue scope.

The pull request modifies webhook delivery and cryptographic signing files instead of implementing the requested API Key Authentication Guard with Scoped Permissions.

Reviewed commit: dc06839c2492dbae7534b82ad26ca5aa62683031.

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.

Implement API Key Authentication Guard with Scoped Permissions

1 participant