mathworks / matlab-proxy

Python® package enables you to open a MATLAB® desktop in a web browser tab.
Other
43 stars 23 forks source link

Possible configuration dir conflict in multi-host environment (NFS-mounted home directories) #27

Closed kcgthb closed 9 months ago

kcgthb commented 10 months ago

Summary

Hi!

The configuration directory is created in$HOME/.matlab/MWI as ports/<port_number>.

$ ls -1 ~/.matlab/MWI/ports/
21119
25505
33378
36544
40531
55927
57936
8887
8888

But there's no distinction per host, and this could result in potential conflicts in multi-host environments, where $HOME directories are NFS-mounted on multiple hosts for instance. In that case, a server running on host1:8888 and another one running on host2:8888 will collide as they'll both want to store their session information in the same ~/.matlab/MWI/ports/8888 directory.

A more robust way would probably to store information about the server hostname in the path. Like:

$HOME/.matlab/MWI/hosts/<hostname>/ports/<port_number>

Browser(s) used

No response

Script output

No response

prabhakk-mw commented 9 months ago

@kcgthb v0.10.0 of matlab-proxy has updated itself to include your suggestion. However, please note that in this version we have decided to require users to login again then they switch hosts. ie: Cached login information will not be utilised across hostnames.

Please let us know if this update resolves your concern! Thank you for using matlab-proxy 😃

kcgthb commented 9 months ago

Hi @prabhakk-mw Thanks for implementing the suggestion!