naurril / SUSTechPOINTS

3D Point Cloud Annotation Platform for Autonomous Driving
GNU General Public License v3.0
851 stars 218 forks source link

CHANGELOG request | User management #218

Open ainayves opened 2 months ago

ainayves commented 2 months ago

Hello @naurril ,

  1. This is not a problem, but a request : would it be possible to get a CHANGELOG of your program so we can track new features and bug fixes?

  2. Does your tool support multiple users? For example, if we have two users and two data folders, A and B, user 1 works on folder A and user 2 on folder B. User 1 should not be able to access folder B and vice versa.

Great tool by the way :)

Sincerely.

ainayves commented 2 months ago

Hello @naurril , do you have news about this ? Thank you in advance.

naurril commented 2 months ago

Hi, for the 2nd problem you can use fusion branch, but there is no UI for user management, the admin should generate tokens for each user and set accessible folders for them (in config files: conf/user.conf, conf/auth.conf). each user connect the server with their own token like https://xxxxx?token=yyyyyyyy

ainayves commented 2 months ago

Hi , Thank you for your response ,

What condition should the generated tokens follow ? (in terms of length , etc...)

ainayves commented 2 months ago

Is there a doc about how to use the user management ? how should I modify the .conf files , etc...

naurril commented 2 months ago

Hi , Thank you for your response ,

What condition should the generated tokens follow ? (in terms of length , etc...)

any token is ok, and there is a script 'gentoken.py' you can use it.

naurril commented 2 months ago

Hi , Thank you for your response , What condition should the generated tokens follow ? (in terms of length , etc...)

any token is ok, and there is a script 'gentoken.py' you can use it.

user.conf


[guest]
scenes: test 
readonly: yes

[proj01]
scenes: 2024.*    # regular expression to specify folders/scenes
readonly: no        # 

[user02]
scenes: xxxxxx
readonly: no

auth.conf

[global]
auth: no
method: token

[token]
secret: xxxx   #  secret for gentoken script

[password]
key: xxxx   

[tokens]
tokenxxxx: proj01     # token: user
tokenyyyy: user02
...
ainayves commented 1 week ago

Hello again @naurril

This is my auth.conf :

auth: no
method: token

[token]
secret: secretmdp #  secret for gentoken script

[password]
key: secretpasw #  secret for gentoken script

[tokens]
eyJhbGciOiJIUzI1NiIsInR5cCI6Ikpxxxxxxxxx: aina     
eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVxxxxxx: yves

user.conf

[aina]
scenes: ISA_1_aina
readonly: no        

[yves]
scenes: ISA_2_yves
readonly: no

And, one user can always access the others scenes , even if I use tokens image

What did I do wrong ?

Thank you

naurril commented 6 days ago

auth: yes

ainayves commented 6 days ago

Thanks @naurril ,

Now I am getting this error :

   self.context.load_cert_chain(certificate, private_key)
FileNotFoundError: [Errno 2] No such file or directory

[16/Oct/2024:09:32:55] ENGINE Shutting down due to error in start listener:
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.10/site-packages/cherrypy/process/wspbus.py", line 267, in start
    self.publish('start')
  File "/home/user/.local/lib/python3.10/site-packages/cherrypy/process/wspbus.py", line 247, in publish
    raise exc
cherrypy.process.wspbus.ChannelFailures: FileNotFoundError(2, 'No such file or directory')

What if I don' t wanna use https ?

naurril commented 6 days ago

try comment out this block https://github.com/naurril/SUSTechPOINTS/blob/1b2769ead41a3bcec1b1d0811da5d1c8b4f5f5d8/main.py#L469C1-L474C5

if authcfg['global']['auth'] == 'yes':
  cherrypy.config.update({
    'server.ssl_module': 'builtin',
    'server.ssl_certificate': './conf/cert/cert.crt',
    'server.ssl_private_key': './conf/cert/cert.key',
  })
ainayves commented 6 days ago

The user management is working now but I get an error on the frontend console :

image

It appears when I click on a scene.

what can be the source of this error ?

naurril commented 5 days ago

there is a bug here, change 2 to 3 https://github.com/naurril/SUSTechPOINTS/blob/1b2769ead41a3bcec1b1d0811da5d1c8b4f5f5d8/main.py#L117

ainayves commented 5 days ago

same error

image

ainayves commented 5 days ago

Oh sorry , it is working now , I just deleted some Cache, thank you very much

ainayves commented 5 days ago

One more thing , so there is no UI yet for user management ?

naurril commented 4 days ago

No

ainayves commented 4 days ago

Ok , Thank you very much