Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(v6) Fix --insecure-no-tls flag #5922

Merged
merged 1 commit into from
Mar 10, 2021
Merged

(v6) Fix --insecure-no-tls flag #5922

merged 1 commit into from
Mar 10, 2021

Conversation

r0mant
Copy link
Collaborator

@r0mant r0mant commented Mar 10, 2021

Discovered that I broke --insecure-no-tls flag when updating proxy listeners to support db protocols in our multiplexer.

This PR disables multiplexing if TLS is disabled, like it was before.

err = rc.CreateEx(nil, rcConf)
require.NoError(t, err)

err = rc.Start()
Copy link
Contributor

Choose a reason for hiding this comment

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

I wish the test could be reduced to this:

proxyConfig := newDefaultConfiguration()
// DisableTLS flag should turn off TLS termination and multiplexing.
proxyConfig.Proxy.DisableTLS = true

proxy := newTeleportInstance()
proxy.Start()
t.Cleanup(proxy.StopAll)

// Web proxy endpoint should just respond with 200 when called over http://,
// content doesn't matter.
resp, err := http.Get(fmt.Sprintf("http://%v", net.JoinHostPort(Loopback, rc.GetPortWeb())))
require.NoError(t, err)
require.NoError(t, resp.Body.Close())

@klizhentas klizhentas merged commit 13ad701 into branch/v6 Mar 10, 2021
@klizhentas klizhentas deleted the roman/v6/notls branch March 10, 2021 15:42
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.

3 participants