|Summary:||add DIGEST authentication support to Ant tasks|
|Product:||Tomcat 6||Reporter:||Marcus Better <marcus>|
|Component:||Catalina||Assignee:||Tomcat Developers Mailing List <dev>|
Description Marcus Better 2008-09-18 05:17:41 UTC
It would be useful if the Catalina Ant tasks supported HTTP Digest authentication, in addition to Basic authentication. This is convenient if one already has a digest-based security realm and doesn't want to maintain an extra tomcat-users.xml file. (And Basic authentication is terribly insecure.) Currently the AbstractCatalinaTask  just performs Basic authentication: // Set up an authorization header with our credentials String input = username + ":" + password; String output = new String(Base64.encode(input.getBytes())); hconn.setRequestProperty("Authorization", "Basic " + output);  http://svn.apache.org/repos/asf/tomcat/tc6.0.x/trunk/java/org/apache/catalina/ant/AbstractCatalinaTask.java
Comment 1 Mark Thomas 2008-09-18 06:06:37 UTC
Patches are always welcome.
Comment 2 Marcus Better 2008-09-18 06:35:33 UTC
(In reply to comment #1) > Patches are always welcome. Is it ok to use something like commons-httpclient that does Digest auth?
Comment 3 Mark Thomas 2008-09-18 06:46:57 UTC
Personally, I'd rather not add a dependency just for that.
Comment 4 Mark Thomas 2017-05-30 11:48:53 UTC
There turned out to be a very simple solution that didn't require an external library using java.net.Authenticator. Fixed in: - trunk for 9.0.0.M22 onwards - 8.5.x for 8.5.16 onwards - 8.0.x for 8.0.45 onwards - 7.0.x for 7.0.78 onwards