Skip to content

[Bug]: TestMilvusClientRbacAdvance collection privilege cases fail at using_database with PERMISSION_DENIED on branch 2.6 #50211

@NicoYuan1986

Description

@NicoYuan1986

Environment

  • Milvus Version: unknown-20260601-0abab9cf85
  • Deployment Mode: remote branch2.6 test environment
  • MQ: unknown
  • SDK: pymilvus 2.6.15rc2
  • OS: unknown

Reproduction

Option B: Steps

  1. Use the branch 2.6 Python client test code.
  2. Run the RBAC advance class against the branch2.6 environment:
    cd tests/python_client
    pytest -o addopts=-p no:locust milvus_client/test_milvus_client_rbac.py::TestMilvusClientRbacAdvance -q
  3. Observe 8 failures from the following 4 test groups (both with_db=False and with_db=True):
    • test_milvus_client_verify_grant_collection_load_privilege
    • test_milvus_client_verify_grant_collection_release_privilege
    • test_milvus_client_verify_grant_collection_insert_privilege
    • test_milvus_client_verify_grant_collection_delete_privilege
  4. In all four cases, the failure happens before the actual collection operation is verified.

Trigger Conditions

  • Frequency: always in the tested branch2.6 environment
  • First observed after: granting only collection-level privileges and then calling using_database() with the limited user
  • Does NOT happen when: not verified yet

Expected Behavior

After granting the intended collection-level privileges for Load/GetLoadingProgress, Release, Insert, or Delete, the corresponding RBAC test should be able to switch to the target database and verify the granted collection operation successfully.

If using_database() requires extra database-level privileges by design, the tests should explicitly grant those privileges before validating the collection-level behavior.

Actual Behavior

All four test groups fail at using_database(user_client, db_name) before reaching the intended collection operation.

The limited user receives PERMISSION_DENIED from DescribeDatabase, so the tests never get to validate the granted Load/Release/Insert/Delete privilege itself.

Error Logs

grpc RpcError: [describe_database], <_InactiveRpcError: StatusCode.PERMISSION_DENIED,
PrivilegeDescribeDatabase: permission deny to user_xxx in the `default` database>

AssertionError: Response of API using_database expect True, but got False

Affected call sites in tests/python_client/milvus_client/test_milvus_client_rbac.py:

  • test_milvus_client_verify_grant_collection_load_privilege
  • test_milvus_client_verify_grant_collection_release_privilege
  • test_milvus_client_verify_grant_collection_insert_privilege
  • test_milvus_client_verify_grant_collection_delete_privilege

Non-default Configuration

common.security.authorizationEnabled: true

Analysis Hints (Optional)

Metadata

Metadata

Labels

area/testkind/bugIssues or changes related a bugtriage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions