adds auth to all gets #82
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
TL-DR: This PR:
getrequests to indexd have an auth header🛠️ PR #82 — Ensure
authIs Passed to_getinIndexClient.getSummary
This PR updates the
IndexClient.get()method to pass the client’sauthobject explicitly when calling the internal_get()function. This change is necessary for compatibility with [uc-cdis/indexd#400](uc-cdis/indexd#400), which adds support for a feature flag that enforces access control by filtering results based on the user’sauthzpermissions. Without this fix,indexclientfails to propagate credentials, resulting in 403 errors even when the user is authorized.Use Case
As a developer or service interacting with Indexd via
indexclient,I want all GET requests to automatically include the
authparameter from theIndexClientinstance,So that access-controlled records can be retrieved successfully in secured Gen3 environments.
This is essential in deployments where:
authz(enabled via a feature flag introduced in PR #400)Changes
IndexClient.get()to explicitly passauth=self.authwhen calling_get()Before
After
Acceptance Tests
✅ 1. Authorized record fetch
✅ 2. Unauthorized access fails (expected)
✅ 3. Backward compatibility for public deployments