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

[Merged by Bors] - Add mTLS grpcserver #5154

Closed
wants to merge 23 commits into from

Conversation

fasmat
Copy link
Member

@fasmat fasmat commented Oct 13, 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

  • Explain motivation or link existing issue(s)
  • Test changes and document test plan
  • Update documentation as needed
  • Update changelog as needed

@fasmat fasmat self-assigned this Oct 13, 2023
@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #5154 (e114486) into develop (29759e0) will decrease coverage by 0.2%.
The diff coverage is 62.3%.

@@            Coverage Diff            @@
##           develop   #5154     +/-   ##
=========================================
- Coverage     77.8%   77.6%   -0.2%     
=========================================
  Files          259     260      +1     
  Lines        30773   30960    +187     
=========================================
+ Hits         23944   24047    +103     
- Misses        5342    5409     +67     
- Partials      1487    1504     +17     
Files Coverage Δ
activation/post_supervisor.go 85.9% <100.0%> (+0.9%) ⬆️
api/grpcserver/config.go 100.0% <100.0%> (ø)
config/config.go 100.0% <100.0%> (ø)
config/presets/fastnet.go 100.0% <100.0%> (ø)
config/presets/standalone.go 100.0% <100.0%> (ø)
node/test_network.go 96.3% <100.0%> (ø)
config/presets/presets.go 68.7% <0.0%> (+4.0%) ⬆️
api/grpcserver/activation_service.go 75.4% <66.6%> (-2.0%) ⬇️
api/grpcserver/admin_service.go 64.6% <66.6%> (-0.6%) ⬇️
api/grpcserver/debug_service.go 73.0% <66.6%> (-1.0%) ⬇️
... and 10 more

... and 4 files with indirect coverage changes

@fasmat fasmat changed the title WiP Add mTLS grpcserver Add mTLS grpcserver Oct 13, 2023
@fasmat fasmat marked this pull request as ready for review October 13, 2023 16:24
@fasmat fasmat force-pushed the 5131-add-authenticated-listener branch from 28a0716 to 10d28f1 Compare October 13, 2023 17:17
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
CHANGELOG.md Outdated Show resolved Hide resolved
activation/post_supervisor.go Show resolved Hide resolved
api/grpcserver/http_server.go Outdated Show resolved Hide resolved
api/grpcserver/http_server.go Outdated Show resolved Hide resolved
@fasmat fasmat requested a review from poszu October 17, 2023 15:49
@fasmat fasmat force-pushed the 5131-add-authenticated-listener branch from 5995f25 to 76c8334 Compare October 17, 2023 18:55
@fasmat
Copy link
Member Author

fasmat commented Oct 19, 2023

bors merge

bors bot pushed a commit that referenced this pull request 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
@bors
Copy link

bors bot commented Oct 19, 2023

Build failed:

  • ci-status

@fasmat
Copy link
Member Author

fasmat commented Oct 19, 2023

bors merge

bors bot pushed a commit that referenced this pull request 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
@fasmat
Copy link
Member Author

fasmat commented Oct 19, 2023

bors merge

@bors
Copy link

bors bot commented Oct 19, 2023

Already running a review

@bors
Copy link

bors bot commented Oct 19, 2023

Pull request successfully merged into develop.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title Add mTLS grpcserver [Merged by Bors] - Add mTLS grpcserver Oct 19, 2023
@bors bors bot closed this Oct 19, 2023
@bors bors bot deleted the 5131-add-authenticated-listener branch October 19, 2023 16:55
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.

gRPC: add mTLS authentication to post service
2 participants