The Common Internet File System (CIFS) also known as Server Message Block (SMB) is a network protocol whose most common use is sharing files on a LAN. The protocol allows a client to access servers, files and printers on the LAN as though they were on the local machine.
Microsoft uses CIFS in all flavours of Windows to provide it's networking capabilities i.e. Shares, Network Neighbourhood. Unix/Linux also use CIFS via Samba and Apple has several clients and servers available, thus it's a fairly interopable protocol.
CIFS has a client and a server part. The server is probably more applicable to us as we could expose the repository as a CIFS server. This would theoretically mean that the repository would show up in the Network Neighbourhood and users would be able to map the repository as a normal Windows drive letter.
The client capabilities may also be useful as we could import content from an existing network share, for example.
There is an open source implementation of a CIFS client called jCIFS.
The client library provides programmatic access to CIFS servers allowing the following:
- Domains and workgroups
- Servers within a domain/workgroup
- Shares available on a server i.e. folders, printers
- Files and folders within a share
- File/Folder Manipulation (with appropriate authentication)
- Create files/folders
- Read/Write files
- Delete files/folders
- Test for existence
- Retrieve properties
In order to access network resources you obviously need to supply login credentials.
These are provided in the URL you use to access the resource, for example:
The credentials can also be provided via the "jcifs.smb.client.username" and "jcifs.smb.client.password" properties. In turn there are several ways these can be provided to the client i.e. from command line, properties file etc.
However, it doesn't appear that these can be transparently picked up from the local machine i.e. single sign-on. In order to do that we would need to run from within a browser. We could then make use of the NTLM authentication filter jCIFS provides to source the credentials via the browsers challenge/response mechanism (although this would probably be IE only).
- Will require knowledge of CIFS specification - 155 pages!
- Will require knowledge of NETBIOS
- JLAN code is obfuscated (or very badly written) so you can't even determine many class and method names let alone what the code is doing
- We could use JLAN or do our own but first impressions on writing one ourselves would be an extremely lengthy complex task