-
Notifications
You must be signed in to change notification settings - Fork 59
CBST2-04: Update JWT secrets on reload and revoke module endpoint #295
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this has a breaking change as now it requires ADMIN_JWT_ENV
to be set for the module to start, so we should target the sigp-audit-fixes
branch instead of main
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some small comments, would also be good to add a unit test for the new behaviour (revoked modules can't get signatures)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe I'm good with this on my end now.
* bump version * Successful cross-compilation, but runtime has memory allocation issues * Working with OpenSSL static-linked * Got dynamic linking working, added a feature flag to toggle dynamic vs. static * Fixed the vendored build arg * Reintroduced the cargo chef setup * Ported the cross-compilation stuff into PBS * Split the dockerfiles into separate builder / image definitions * Added a build guide * Refactored the Github release action to use the Docker builder * Fixed the Docker image binary filenames * Cleaned up the Darwin artifact step * Made the CI workflow and justfile use the same toolchain as the source * Revert "Made the CI workflow and justfile use the same toolchain as the source" This reverts commit 58c6117. * Testing removal of OpenSSL vendored option * Updating just in the CI workflow * Refactored the signer to support host and port config settings * Updated docs * Fixing Clippy in CI workflow * Removed obviated CI setup * Minor dedup of RwLock guard acquisition * Added rate limiting for signer clients with repeated JWT auth failures * Added Signer config validation * Started unit test setup for the Signer * Finished a basic signer module unit test * Added a JWT failure unit test * Added a rate limit test and cleaned up a bit * Added unique ports to unit tests for parallel execution * Cleaned up the build Dockerfile and removed an extra dependency layer * Ported the build script over to the justfile * Added a justfile recipe for installing protoc * Update crates/cli/src/docker_init.rs Co-authored-by: ltitanb <163874448+ltitanb@users.noreply.github.com> * Added example signer config params * Cleaned up signer config loading from feedback * Added JWT auth fields to the example config * Started building the JWT config file * Added tests * Started migration from JWTS_ENV to the config file * Signing requests now uses the module's signing ID * Finished added signing ID support and a quick test * Fixed some example config parameters * Added a test to ensure modules can't create the same sigs * Made the jwt_config_file optional * Started working on docs * Redid implementation with the original JWTS env var * Started the signer doc * Overhauled the signing_id setup to be directly in the signed struct * Made proposer commitments nested Merkle trees to allow Dirk support * Added the signer request guide * Added quotes to some HTML * Added some simple JWT secret info * Adding a closing tag * Added prop commit signature verification helpers for modules to use * Fixed some params in da_commit * Cleaned load_module_signing_configs a bit * Fixed some docs language * Refactored into compute_prop_commit_signing_root * CBST2-04: Update JWT secrets on reload and revoke module endpoint (Commit-Boost#295) * Signing IDs are no longer optional in the config * Refactored some of the signer consts for consistency * Updated the Signer API docs * Merge sigp-audit-fixes (Commit-Boost#348) Co-authored-by: Manuel Iñaki Bilbao <manuel.bilbao@lambdaclass.com> Co-authored-by: ltitanb <163874448+ltitanb@users.noreply.github.com> * Move from [u8; 32] to B256 everywhere (Commit-Boost#347) * Cleaned up some hashmap usage * Removed compute_tree_hash_root() * Some minor cleanup * Fixed some docs --------- Co-authored-by: eltitanb <lorenzo@gattaca.com> Co-authored-by: Joe Clapis <jclapis@outlook.com> Co-authored-by: ltitanb <163874448+ltitanb@users.noreply.github.com> Co-authored-by: Manuel Iñaki Bilbao <manuel.bilbao@lambdaclass.com>
Now the
reload
endpoint on the signer module allows to update the JWT secrets too.Also, a new
revoke_module
endpoint was added, to quickly remove the permissions for a compromised module.This two endpoints are now under a new middleware that validates a special "admin" JWT, whose secret is autogenerated on the
init
command.