feat(linked-roles): internal enqueue, Rabbit AMQP, timing-safe secrets#130
Draft
owens1127 wants to merge 4 commits into
Draft
feat(linked-roles): internal enqueue, Rabbit AMQP, timing-safe secrets#130owens1127 wants to merge 4 commits into
owens1127 wants to merge 4 commits into
Conversation
Add POST /internal/queue-discord-linked-role-sync (x-raidhub-client-secret, timing-safe) publishing to discord_role_metadata_sync with DISCORD_LINKED_ROLES_ENABLED gate. - RabbitConnection: configurable host/vhost; defaults align with Hermes (dev/password). - discordRoleMetadataSyncQueue + enqueue-manual-sync; discord_lr_publish_total. - timingSafeStringEqual for authorize user/admin client secrets. - Turso-backed Discord account lookup for invocation context when RAIDHUB_ACCOUNT_TURSO_URL is set. CI: RABBITMQ_* env for tests. example.env documents AMQP vs management API vars. Co-authored-by: Cursor <cursoragent@cursor.com>
Barecheck - Code coverage reportTotal: 91.01%Your code coverage diff: 0.16% ▴ Uncovered files and lines
|
- Add timingSafeSecret, enqueue-manual-sync, and internal queue route tests (coverage). - Prettier on linked-role and discord-context files. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
…echeck Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RaidHub-API server-to-server path to enqueue Hermes linked-role sync, plus Rabbit fixes and timing-safe client secret checks.
Key changes
POST /internal/queue-discord-linked-role-sync(body: destiny ids; secret:x-raidhub-client-secret; timing-safe compare).enqueue-manual-sync→discord_role_metadata_syncqueue;DISCORD_LINKED_ROLES_ENABLED; 503 on buffer full.RabbitConnection: host/vhost; defaults match Hermes docker (dev/password).timingSafeStringEqualfor/authorize/userand/authorize/adminbody secrets.RAIDHUB_ACCOUNT_TURSO_URL).Related PRs
CI
Workflows set
RABBITMQ_HOST/RABBITMQ_USER/RABBITMQ_PASSWORDfor compose broker.Made with Cursor