Skip to content

Conversation

@mycodecrafting
Copy link
Contributor

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.

@github-actions github-actions bot added the conductor pertaining to the astria-conductor crate label Apr 28, 2025
@joroshiba
Copy link
Member

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) {
Copy link
Contributor

@SuperFluffy SuperFluffy Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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())?;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is missing error context. Report that you failed to set the tls config using wrap_err

Copy link
Contributor

@SuperFluffy SuperFluffy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. But seconding @joroshiba: let's add an entry to the changelog.

@mycodecrafting mycodecrafting added this pull request to the merge queue Apr 30, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 30, 2025
@mycodecrafting mycodecrafting added this pull request to the merge queue Apr 30, 2025
Merged via the queue into main with commit 08fe3e6 Apr 30, 2025
50 checks passed
@mycodecrafting mycodecrafting deleted the codecrafting/conductor-tls-config branch April 30, 2025 03:14
github-merge-queue bot pushed a commit that referenced this pull request May 20, 2025
## Summary
Tag Conductor with v2.0.0-rc.2 that contains TLS fixes.

## Background
Contains #2140

---------

Co-authored-by: Jordan Oroshiba <jordan@astria.org>
ethanoroshiba pushed a commit that referenced this pull request May 27, 2025
## Summary
Tag Conductor with v2.0.0-rc.2 that contains TLS fixes.

## Background
Contains #2140

---------

Co-authored-by: Jordan Oroshiba <jordan@astria.org>
github-merge-queue bot pushed a commit that referenced this pull request Jun 17, 2025
## 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)
sgranfield4403-3 added a commit to sgranfield4403-3/astria that referenced this pull request Oct 2, 2025
## Summary
Tag Conductor with v2.0.0-rc.2 that contains TLS fixes.

## Background
Contains astriaorg/astria#2140

---------

Co-authored-by: Jordan Oroshiba <jordan@astria.org>
sgranfield4403-3 added a commit to sgranfield4403-3/astria that referenced this pull request Oct 2, 2025
## 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)
AngieD101 added a commit to AngieD101/astria that referenced this pull request Oct 10, 2025
## Summary
Tag Conductor with v2.0.0-rc.2 that contains TLS fixes.

## Background
Contains astriaorg/astria#2140

---------

Co-authored-by: Jordan Oroshiba <jordan@astria.org>
AngieD101 added a commit to AngieD101/astria that referenced this pull request Oct 10, 2025
## 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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conductor pertaining to the astria-conductor crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants