Skip to content

[feature](tls) Add TLS-aware internal HTTP client provider - #67223

Open
Yukang-Lian wants to merge 3 commits into
apache:masterfrom
Yukang-Lian:codex/tls7-internal-http-provider
Open

[feature](tls) Add TLS-aware internal HTTP client provider#67223
Yukang-Lian wants to merge 3 commits into
apache:masterfrom
Yukang-Lian:codex/tls7-internal-http-provider

Conversation

@Yukang-Lian

@Yukang-Lian Yukang-Lian commented Aug 27, 2026

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: N/A

Related PR: #65212

Problem Summary: Internal node-to-node HTTP calls previously assembled URLs and selected clients independently, so an extension could not enable one internal TLS transport consistently. This PR adds a target-aware ServiceLoader provider with an OSS fallback and routes FE-to-FE and FE-to-BE URL normalization, URLConnection, Apache HTTP client, RestTemplate, redirect, stream load, configuration, profile, minidump, metadata, and diagnostic call paths through it.

The OSS fallback preserves the existing enable_https behavior for FE endpoints and ordinary HTTP behavior for BE endpoints. Generic non-internal HTTP requests still follow their own URL scheme. When unified HTTP TLS is active, group commit still selects and redirects directly to the group-commit backend; only the optional extra BE-to-BE stream-load forward hop is skipped because that hop is not TLS-aware.

Release note

Add an extension point and complete call-site routing for TLS-aware internal FE and BE HTTP clients.

Check List (For Author)

  • Test: Maven reactor build plus focused Unit Tests for OssInternalHttpClientProviderTest, HttpURLUtilTest, LoadActionTest, HttpUtilsTest, and MinidumpUtTest: 45 run, 0 failures, 0 errors, 1 existing disabled test.
  • Checkstyle: 0 violations.
  • Behavior changed: Yes. Internal HTTP calls now explicitly identify FE or BE targets; unified HTTP TLS avoids the unsupported extra group-commit BE forward while preserving group-commit backend selection.
  • Does this need documentation: No

### What problem does this PR solve?

Issue Number: N/A

Related PR: apache#65212

Problem Summary: Internal FE HTTP callers are coupled to the OSS enable_https transport and cannot obtain URL normalization or TLS-aware clients from an extension. Add a public ServiceLoader provider with an OSS fallback, preserve the existing FE HTTPS trust behavior, and route the centralized FE URL, connection, Apache HTTP, and RestTemplate call paths through it. The rewrite keeps BE manager calls on plain HTTP, preserves raw encoded URI components, keeps SSRF cleanup unchanged, and does not alter group-commit forwarding fallback.

### Release note

Add an extension point for TLS-aware internal FE HTTP clients.

### Check List (For Author)

- Test: Unit Test: ./run-fe-ut.sh --run org.apache.doris.httpv2.client.OssInternalHttpClientProviderTest,org.apache.doris.common.util.HttpURLUtilTest,org.apache.doris.httpv2.rest.manager.HttpUtilsTest (16 passed)
- Behavior changed: Yes. Internal FE HTTP clients can be supplied by a ServiceLoader provider; OSS enable_https behavior is centralized without changing BE HTTP routing.
- Does this need documentation: No
@hello-stephen

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Apache Doris.
Don't know what should be done next? See How to process your PR.

Please clearly describe your PR:

  1. What problem was fixed (it's best to include specific error reporting information). How it was fixed.
  2. Which behaviors were modified. What was the previous behavior, what is it now, why was it modified, and what possible impacts might there be.
  3. What features were added. Why was this function added?
  4. Which code was refactored and why was this part of the code refactored?
  5. Which functions were optimized and what is the difference before and after the optimization?

Make FE-to-FE and FE-to-BE requests explicitly select the internal TLS client and normalize their endpoint. Under HTTP TLS, group commit still selects the group-commit backend directly while skipping the extra BE-to-BE forward hop.
@Yukang-Lian Yukang-Lian changed the title [feature](fe) Add internal HTTP client provider SPI [feature](fe) Add TLS-aware internal HTTP client provider Aug 28, 2026
@morrySnow morrySnow changed the title [feature](fe) Add TLS-aware internal HTTP client provider [feature](tls) Add TLS-aware internal HTTP client provider Aug 28, 2026
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