Skip to content

[v17] Add support for target port in gateways in Connect#51014

Merged
ravicious merged 7 commits intobranch/v17from
r7s/v17/backport-50912-target-port-connect
Jan 21, 2025
Merged

[v17] Add support for target port in gateways in Connect#51014
ravicious merged 7 commits intobranch/v17from
r7s/v17/backport-50912-target-port-connect

Conversation

@ravicious
Copy link
Copy Markdown
Member

@ravicious ravicious commented Jan 14, 2025

* Update type for targetSubresourceName on DocumentGateway

The way DocumentsService.createGatewayDocument is implemented means that
the targetSubresourceName property is always present, but it can be undefined.

* Use "local port" instead of "port" in DocumentGatewapApp

* Rewrite gateway FieldInputs to use styled components

* Update comments in protos

* useGateway: Stabilize useAsync functions of ports

* Add padding to menu label if it's first child

* Add support for required prop to Input and FieldInput

* Add UI for changing target port

* ActionButtons: Show ports of multi-port apps when VNet is not supported

Now that we have support for the target port in Connect's gateways, we
can show the ports and then open a gateway for that specific port on
click.

* Add RWMutex to gateways

* Clear app gateway cert on target port change

* Remove gateways/app.LocalProxyURL

It was used only in tests and it made sense only for web apps anyway.

* TestTCP: Close connections when test ends

* Create context with timeout in testGatewayCertRenewal

…instead of in each function that uses it.

* Add tests for changing the target port of a TCP gateway

* Parallelize app gateway tests within MFA/non-MFA groups

* Make testGatewayConnection take ctx as first arg

This will be needed in tests that check target port validation.

* Validate target port of app gateways

* Increase timeouts in app gateway tests
@ravicious ravicious added do-not-merge no-changelog Indicates that a PR does not require a changelog entry and removed no-changelog Indicates that a PR does not require a changelog entry labels Jan 14, 2025
@github-actions github-actions Bot requested review from avatus and gzdunek January 14, 2025 09:34
@codingllama
Copy link
Copy Markdown
Contributor

Please patch #51022 in here before you merge it.

* Make OfflineGateway use uncontrolled forms

* Pass form fields to OfflineGateway from outside

This will enable each callsite to establish it's own rules as to which
fields are required. This will be useful once we add required target
subresource name for TCP apps.

* Add tests for submitting form through OfflineGateway

* Make sure reconnect and formSchema operate on the same type

* Add comment for Terminal input
… port

* Ensure uniqueness of gateways in tshd

* Add comments to a bunch of related types and functions

* Refactor ClustersService.findGatewayByConnectionParams

This makes it work with app gateways too.

* Remove gatewayUri from TrackedGatewayConnection

* Update document title on target port change

* MenuLogin: Support custom ButtonComponent and buttonText

* setUpAppGateway: Accept app URI instead of whole app

This will let us call this function from places which do not have access
to the whole app object.

* useGateway: Update doc title after creating gateway

* Change list of buttons with ports to MenuLogin with ports
@public-teleport-github-review-bot
Copy link
Copy Markdown

@ravicious - this PR will require admin approval to merge due to its size. Consider breaking it up into a series smaller changes.

@ravicious ravicious requested a review from zmb3 January 20, 2025 12:33
@ravicious ravicious added this pull request to the merge queue Jan 21, 2025
Merged via the queue into branch/v17 with commit 5cef60f Jan 21, 2025
@ravicious ravicious deleted the r7s/v17/backport-50912-target-port-connect branch January 21, 2025 11:02
@camscale camscale mentioned this pull request Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants