fix(conductor): add explicit TLS config#2140
Conversation
|
Would be good to get a changelog entry w/ info on the fix. |
| .wrap_err("failed parsing provided string as Uri")?; | ||
| let endpoint = Endpoint::from(uri.clone()); | ||
| let mut endpoint = Endpoint::from(uri.clone()); | ||
| if uri.scheme() == Some(&http::uri::Scheme::HTTPS) { |
There was a problem hiding this comment.
Is this necessary? Would setting the tls config preclude us from using http? I think we should be able to still connect (just like before)?
Either way, if this does blockhttp, I think I'd prefer to have ane explicit flag that deactivates tls so that one doesn't accidentally provide http instead of https and risk exposing the service to an unchecked endpoint.
There was a problem hiding this comment.
good point, I don't believe the TLS config prevents using http. Should not
| let endpoint = Endpoint::from(uri.clone()); | ||
| let mut endpoint = Endpoint::from(uri.clone()); | ||
| if uri.scheme() == Some(&http::uri::Scheme::HTTPS) { | ||
| endpoint = endpoint.tls_config(ClientTlsConfig::new().with_enabled_roots())?; |
There was a problem hiding this comment.
This is missing error context. Report that you failed to set the tls config using wrap_err
SuperFluffy
left a comment
There was a problem hiding this comment.
Looks good. But seconding @joroshiba: let's add an entry to the changelog.
## Summary Tag Conductor with v2.0.0-rc.2 that contains TLS fixes. ## Background Contains #2140 --------- Co-authored-by: Jordan Oroshiba <[email protected]>
## Summary Tag Conductor with v2.0.0-rc.2 that contains TLS fixes. ## Background Contains #2140 --------- Co-authored-by: Jordan Oroshiba <[email protected]>
## Summary Add explicit TLS config for composer's sequencer connection ## Background Tonic [removed implicit TLS configs](hyperium/tonic#1731) in v0.12.0 which now causes TLS errors when composer tries to connect to a remote sequencer network over TLS. ## Changelogs Changelogs updated. ## Related Issues Similar to fix done for conductor in [PR #2140](#2140)
## Summary Tag Conductor with v2.0.0-rc.2 that contains TLS fixes. ## Background Contains astriaorg/astria#2140 --------- Co-authored-by: Jordan Oroshiba <[email protected]>
## Summary Add explicit TLS config for composer's sequencer connection ## Background Tonic [removed implicit TLS configs](hyperium/tonic#1731) in v0.12.0 which now causes TLS errors when composer tries to connect to a remote sequencer network over TLS. ## Changelogs Changelogs updated. ## Related Issues Similar to fix done for conductor in [PR #2140](astriaorg/astria#2140)
## Summary Tag Conductor with v2.0.0-rc.2 that contains TLS fixes. ## Background Contains astriaorg/astria#2140 --------- Co-authored-by: Jordan Oroshiba <[email protected]>
## Summary Add explicit TLS config for composer's sequencer connection ## Background Tonic [removed implicit TLS configs](hyperium/tonic#1731) in v0.12.0 which now causes TLS errors when composer tries to connect to a remote sequencer network over TLS. ## Changelogs Changelogs updated. ## Related Issues Similar to fix done for conductor in [PR #2140](astriaorg/astria#2140)
Summary
Add explicit TLS config for conductor when the sequencer url is https
Background
Tonic removed implicit TLS configs in v0.12.0 which now causes TLS errors when conductor tries to connect to a remote sequencer network over TLS.