Giter Site home page Giter Site logo

Comments (8)

SimFG avatar SimFG commented on September 15, 2024

@highvelcty I tried using your script and no errors were found. And the collection was created correctly
image

from milvus.

SimFG avatar SimFG commented on September 15, 2024

can you give me more information about the milvus and pymilvus version, and completed error message.

from milvus.

yanliang567 avatar yanliang567 commented on September 15, 2024

/assign @highvelcty
/unassign

from milvus.

highvelcty avatar highvelcty commented on September 15, 2024

Hi @yanliang567 ,

Thank you for looking into this with me.

I initialized my entire system and I was able to create a user specific collection without error. I wonder if there was something with the state of my machine that was causing the trouble.

However, I tried listing the created collections with a non-root user, but an empty list was returned.

These permissions have been provided to the role assigned to the user (see line 71 of create_user_collection.py):

    root_client.grant_privilege(role_name=USERROLE,
                                object_type='Global',
                                privilege='All',
                                object_name='*')
    root_client.grant_privilege(role_name=USERROLE,
                                object_type='Global',
                                privilege='CreateCollection',
                                object_name='CreateCollection')
    root_client.grant_privilege(role_name=USERROLE,
                                object_type='Global',
                                privilege='ShowCollections',
                                object_name='ShowCollections')

I updated this the create_user_collections.py script to print the collection listing via the non-root user client (see line 149).

# ./create_user_collection.py 
root client list collections: ['user_collection']
user1 list collections: []
#

The expectcation is that either the "Global/All/*" or the "Global/ShowCollections/ShowCollections" permissions should have allowed the non-root user to list collections.

from milvus.

highvelcty avatar highvelcty commented on September 15, 2024

I see the "user1 client list collections: []" output with the following version sets:

- Milvus version: 2.4.1
- SDK version: 2.4.1

- Milvus version: 2.4.1
- SDK version: 2.4.3

from milvus.

yanliang567 avatar yanliang567 commented on September 15, 2024

I tried to run the script above, and only update the milvus host with my deployment. it seems it returns the collections successfully, is that your expectation?
image
my milvus and sdk version:

  • Milvus version: 2.4.1
  • SDK version: 2.4.3

from milvus.

SimFG avatar SimFG commented on September 15, 2024

@highvelcty I have found the cause of the problem. A temporary solution is to grant this role the relevant permissions of a collection, for example:

root_client.grant_privilege(role_name=USERROLE,
                                object_type='Collection',
                                privilege='Insert',
                                object_name='*')

I will fix it in the next version

from milvus.

highvelcty avatar highvelcty commented on September 15, 2024

Great! Thank you @SimFG and @yanliang567!

from milvus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.