Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: [privilege_group] There is no check of naming rules for privilege group name when creating it #37842

Closed
1 task done
binbinlv opened this issue Nov 20, 2024 · 4 comments
Assignees
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Milestone

Comments

@binbinlv
Copy link
Contributor

binbinlv commented Nov 20, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Environment

- Milvus version: master-20241119-b6612e02-amd64
- Deployment mode(standalone or cluster): both
- MQ type(rocksmq, pulsar or kafka):    all
- SDK version(e.g. pymilvus v2.0.0rc2): 2.5.0rc122
- OS(Ubuntu or CentOS): 
- CPU/Memory: 
- GPU: 
- Others:

Current Behavior

There is no check of naming rules for privilege group name when creating it

The name does not satisfy the naming rules of resourses could be created successfully for privilege group

resourse name naming rules: The name of a resource can contain numbers, letters, and underscores (). A resource name must start with a letter or an underscore ().

>>> milvus_client.create_privilege_group("%$")
>>>
>>>
>>> milvus_client.list_privilege_groups()
{'%$': []}

Expected Behavior

resourse name naming rules: The name of a resource can contain numbers, letters, and underscores (). A resource name must start with a letter or an underscore ().

report error if the name of privilege group does not satisfy the naming rules.

Steps To Reproduce

from pymilvus import MilvusClient
milvus_client = MilvusClient()
milvus_client.create_privilege_group("%$")
milvus_client.list_privilege_groups()

Milvus Log

No response

Anything else?

No response

@binbinlv binbinlv added kind/bug Issues or changes related a bug needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 20, 2024
@binbinlv
Copy link
Contributor Author

/assign @shaoting-huang

@sre-ci-robot
Copy link
Contributor

@binbinlv: GitHub didn't allow me to assign the following users: shaoting-huang.

Note that only milvus-io members, repo collaborators and people who have commented on this issue/PR can be assigned. Additionally, issues/PRs can only have 10 assignees at the same time.
For more information please see the contributor guide

In response to this:

/assign @shaoting-huang

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@binbinlv binbinlv added triage/accepted Indicates an issue or PR is ready to be actively worked on. and removed needs-triage Indicates an issue or PR lacks a `triage/foo` label and requires one. labels Nov 20, 2024
@yanliang567 yanliang567 added this to the 2.5.0 milestone Nov 21, 2024
@shaoting-huang
Copy link
Contributor

/assign

sre-ci-robot pushed a commit that referenced this issue Nov 21, 2024
issue: #37031
also fix issues: #37843,
#37842,
#37887

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
@yanliang567 yanliang567 removed their assignment Nov 22, 2024
@binbinlv
Copy link
Contributor Author

Verified and fixed:
pymilvus: 2.5.0rc126
milvus: master-20241122-bc131a91-amd64

result:

pymilvus.exceptions.MilvusException: <MilvusException: (code=802, message=the first character of a privilege group name must be an underscore or letter: invalid database name[database=%$])>

JsDove pushed a commit to JsDove/milvus that referenced this issue Nov 26, 2024
issue: milvus-io#37031
also fix issues: milvus-io#37843,
milvus-io#37842,
milvus-io#37887

Signed-off-by: shaoting-huang <shaoting.huang@zilliz.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Issues or changes related a bug triage/accepted Indicates an issue or PR is ready to be actively worked on.
Projects
None yet
Development

No branches or pull requests

4 participants