yarpc / yarpc-go

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

[3/n] tchannel-mtls: integrate tchannel outbound tls #2183

Closed jronak closed 1 year ago

jronak commented 1 year ago

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

yarpc:
  outbounds:
    test-svc:
      tchannel:
         peer: 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. Additional, this PR exposes:

codecov[bot] commented 1 year ago

Codecov Report

Base: 78.45% // Head: 85.31% // Increases project coverage by +6.86% :tada:

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

Additional details and impacted files ```diff @@ Coverage Diff @@ ## dev #2183 +/- ## ========================================== + Coverage 78.45% 85.31% +6.86% ========================================== Files 263 270 +7 Lines 15302 15463 +161 ========================================== + Hits 12005 13193 +1188 + Misses 2752 1847 -905 + Partials 545 423 -122 ``` | [Impacted Files](https://codecov.io/gh/yarpc/yarpc-go/pull/2183?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc) | Coverage Δ | | |---|---|---| | [transport/tchannel/config.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-dHJhbnNwb3J0L3RjaGFubmVsL2NvbmZpZy5nbw==) | `93.84% <100.00%> (+42.82%)` | :arrow_up: | | [transport/tchannel/options.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-dHJhbnNwb3J0L3RjaGFubmVsL29wdGlvbnMuZ28=) | `87.03% <100.00%> (+41.93%)` | :arrow_up: | | [transport/tchannel/transport.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-dHJhbnNwb3J0L3RjaGFubmVsL3RyYW5zcG9ydC5nbw==) | `87.42% <100.00%> (+23.90%)` | :arrow_up: | | [encoding/thrift/thriftrw-plugin-yarpc/gomock.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-ZW5jb2RpbmcvdGhyaWZ0L3RocmlmdHJ3LXBsdWdpbi15YXJwYy9nb21vY2suZ28=) | `100.00% <0.00%> (ø)` | | | [encoding/thrift/thriftrw-plugin-yarpc/template.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-ZW5jb2RpbmcvdGhyaWZ0L3RocmlmdHJ3LXBsdWdpbi15YXJwYy90ZW1wbGF0ZS5nbw==) | `81.25% <0.00%> (ø)` | | | [encoding/thrift/thriftrw-plugin-yarpc/client.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-ZW5jb2RpbmcvdGhyaWZ0L3RocmlmdHJ3LXBsdWdpbi15YXJwYy9jbGllbnQuZ28=) | `100.00% <0.00%> (ø)` | | | [encoding/thrift/thriftrw-plugin-yarpc/main.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-ZW5jb2RpbmcvdGhyaWZ0L3RocmlmdHJ3LXBsdWdpbi15YXJwYy9tYWluLmdv) | `82.00% <0.00%> (ø)` | | | [encoding/thrift/thriftrw-plugin-yarpc/fx.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-ZW5jb2RpbmcvdGhyaWZ0L3RocmlmdHJ3LXBsdWdpbi15YXJwYy9meC5nbw==) | `100.00% <0.00%> (ø)` | | | [encoding/thrift/thriftrw-plugin-yarpc/server.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-ZW5jb2RpbmcvdGhyaWZ0L3RocmlmdHJ3LXBsdWdpbi15YXJwYy9zZXJ2ZXIuZ28=) | `100.00% <0.00%> (ø)` | | | [encoding/thrift/thriftrw-plugin-yarpc/exception.go](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc#diff-ZW5jb2RpbmcvdGhyaWZ0L3RocmlmdHJ3LXBsdWdpbi15YXJwYy9leGNlcHRpb24uZ28=) | `88.00% <0.00%> (ø)` | | | ... and [58 more](https://codecov.io/gh/yarpc/yarpc-go/pull/2183/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=yarpc) | | 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.