You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Coetmeur, Alain" <al...@caissedesdepots.fr> on 2001/11/06 16:11:08 UTC

a way to set proxy password for URL sources used in generators

I've tried the "news" and "yahoo" sample
and this does not work because
our firewall ask for proxy-authentication.

Is there anyway to set the proxy password ?

if none exists today, I get some idea
peeking into the code...

this is the "URLSource" class that
open the urlconnection
on which one should add some request property like
(http://www.javaworld.com/javaworld/javatips/jw-javatip42.html) :

String authString = "userid:password";
String auth = "Basic " + new sun.misc.BASE64Encoder
().encode(authString.getBytes());
URLConnection conn = url.openConnection();
conn.setRequestProperty("Proxy-Authorization", auth);

-the most brutal way could be to read a system propertie
and brutally add the proxyauthentication to all connection.
- a moderately brutal way could be to  set a cocoon-property
to set that...
- a nice way could be to add some
property to a "generator" item in the sitemap.
this would even allow different/no passwords for 
differents pipelines...


another point is to allow "base64" (beside cleartext) encoded
password to avoid trivial reading of the password
(few can decode base64 above my shoulders)

another configuration could be
to use the current "user" credential
to syhthetise the proxy auth ...

it seems feasible to me, but
I cannot do it myself
since I'm too young in cocoon to
play with knives and matches...

if somemone can comment, evaluate this idea
 and eventually forward it to the "peoples-who-know-how"


thanks in advance...

--
Alain Coetmeur

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>