fix(auth): run generic entity E2E tests as a service principal#845
Conversation
|
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 authenticate entity-store operations with a service-principal client while retaining caller credentials for projects. The cluster-info URL uses the SDK base URL, and authorization comments clarify workspace sub-resource handling. ChangesInternal entities E2E coverage
Suggested labels: Suggested reviewers: 🚥 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
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