feat(admin): signing key import command #1311

Open
Omar007 wants to merge 2 commits from Omar007/continuwuity:feature/import-signing-key into main
First-time contributor

This introduces a command that allows an admin to import signing keys as formatted by Synapse and Dendrite.
The existing keypair (generally created on first boot) is replaced.

This should make it easier to migrate to Continuwuity from either of those homeservers.

Fixes: #195

Pull request checklist:

  • This pull request targets the main branch, and the branch is named something other than
    main.
  • I have written an appropriate pull request title and my description is clear.
  • I understand I am responsible for the contents of this pull request.
  • I have followed the contributing guidelines:
This introduces a command that allows an admin to import signing keys as formatted by Synapse and Dendrite. The existing keypair (generally created on first boot) is replaced. This should make it easier to migrate to Continuwuity from either of those homeservers. Fixes: #195 **Pull request checklist:** - [x] This pull request targets the `main` branch, and the branch is named something other than `main`. - [x] I have written an appropriate pull request title and my description is clear. - [x] I understand I am responsible for the contents of this pull request. - I have followed the [contributing guidelines][c1]: - [x] My contribution follows the [code style][c2], if applicable. - [x] I ran [pre-commit checks][c1pc] before opening/drafting this pull request. - [x] I have [tested my contribution][c1t] (or proof-read it for documentation-only changes) myself, if applicable. This includes ensuring code compiles. - [x] My commit messages follow the [commit message format][c1cm] and are descriptive. - [x] I have written a [news fragment][n1] for this PR, if applicable<!--(can be done after hitting open!)-->. [c1]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md [c2]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/docs/development/code_style.mdx [c1pc]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#pre-commit-checks [c1t]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#running-tests-locally [c1cm]: https://forgejo.ellis.link/continuwuation/continuwuity/src/branch/main/CONTRIBUTING.md#commit-messages [n1]: https://towncrier.readthedocs.io/en/stable/tutorial.html#creating-news-fragments
feat(admin): signing key import command
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
c052252781
This resolves #195 by introducing a command that allows for
importing the signing keys as formatted by Synapse and Dendrite.

The existing keypair (generally created on first boot) is replaced.
@ -88,5 +88,7 @@ tokio.workspace = true
tracing-subscriber.workspace = true
tracing.workspace = true
ed25519-dalek = "~2"
Author
First-time contributor

This is already a transitive dependency for the key related objects and operations within the project but an explicit dependency is required. I'm not sure what the preferred way of defining it would be so for now I've set it directly in the admin Cargo.toml, matching the major version of the transitive dependency.

This is already a transitive dependency for the key related objects and operations within the project but an explicit dependency is required. I'm not sure what the preferred way of defining it would be so for now I've set it directly in the admin Cargo.toml, matching the major version of the transitive dependency.
Omar007 force-pushed feature/import-signing-key from c052252781
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
to a9d38f2664
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
2026-01-25 01:28:57 +00:00
Compare
Owner

Thank you for the contribution! We're already working on an improved initial setup flow internally, and signing key import will be a part of that, but we'll likely reuse the code from this PR in that change.

Thank you for the contribution! We're already working on an improved initial setup flow internally, and signing key import will be a part of that, but we'll likely reuse the code from this PR in that change.
Some checks are pending
Documentation / Build and Deploy Documentation (pull_request) Blocked by required conditions
Checks / Prek / Pre-commit & Formatting (pull_request) Blocked by required conditions
Required
Details
Checks / Prek / Clippy and Cargo Tests (pull_request) Blocked by required conditions
Required
Details
Update flake hashes / update-flake-hashes (pull_request) Blocked by required conditions
Some required checks are missing.
Some workflows are waiting to be reviewed.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u feature/import-signing-key:Omar007-feature/import-signing-key
git switch Omar007-feature/import-signing-key
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
continuwuation/continuwuity!1311
No description provided.