Skip to content

test: add cross-tenant isolation tests supporting upstream_header - #6540

Open
rhdedgar wants to merge 2 commits into
ogx-ai:mainfrom
rhdedgar:cross_tenant_isolation_tests
Open

rhdedgar wants to merge 2 commits into
ogx-ai:mainfrom
rhdedgar:cross_tenant_isolation_tests

Conversation

@rhdedgar

Copy link
Copy Markdown
Contributor

What does this PR do?

  • Adds 6 tests to test_multi_tenant_files_e2e.py and 5 tests to test_multi_tenant_responses_e2e.py, extending the pattern from the existing conversations tests in test_multi_tenant_e2e.py to cover files and responses.
  • Tests exercise the full middleware stack (AuthenticationMiddleware -> TenancyMiddleware -> ProviderDataMiddleware -> AuthorizedSqlStore) with upstream_header auth, verifying tenant isolation at the HTTP level.

Currently, conversations had HTTP-level isolation tests, but files and responses were only tested at lower layers like AuthorizedSqlStore unit tests, and integration tests with Bearer tokens. These tests close that gap by verifying that cross-tenant reads, deletes, and list operations return 404/empty results through the actual HTTP path.

Closes RHAIENG-6646

Test Plan

Signed-off-by: Doug Edgar <dedgar@redhat.com>
Signed-off-by: Doug Edgar <dedgar@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants