Skip to content

Honor plaintext and insecure settings in topaz access wellknown - #763

Closed
gertd with Copilot wants to merge 6 commits into
config-infofrom
copilot/fix-review-comment-760
Closed

gertd with Copilot wants to merge 6 commits into
config-infofrom
copilot/fix-review-comment-760

Conversation

Copilot AI commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

topaz access wellknown always used http.DefaultClient, so it ignored TOPAZ_PLAINTEXT and TOPAZ_INSECURE. In default local TLS setups, that made the generated well-known URL unreachable unless the gateway certificate was already trusted.

  • Request transport

    • Route well-known requests over http when plaintext mode is enabled.
    • Use an HTTP client that honors insecure TLS mode for this command.
  • Transport preservation

    • Clone the effective default client/transport instead of replacing it wholesale.
    • Preserve existing client settings and cloned TLS config; only override InsecureSkipVerify when TOPAZ_INSECURE is set.
  • Focused coverage

    • Add tests for:
      • HTTPS → HTTP URL rewrite in plaintext mode
      • insecure TLS access against a self-signed test server
      • plaintext access against an HTTP test server
if req.URL, err = wellKnownURL(req.URL, info.Directory.Plaintext); err != nil {
	return fmt.Errorf("building request URL: %w", err)
}

resp, err := wellKnownClient(info.Directory.Insecure).Do(req)

@gertd
gertd added this pull request to stack #764 September 27, 2026 14:23
Co-authored-by: gertd <1533850+gertd@users.noreply.github.com>
@coveralls

coveralls commented Sep 27, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 36326674635

Coverage remained the same at 6.27%

Details

  • Coverage remained the same as the base build.
  • Patch coverage: No coverable lines changed in this PR.
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 10175
Covered Lines: 638
Line Coverage: 6.27%
Coverage Strength: 0.06 hits per line

💛 - Coveralls

Copilot AI and others added 4 commits September 27, 2026 14:34
Co-authored-by: gertd <1533850+gertd@users.noreply.github.com>
Co-authored-by: gertd <1533850+gertd@users.noreply.github.com>
Co-authored-by: gertd <1533850+gertd@users.noreply.github.com>
Co-authored-by: gertd <1533850+gertd@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix code based on review comment Honor plaintext and insecure settings in topaz access wellknown Sep 27, 2026
Copilot AI requested a review from gertd September 27, 2026 14:39
@gertd
gertd marked this pull request as ready for review September 27, 2026 14:41
@gertd gertd closed this Sep 27, 2026
@gertd
gertd deleted the copilot/fix-review-comment-760 branch September 27, 2026 14:58
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.

4 participants