-
Notifications
You must be signed in to change notification settings - Fork 214
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
gRPC: add mTLS authentication to post service #5131
Labels
Comments
This was referenced Oct 5, 2023
4 tasks
bors bot
pushed a commit
that referenced
this issue
Oct 11, 2023
## Motivation Part of #5042 Merge after #5091 ## Changes - Generating poofs is now done via the GRPC API - Foundation laid in #5091 - Upon connection `PostClient` is passed to services via the `postConnectionListener` interface. At the moment these are: `activation::Builder` and `activation::NIPostBuilder` who use it to generate a proof - Instead of starting the `PostSupervisor` when `PostServiceCmd` is set it is started when `StartSmeshing == true` - The connection does not require authentication (yet) - will be addressed in #5131 - Connection cannot handle multiple post services (yet) - NiPoSTBuilder doesn't verify PoST proofs any more - PoST Service does this already before providing the proof - additionally when publishing the ATX it goes through the ATX handler that validates the ATX again before broadcasting it. - Refactored tests in `activation` package to use new API - Integration tests that do not use mocks for generating PoST proofs have been moved to `activation/e2e` to allow the use of the `api/grpcserver` package in them - `e2e` tests spin up a post service using the post supervisor and query a proof from there - Slimmed down `postSetupProvider` interface: - it is used by the `activation::Builder` and implemented by `activation::PostSetupManager` - some of its functionality has been moved into `PostClient` (`GenerateProof` -> `Proof`) - Replaced `go-spacemesh/log` with `zap` in a few components in the `activation` package. ## Test Plan - All existing tests involving proof generation have been migrated to use the new PoST service - New tests added to test the connection specifically. - Test added for custom types in config. ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
4 tasks
9 tasks
bors bot
pushed a commit
that referenced
this issue
Oct 19, 2023
## Motivation Closes #5131 do not merge before spacemeshos/api#268 and spacemeshos/post#245 ## Changes - setup for gRPC servers has been moved from node startup into the `grpcserver` package - `NewPublic`, `NewPrivate` and `NewTLS` create servers for the given purposes based on the configuration passed to them - replaced more instances of `go-spacemesh/log` with `zap` ## Test Plan - existing tests pass - TODO: add new tests for mTLS connection ## TODO <!-- This section should be removed when all items are complete --> - [x] Explain motivation or link existing issue(s) - [x] Test changes and document test plan - [x] Update documentation as needed - [x] Update [changelog](../CHANGELOG.md) as needed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
The post service is able to use mTLS authentication and the node should expose a dedicated gRPC endpoint that requires authentication for the post service to connect to.
Acceptance criteria
PublicListener
andPrivateListener
a new endpointAuthenticatedListener
is addedAuthenticatedListener
expects clients to connect withmTLS
AuthenticationPrivateListener
that can be used to trigger the node to reload known certificates from diskThe text was updated successfully, but these errors were encountered: