ATLAS-5380 : Authorize bulk entity headers before returning classifica… - #734
Open
VinayakMarraiya230920 wants to merge 1 commit into
Open
ATLAS-5380 : Authorize bulk entity headers before returning classifica…#734VinayakMarraiya230920 wants to merge 1 commit into
VinayakMarraiya230920 wants to merge 1 commit into
Conversation
VinayakMarraiya230920
marked this pull request as ready for review
August 20, 2026 12:08
…tions Apply per-entity ENTITY_READ checks in ClassificationAssociator.Retriever when building bulk headers response, matching getHeaderById behavior.
VinayakMarraiya230920
force-pushed
the
ATLAS-5380
branch
from
August 21, 2026 06:53
b5842e6 to
9b304b8
Compare
|
|
||
| private boolean isEntityReadAllowed(AtlasEntityHeader entityHeader) { | ||
| if (typeRegistry == null) { | ||
| return true; |
Collaborator
There was a problem hiding this comment.
if typeRegistry is null, entity access should be true/false ? please review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
tions
Apply per-entity ENTITY_READ checks in ClassificationAssociator.Retriever when building bulk headers response, matching getHeaderById behavior.
What changes were proposed in this pull request?
The bulk entity headers API (
GET /api/atlas/v2/entity/bulk/headers?tagUpdateStartTime=...) returned entity headers including classifications without checkingENTITY_READper entity.The single-header API (
GET /api/atlas/v2/entity/guid/{guid}/header) already enforcesENTITY_READand returns 403 when access is denied.So a user blocked from reading an entity via the single API could still see that entity’s metadata (and classifications) through the bulk API — an authorization bypass / information disclosure.
Fix
Updated
ClassificationAssociator.RetrieverinClassificationAssociator.javato:AtlasTypeRegistryon the retriever.typeRegistry == null→ no auth check, existing unit tests still pass).Behavior after fix
Authorized users are unaffected — they still get full bulk results.
Scope: 1 file changed, no REST contract change, no UI changes.
How was this patch tested?
With authorization enabled and two users (User A with access, User B without ENTITY_READ on a target entity):
User A creates an entity and adds a classification.
User B calls GET .../guid/{guid}/header → 403 ✓
User B calls GET .../bulk/headers?tagUpdateStartTime={beforeChange} → GUID not in response ✓
User A calls same bulk API → entity returned with classifications ✓ (no regression)
Unit tests
mvn -pl repository -Dtest=ClassificationAssociatorTest test
mvn -pl webapp -Dtest=EntityRESTTest#testGetEntityHeaders_InvalidTime_ThrowsException test
All existing tests pass.
Build
mvn -pl repository -am compile -DskipTests
Compiles successfully.