docs/design_docs/20260601-rbac-user-description.md
Milvus RBAC users can carry an optional human-readable description. The field is accepted on user creation, returned by user read APIs, and can be edited through the existing credential update API without requiring a password change.
GitHub Issue: https://github.com/milvus-io/milvus/issues/50179
RBAC users are currently identified only by username and role bindings. Operators need a lightweight place to record who owns a user, what integration it belongs to, or why it exists. The description must be editable without rotating the password, and password rotation must not erase the description.
UpdateCredential.PrivilegeUpdateUser can
update a description without knowing the target user's password.UserInfo.The milvus-proto dependency adds optional description fields to the existing credential requests and user read result:
message CreateCredentialRequest {
optional string description = 6;
}
message UpdateCredentialRequest {
optional string description = 7;
}
message UserResult {
UserEntity user = 1;
repeated RoleEntity roles = 2;
string description = 3;
}
Milvus internal credential messages add the same optional field so the WAL body can distinguish "field not provided" from "set description to empty string":
message CredentialInfo {
string username = 1;
string encrypted_password = 2;
string sha256_password = 5;
uint64 time_tick = 6;
optional string description = 7;
}
proxy.maxUserDescriptionLength limits the byte length of the description. The
default is 1024 bytes.
CredentialInfo with description to RootCoord.new_password is provided.description, the existing description is preserved.new_password is absent.CredentialInfo with description and no password fields.Catalog.getUserResult loads the credential before the role-info early return
and copies Credential.Description into UserResult.Description. This makes
both include_role_info=true and include_role_info=false return the field.
model.Credential stores Description in the same JSON payload as the encrypted
password and timetick. Sha256Password remains cache-only and is not persisted
by the RootCoord merge path.
Proxy enforces the description length before the request reaches RootCoord, so an oversized description is rejected before it can increase the etcd credential value. RootCoord keeps the existing credential validation shape and does not duplicate proxy-side username, password, or description length checks.
HTTP v2 user create and update requests pass the optional description through to the same gRPC credential APIs. HTTP v2 user describe preserves the existing role list response and includes the description in the response object.
The description field is optional. Existing credential records unmarshal with an empty description. Existing clients that do not send descriptions continue to create and update credentials as before.
This Milvus PR temporarily uses a git-based replace for the milvus-proto
branch that defines the API fields. During coordinated landing, the replace is
removed and the dependency is switched to the upstream milvus-proto version that
contains those fields.
No deprecation or data migration is required.
UpdateCredential API already owns credential metadata updates and can model
password and description as independently optional fields.