Skip to content

[Bug]: REST dropRole has no force option: roles with grants cannot be force-dropped #56292

Todo

Description

@Wwwing301

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus `3.0-20261110` (`milvusdb/milvus:latest`), source `master` @ `daa653b2bb37` (2026-11-17)
- Standalone Linux x86_64, authorization enabled (`common.security.authorizationEnabled: true`), root user
- Interface: REST v2 `POST /v2/vectordb/roles/drop`; gRPC `DropRole` for comparison
- Component: proxy REST v2 RBAC handlers; rootcoord role metadata

Current Behavior

Both requests fail with the same JSON error and the role survives:

code: 1100
failed to check if drop role: fail to drop the role that it has privileges.
Use REVOKE API to revoke privileges: invalid parameter

{"roleName":"r134","force":true} returns the same body: the key is ignored by the decoder and never reaches rootcoord. roles/list still contains r134, so an operator must revoke every grant first.

Expected Behavior

With force: true, REST should mirror gRPC DropRoleRequest(role_name="r134", force_drop=True): rootcoord drops the role and its privilege records in one operation, returns code: 0, and the role leaves roles/list. Without force, the 1100 "use REVOKE" error is correct and must be preserved. A supplied force key must not be silently discarded.

Steps To Reproduce

On the image above, authorization enabled:
1. `POST /v2/vectordb/roles/create {"roleName":"r134"}` -> `code: 0`.
2. `POST /v2/vectordb/roles/grant` granting `Search` and `Query` on collection `r134c` to `r134` -> `code: 0`.
3. `POST /v2/vectordb/roles/drop {"roleName":"r134"}` -> `code: 1100`.
4. Repeat with `{"roleName":"r134","force":true}` -> identical error; `force` is ignored.
5. `POST /v2/vectordb/roles/list` -> `r134` is still present.

Milvus Log

No response

Anything else?

No response

Activity

  1. added
    kind/bug
    needs-triage
    on Dec 2, 2026
  2. added
    triage/accepted
    and removed
    needs-triage
    on Dec 2, 2026
  3. added this to the 3.0.8 milestone on Dec 2, 2026
  4. removed their assignment
    on Dec 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

kind/bugtriage/accepted

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions