I was considering to implement access to smb for the Galaxy project where we use fsspec a lot. Galaxy is a multi user environment where we would safely store the information needed to access a smb share (server, port, username, password, path ...). Then we connect via fsspec.implementations.smb.SMBFileSystem.
By chance I noticed that the underlying smbprotocol uses a connection cache which is shared between all connections in a python process. The cache seems to work on server + port as key (maybe username .. but I'm unsure). Hence to me it seems unsafe to use this in a multi user environment, since users might hijack other users sessions (involuntary or deliberately) since they only need to know the server+port+username.
Would you agree with this? Are there possibilities to fix this, e.g. by disabling the global connection cache (one can pass a dict that would be used) as outlined here. Are there maybe other fsspec implementations using different libraries?
Edit: Meanwhile I found the tests and verified my theory (I think) #2007
I was considering to implement access to smb for the Galaxy project where we use fsspec a lot. Galaxy is a multi user environment where we would safely store the information needed to access a smb share (server, port, username, password, path ...). Then we connect via
fsspec.implementations.smb.SMBFileSystem.By chance I noticed that the underlying
smbprotocoluses a connection cache which is shared between all connections in a python process. The cache seems to work on server + port as key (maybe username .. but I'm unsure). Hence to me it seems unsafe to use this in a multi user environment, since users might hijack other users sessions (involuntary or deliberately) since they only need to know the server+port+username.Would you agree with this? Are there possibilities to fix this, e.g. by disabling the global connection cache (one can pass a dict that would be used) as outlined here. Are there maybe other fsspec implementations using different libraries?
Edit: Meanwhile I found the tests and verified my theory (I think) #2007