You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Douglas Jose <do...@gmail.com> on 2010/10/10 18:46:41 UTC
Digest authentication support patch
Hello,
I have extended Jackrabbit to allow HTTP digest authentication through WebDAV, as Windows 7 can't connect to a WebDAV repository using basic authentication. I would like to contribute to the project with this feature.
The implementation is based on Tomcat's source code (I have used it as a reference to implement the same authentication handling in Jackrabbit). I hope that's not a problem.
In order to enable the digest authentication, you need to:
- Change the WebDAV servlet from 'org.apache.jackrabbit.j2ee.SimpleWebdavServlet' to 'org.apache.jackrabbit.j2ee.DigestWebdavServlet' in the web.xml file;
- Change the LoginModule to 'org.apache.jackrabbit.core.security.simple.DigestLoginModule' in the repository.xml file
- Add the parameter 'passwordsFile' to the DigestLoginModule with the path of the passwords file.
- Add to the passwords file created above the user id and the password digest. The utility DigestPasswordUtil in the jackrabbit-jcr-commons project can be used to generate the entry to be appended to the passwords file.
java -cp target/jackrabbit-jcr-commons-2.2-SNAPSHOT.jar org.apache.jackrabbit.util.DigestPasswordUtil user realm password
The DigestLoginModule configuration is optional, I believe the DigestWebdavServlet should work normally with the SimpleLoginModule which accepts any credentials.
Kindly,
Douglas
Re: Digest authentication support patch
Posted by Marcel Reutegger <ma...@day.com>.
Hi Douglas,
could you please create a JIRA issue for this enhancement request?
that will make it easier to track.
regards
marcel
On Sun, Oct 10, 2010 at 18:46, Douglas Jose <do...@gmail.com> wrote:
> Hello,
>
> I have extended Jackrabbit to allow HTTP digest authentication through WebDAV, as Windows 7 can't connect to a WebDAV repository using basic authentication. I would like to contribute to the project with this feature.
> The implementation is based on Tomcat's source code (I have used it as a reference to implement the same authentication handling in Jackrabbit). I hope that's not a problem.
>
> In order to enable the digest authentication, you need to:
>
> - Change the WebDAV servlet from 'org.apache.jackrabbit.j2ee.SimpleWebdavServlet' to 'org.apache.jackrabbit.j2ee.DigestWebdavServlet' in the web.xml file;
> - Change the LoginModule to 'org.apache.jackrabbit.core.security.simple.DigestLoginModule' in the repository.xml file
> - Add the parameter 'passwordsFile' to the DigestLoginModule with the path of the passwords file.
> - Add to the passwords file created above the user id and the password digest. The utility DigestPasswordUtil in the jackrabbit-jcr-commons project can be used to generate the entry to be appended to the passwords file.
>
> java -cp target/jackrabbit-jcr-commons-2.2-SNAPSHOT.jar org.apache.jackrabbit.util.DigestPasswordUtil user realm password
>
> The DigestLoginModule configuration is optional, I believe the DigestWebdavServlet should work normally with the SimpleLoginModule which accepts any credentials.
>
> Kindly,
>
> Douglas
>
>