Skip to content

[feature](fe) Add internal HTTP client provider SPI - #67223

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

[feature](fe) Add internal HTTP client provider SPI#67223
Yukang-Lian wants to merge 2 commits into
apache:masterfrom
Yukang-Lian:codex/tls7-internal-http-provider

Conversation

@Yukang-Lian

Copy link
Copy Markdown
Collaborator

What problem does this PR solve?

Issue Number: N/A

Related PR: #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

### 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?

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