fix(auth): run generic entity E2E tests as a service principal - #845
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
📝 WalkthroughWalkthroughEntity E2E tests now use service-principal credentials for entity-store operations and caller credentials for project operations. The cluster-info URL uses the SDK base URL. Authorization comments describe workspace sub-resource handling. ChangesInternal entities E2E coverage
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
mckornfield
left a comment
There was a problem hiding this comment.
is the fix just a test only fix, specifically using a different principal sdk?
ironcommit
left a comment
There was a problem hiding this comment.
Need some clarification on what is changing in the PR
Signed-off-by: anastasia-nesterenko <anesterenko@nvidia.com>
764ac00 to
7b0d4b4
Compare
…403-for-authenticated-users-on-nmpdev
…403-for-authenticated-users-on-nmpdev
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Summary
Updates the direct Entities API E2E tests to authenticate as an internal service principal, matching how feature services access the entity store in production.
This is a test-only behavior correction. It does not change runtime authorization: generic Entities API CRUD remains service-only, and authenticated user principals continue to receive
403 Forbidden.Changes
entity_store_sdkfixture usingas_service_for./cluster-infoE2E request.Why
These E2E tests were calling the internal generic Entities API with user credentials. Because that API is intentionally service-only, the calls correctly returned
403.Feature services access the entity store using a
service:*principal. The tests now use the same authentication model so they validate entity-store behavior without weakening access controls.Runtime impact
None. This PR does not change authorization policies, role definitions, or endpoint behavior.
Validation
To rerun on the final PR head:
uv run --frozen pytest e2e/test_entities.py -v --run-e2euv run --frozen ruff check e2e/test_entities.pygit diff --checkSummary by CodeRabbit