Akanksha-kedia opened a new pull request, #17508:
URL: https://github.com/apache/pinot/pull/17508
File:
pinot-server/src/main/java/org/apache/pinot/server/api/resources/TablesResource.java
Issue:
// TODO Add access control similar to
PinotSegmentUploadDownloadRestletResource for segment download.
@GET
@Path("/segments/{tableName}/{segmentName}")
public Response downloadSegment(...)
What to do:
Add @Authorize annotation similar to controller's download endpoint
Add authentication check
Test with curl commands
Testing:
# Start server
bin/pinot-admin.sh StartServer
# Test without auth (should fail after fix)
curl http://localhost:8098/segments/myTable/segment_0
# Test with auth (should work)
curl -H "Authorization: Bearer <token>"
http://localhost:8098/segments/myTable/segment_0
--
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]