You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "zhang-arvin (via GitHub)" <gi...@apache.org> on 2026/09/01 08:23:28 UTC
[PR] [Feature][Connector-V2] Fix HTTP credential handling - add scheme check and exclude token from toString [seatunnel]
zhang-arvin opened a new pull request, #12040:
URL: https://github.com/apache/seatunnel/pull/12040
Fixes #12025: Two gaps in connector-http-base credential handling:
1. No scheme check on credential tokens
2. Token appears in @Data toString() which can leak to logs
### Changes
- Added scheme validation for credential tokens
- Excluded token from toString() to prevent accidental log leakage
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Connector-V2] Fix HTTP credential handling - add scheme check and exclude token from toString [seatunnel]
Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo merged PR #12040:
URL: https://github.com/apache/seatunnel/pull/12040
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [Feature][Connector-V2] Fix HTTP credential handling - add scheme check and exclude token from toString [seatunnel]
Posted by "zhang-arvin (via GitHub)" <gi...@apache.org>.
zhang-arvin commented on PR #12040:
URL: https://github.com/apache/seatunnel/pull/12040#issuecomment-6051868984
@DanielLeens Both carried-over findings are now fixed, plus the test gap. Pushed head `351590528`.
**Issue 1 (High, credential-header detection)** - fixed. `hasAuthHeader` no longer relies on the substring `authorization`. Detection now matches against a small allow-list of known credential header names (`authorization`, `proxy-authorization`, `private-token`, `x-api-key`, `api-key`, `x-auth-token`, `x-token`, `x-access-token`), and the method signature is now `validateCredentialScheme(String... credentialHeaderKeys)` so a connector can also pass the exact key it just set. GitLab (`PRIVATE-TOKEN`) and PersistIQ (`x-api-key`) are now actually covered by the warning, not just wired to a no-op.
**Issue 2 (Medium, Airtable sink)** - fixed. `AirtableSink` now calls `httpParameter.validateCredentialScheme()` right after building its Bearer-token headers, matching `AirtableSourceParameter` and `HttpSink`.
**Issue 4 (test coverage)** - added `HttpParameterCredentialSchemeTest` (5 tests): covers `Authorization`/`PRIVATE-TOKEN`/`x-api-key`/`api-key` detection, non-credential headers (no false positive), explicit-key overload, and that `validateCredentialScheme` never throws across http/https/null-url combinations.
Verified locally with the project toolchain (JDK 8): `connector-http-base` tests green (`Tests run: 5, Failures: 0`), the full `connector-http` reactor (all 13 connectors + `HttpSink`) compiles, and `spotless:apply` is clean.
Note the branch head moved `27659e1c4 -> 9b4383023` (rebase-only) while this was in flight; I rebased this change onto `9b4383023` so no prior content was dropped.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org