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

CHANGELOG request | User management #218

Open
ainayves opened this issue Aug 1, 2024 · 17 comments
Open

CHANGELOG request | User management #218

ainayves opened this issue Aug 1, 2024 · 17 comments

Comments

@ainayves
Copy link

ainayves commented Aug 1, 2024

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
Copy link
Author

ainayves commented Aug 8, 2024

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

@naurril
Copy link
Owner

naurril commented Aug 8, 2024

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
Copy link
Author

ainayves commented Aug 9, 2024

Hi , Thank you for your response ,

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

@ainayves
Copy link
Author

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

@naurril
Copy link
Owner

naurril commented Aug 19, 2024

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
Copy link
Owner

naurril commented Aug 19, 2024

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
Copy link
Author

ainayves commented Oct 15, 2024

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
Copy link
Owner

naurril commented Oct 16, 2024

auth: yes

@ainayves
Copy link
Author

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
Copy link
Owner

naurril commented Oct 16, 2024

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
Copy link
Author

ainayves commented Oct 16, 2024

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
Copy link
Owner

naurril commented Oct 17, 2024

there is a bug here, change 2 to 3

scene = url.split("/")[2]

@ainayves
Copy link
Author

ainayves commented Oct 17, 2024

same error

image

@ainayves
Copy link
Author

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

@ainayves
Copy link
Author

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

@naurril
Copy link
Owner

naurril commented Oct 17, 2024

No

@ainayves
Copy link
Author

ainayves commented Oct 18, 2024

Ok , Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants