Configured HTTPS scheme is ignored by HTTP probes
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 82/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- go
- Domain
- networking, testing
Research direction
Start at the HTTPGetCheck entry point and use the TestHTTPSProbeAgainstPlainHTTP reproduction as the regression case. Trace how probe.Scheme is handled, then verify that an HTTPS-configured probe cannot pass against the plain HTTP test server and that the focused test reflects the expected behavior.
Written by the indexing model from the issue text.
Description
An HTTP probe configured with scheme: HTTPS still sends a plaintext HTTP request. This makes a TLS-only endpoint fail validation, while a plaintext endpoint can incorrectly satisfy a check that explicitly requires HTTPS.
Minimal reproduction
The following focused test uses a plain HTTP server but marks the probe as HTTPS:
func TestHTTPSProbeAgainstPlainHTTP(t *testing.T) {
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, _ *http.Request) {
w.WriteHeader(http.StatusOK)
}))
defer server.Close()
port := server.Listener.Addr().(*net.TCPAddr).Port
probe := &canaryv1.Probe{HTTPGet: &canaryv1.HTTPGetAction{
Path: "/",
Port: port,
Scheme: v1.URISchemeHTTPS,
}}
got, err := HTTPGetCheck(nil, probe)
require.NoError(t, err)
require.True(t, got)
}
Verified on main at db5af4f: the test passes, showing that the HTTPS setting is ignored.
Expected behavior
An HTTP probe should use its configured scheme. A probe requiring HTTPS must not pass against a plaintext HTTP endpoint.
- Dominant language
- Go
- Stars
- 309
- Forks
- 23
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NVIDIA/container-canary
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
NVIDIA/container-canary#85 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
NVIDIA/container-canary#102 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
NVIDIA/container-canary#101 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
NVIDIA/container-canary#99 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
NVIDIA/container-canary#98 ·
All issues in NVIDIA/container-canary
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100