Skip to content

ingest-router: Generate relay credentials#137

Merged
lynnagara merged 1 commit into
mainfrom
relay-credentials
Jun 17, 2026
Merged

ingest-router: Generate relay credentials#137
lynnagara merged 1 commit into
mainfrom
relay-credentials

Conversation

@lynnagara

Copy link
Copy Markdown
Member
  • Adds the synapse generate-credentials command that generates a ed25519 relay keypair
  • Add round trip test using credentials generation and RelayVerifier
  • make generate-credentials writes a gitignored relay-credentials.json if one doesn't already exist
  • Commits a devservices credentials file that will be used when running sentry in cell-routing mode. The id/public key will be registered with sentry
  • Also updates the relay_keys block in the ingest-router devservices config to include the key relay uses when running in sentry devservices

- Adds the `synapse generate-credentials` command that generates a ed25519 relay keypair
- Add round trip test using credentials generation and RelayVerifier
- `make generate-credentials` writes a gitignored `relay-credentials.json` if one doesn't already exist
- Commits a devservices credentials file that will be used when running
sentry in cell-routing mode. The id/public key will be registered with sentry
- Also updates the relay_keys block in the ingest-router devservices config
to include the key relay uses when running in sentry devservices
@lynnagara lynnagara requested a review from a team as a code owner June 16, 2026 21:56

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 2f7944a. Configure here.

Comment thread Makefile

generate-credentials:
@test -f relay-credentials.json || cargo run generate-relay-credentials > relay-credentials.json
.PHONY: generate-credentials

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failed run leaves empty credentials

Medium Severity

The generate-credentials target writes to relay-credentials.json via shell redirection and only skips generation when the file exists. If cargo run generate-relay-credentials fails after the shell truncates the file, an empty or partial file remains and later runs never regenerate valid credentials.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 2f7944a. Configure here.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we can live with this - it's a convenience for dev

@GabeVillalobos GabeVillalobos Jun 16, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it's very likely that this will fail, but fair. It probably should overwrite the file when rerun though 🤔

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrote this before seeing your comment Lyn, for sure it's a super minor issue.

@lynnagara lynnagara merged commit 09ec099 into main Jun 17, 2026
20 checks passed
@lynnagara lynnagara deleted the relay-credentials branch June 17, 2026 18:19
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.

3 participants