Skip to content

feat(tls): Support async TlsHandshake in protocol.Conn#83

Merged
louisruch merged 2 commits intomainfrom
louis-conn
Apr 17, 2026
Merged

feat(tls): Support async TlsHandshake in protocol.Conn#83
louisruch merged 2 commits intomainfrom
louis-conn

Conversation

@louisruch
Copy link
Copy Markdown
Contributor

Description

Runs TlsHandshake in goroutine and adds timeout (defaults 1 minute) to the TlsHandshake

PCI review checklist

  • I have documented a clear reason for, and description of, the change I am making.

  • If applicable, I've documented a plan to revert these changes if they require more than reverting the pull request.

  • If applicable, I've documented the impact of any changes to security controls.

    Examples of changes to security controls include using new access control methods, adding or removing logging pipelines, etc.

@louisruch louisruch requested a review from a team as a code owner April 14, 2026 21:26
@louisruch louisruch changed the title Louis conn feat(tls): Support async TlsHandshake in protocol.Conn Apr 14, 2026
irenarindos
irenarindos previously approved these changes Apr 15, 2026
Copy link
Copy Markdown
Collaborator

@irenarindos irenarindos left a comment

Choose a reason for hiding this comment

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

Just two small things

Comment thread net/splitlistener_test.go Outdated
Comment thread protocol/conn.go Outdated
RyanDerr
RyanDerr previously approved these changes Apr 16, 2026
Comment thread protocol/conn.go Outdated
irenarindos
irenarindos previously approved these changes Apr 16, 2026
RyanDerr
RyanDerr previously approved these changes Apr 16, 2026
Copy link
Copy Markdown
Member

@RyanDerr RyanDerr left a comment

Choose a reason for hiding this comment

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

Thanks for adding the nil checks!

ddebko
ddebko previously approved these changes Apr 16, 2026
Copy link
Copy Markdown

@ddebko ddebko left a comment

Choose a reason for hiding this comment

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

I left a few non-blocking suggestions, mostly defensive checks. I also had one question about a possible cleanup issue in case I’m overlooking something.

Comment thread net/splitlistener.go
Comment thread net/splitlistener.go
Comment thread protocol/listener.go
@louisruch louisruch dismissed stale reviews from ddebko, RyanDerr, and irenarindos via 83f004a April 16, 2026 18:42
@louisruch louisruch requested a review from ddebko April 16, 2026 19:01
Copy link
Copy Markdown

@ddebko ddebko left a comment

Choose a reason for hiding this comment

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

Great job on this PR.

@louisruch louisruch requested a review from jefferai April 16, 2026 19:56
Comment thread protocol/conn.go
}

_ = c.waitForHandshake()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Meta comment about this overall approach. Custom reads and writes I think can break the ability for some kernel speedups in conns. We can't really use that anyways but in downstream code we may want to pull out the *tls.Conn when possible to be closer to the bare connection. At least in current Boundary it shouldn't matter, but if we use a different proxying method it might be important.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

thanks for this note, I am going to merge this PR as is and then add some additional comments in future PR to allow time for Boundary team to test these changes before getting it to the customer

Copy link
Copy Markdown
Member

@jefferai jefferai left a comment

Choose a reason for hiding this comment

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

I think it looks good! Pending testing in Boundary to make sure everything still works properly.

@louisruch louisruch merged commit 02205d3 into main Apr 17, 2026
2 checks passed
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.

5 participants