Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(signer)!: add proxy keys #39

Merged
merged 17 commits into from
Aug 7, 2024
Merged

feat(signer)!: add proxy keys #39

merged 17 commits into from
Aug 7, 2024

Conversation

David-Petrov
Copy link
Collaborator

@David-Petrov David-Petrov commented Jul 26, 2024

Quick summary:

  • implement a generate_proxy_keys endpoint to the Signer API. Modify the signer client accordingly.

  • remove the need for modules to provide their id in requests. A module's JWT is now solely sufficient to identify the module.

    • SigningService now contains jwt <-> module_id in a bidirectional hashmap
  • add authentication middleware to the signer service instead of manual auth in the handlers

  • introduce ModuleId and Jwt wrapper types around strings to improve semantics (useful after a couple of mishaps with key <-> value directions across the different maps + axum's custom type extensions on requests)

    • see common::types
  • add example proxy key generation request in da_commit module

  • add rust-toolchain.toml

  • add a .dockerignore file

  • small misc changes

  • little reformatting


TODOs

  • Update the docs with the new Signer API changes
  • Refine small consideration around my inline TODOs

closes #19

- add `generate_proxy_keys` endpoint to the Signer API. Modify the signer client accordingly.

- add a `.dockerignore` file

- remove the need for modules to provide their id in requests. A module's JWT is now solely sufficient to identify the module.
  * `SigningService` now contains jwt <-> module_id in a bidirectional hashmap

- add authentication middleware to the signer service instead of manual auth in the handlers

- introduce `ModuleId` and `Jwt` wrapper types around strings to improve semantics (useful after a couple of mishaps with key <-> value directions across the different maps)
  * see `common::types`

- add example proxy key generation request in `da_commit` module

- small misc changes

- small reformatting
* make `crates::common::signature::random_secret()` infallible

* fix flaky test
not needed anymore since JWTs now uniquely identify the module
@ltitanb ltitanb force-pushed the main branch 2 times, most recently from 417fda3 to 91137e9 Compare August 5, 2024 20:14
@David-Petrov David-Petrov marked this pull request as ready for review August 6, 2024 10:53
Copy link
Collaborator

@ltitanb ltitanb left a comment

Choose a reason for hiding this comment

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

Looks good, just a few small comments here and there

crates/common/Cargo.toml Outdated Show resolved Hide resolved
crates/common/src/commit/request.rs Outdated Show resolved Hide resolved
rust-toolchain.toml Show resolved Hide resolved
examples/da_commit/src/main.rs Outdated Show resolved Hide resolved
examples/da_commit/src/main.rs Outdated Show resolved Hide resolved
crates/signer/src/service.rs Outdated Show resolved Hide resolved
@ltitanb ltitanb merged commit 511a5b0 into main Aug 7, 2024
4 checks passed
@ltitanb ltitanb deleted the feat/proxy-keys branch August 7, 2024 14:03
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.

Add proxy in SignerAPI spec and module
3 participants