prajwal-jadhav01 opened a new pull request, #20121:
URL: https://github.com/apache/pinot/pull/20121
Fixes #20120. Related: #12448.
## Problem
PinotSink always called uploadSegment(segmentURI, null), so segment uploads
failed when the
controller has authentication enabled.
## Change
- Read `authToken` (BatchConfigProperties.AUTH_TOKEN) from the table's batch
config map and build an
AuthProvider with AuthProviderUtils.makeAuthProvider() inside the sink
writer (PinotSink is
serialized to task managers and AuthProvider is not Serializable).
- Pass it to SegmentUploaderDefault.uploadSegment(). No token configured =
unchanged behaviour.
- Log only the table name when the writer opens, instead of the full table
config JSON, so the
token is not written to task manager logs.
## Usage
Add `"authToken": "Basic <base64(user:password)>"` to the table's
batchConfigMaps entry
(or a Bearer token).
## Testing
- New PinotSinkAuthTest covering token present / absent.
- `mvn -pl pinot-connectors/pinot-flink-connector checkstyle:check test`
passes for unit tests.
## Possible follow-up
Auth for ControllerRequestClient (fetching table config/schema) is not
covered here.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]