yarpc / yarpc-go

A message passing platform for Go
MIT License
405 stars 103 forks source link

[6/n] tls: integrate gRPC outbound tls #2172

Closed jronak closed 2 years ago

jronak commented 2 years ago

gRPC outbounds can be configured with client-provided TLS config via the OutboundTLSConfigProvider interface. Services can configure the outbound TLS like:

yarpc:
  outbounds:
    test-svc:
      grpc:
         address: 127.0.0.1:5453
         tls:
           mode: enforced
           spiffe-ids:
             - spiffe-id-1

Spiffe-ids provided in the config above are passed to OutboundTLSConfigProvider.ClientTLSConfig to fetch the client TLS config for the outbound. Exposes the following gRPC dialer options:

For reviews, follow this order:

codecov[bot] commented 2 years ago

Codecov Report

Base: 85.15% // Head: 85.22% // Increases project coverage by +0.07% :tada:

Coverage data is based on head (a7fd0f6) compared to base (6d89c98). Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2172 +/- ## ========================================== + Coverage 85.15% 85.22% +0.07% ========================================== Files 269 269 Lines 15294 15333 +39 ========================================== + Hits 13023 13067 +44 + Misses 1848 1845 -3 + Partials 423 421 -2 ``` | [Impacted Files](https://codecov.io/gh/yarpc/yarpc-go/pull/2172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc) | Coverage Δ | | |---|---|---| | [transport/grpc/config.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-dHJhbnNwb3J0L2dycGMvY29uZmlnLmdv) | `97.29% <100.00%> (+1.80%)` | :arrow_up: | | [transport/grpc/options.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-dHJhbnNwb3J0L2dycGMvb3B0aW9ucy5nbw==) | `94.35% <100.00%> (+3.35%)` | :arrow_up: | | [transport/grpc/peer.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-dHJhbnNwb3J0L2dycGMvcGVlci5nbw==) | `96.61% <100.00%> (ø)` | | | [yarpcconfig/builder.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-eWFycGNjb25maWcvYnVpbGRlci5nbw==) | `98.77% <100.00%> (ø)` | | | [transport/internal/tls/muxlistener/listener.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-dHJhbnNwb3J0L2ludGVybmFsL3Rscy9tdXhsaXN0ZW5lci9saXN0ZW5lci5nbw==) | `93.87% <0.00%> (-2.05%)` | :arrow_down: | | [transport/internal/tls/dialer/dialer.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2172/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-dHJhbnNwb3J0L2ludGVybmFsL3Rscy9kaWFsZXIvZGlhbGVyLmdv) | `100.00% <0.00%> (+8.82%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.