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

use https for other relogin tests #2184

Closed
wants to merge 1 commit into from

Conversation

kradalby
Copy link
Collaborator

@kradalby kradalby commented Oct 9, 2024

continuation of #2164

Signed-off-by: Kristoffer Dalby <kristoffer@tailscale.com>
@hopleus
Copy link
Contributor

hopleus commented Oct 9, 2024

@kradalby Perhaps you should add hsic.WithTLS() to auth_oidc_test.go?

@kradalby
Copy link
Collaborator Author

kradalby commented Oct 9, 2024

Could do, but it is only necessary for tests which includes logging out and then immediately reconnecting. It is because of a timer in the new client and its good to keep some tests to check the old behaviour.

@hopleus
Copy link
Contributor

hopleus commented Oct 9, 2024

@kradalby

When integrationTests were run locally (using WithTls()), the same problem occurred as in the current tests.
When the following code was added to runTailscaleUp.

loginURL.Host = fmt.Sprintf('%s:8080', headscale.GetIP())
loginURL.Scheme = 'http'

if len(headscale.GetCert()) > 0 {
	loginURL.Scheme = 'https'
}

insecureTransport := &http.Transport{
	TLSClientConfig: &tls.Config{InsecureSkipVerify: true}, // nolint
}

the error stopped occurring

The error itself 2024/10/09 09:52:00 failed to register client (ts-1-72-jqug4h): failed to parse auth page contains Client sent an HTTP request to an HTTPS server..

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.

2 participants