Good morning everyone.
I have a need to read File objects from a network share on a Windows
file server. Currently I connect using a properly written URI to
retrieve the File object, and it works. I will be instantiating a bean
(from a servlet) that does this communication, and the servlet will
dispatch a JSP. In the end, this web app will be running within Tomcat
5.0.
OK so where's the question? My current state does not allow for
configuring the authentication to the file server. Whatever Tomcat is
running as determines how it authenticates with the file server.
What I would like to do is be able to pass a username and password
(encrypted of course).
I know there are several tools (JAAS, JNDI) that in some way can be
used for this, but I haven't read much about it... and certainly
anything that clearly says this one works, this one doesn't...
Can anyone provide some guidance?
Thanks!
Chris Uppal - 11 Apr 2006 17:24 GMT
> I have a need to read File objects from a network share on a Windows
> file server.[...]
>
> OK so where's the question? My current state does not allow for
> configuring the authentication to the file server. Whatever Tomcat is
> running as determines how it authenticates with the file server.
jCIFS might help.
http://jcifs.samba.org/
E.g. read:
http://jcifs.samba.org/src/docs/faq.html#auth
SMB/CIFFS authentication appears to be something of a muddle, so be careful
that you understand what the authentication methods are (I don't ;-) and that
the method you are using satisfies your security requirements.
> I know there are several tools (JAAS, JNDI) that in some way can be
> used for this,
I don't think either of those are about authenticating your connection to an
existing (non-Java) application such as a Windows file server.
-- chris