proxy authentication

37 views
Skip to first unread message

cedric....@gmail.com

unread,
Oct 29, 2008, 7:16:00 AM10/29/08
to JetS3t Users
Hello,
I'm trying to use synchronize.bat behind a proxy.
at first nothing was working (synchronize.bat nor cockpit.bat)
after changing the sets3t.properties with:
httpclient.proxy-autodetect=false
httpclient.proxy-host=proxyhttp
httpclient.proxy-port=8080

Cockpit is asking me my domain, userName and proxy password and all
then work fine.

However synchronize.bat si still failing with the following logs:

:synchronize.bat DOWN perriotbucket c:\test --noaction
INFO [org.jets3t.service.impl.rest.httpclient.RestS3Service] Using
Proxy: proxyhttp:8080
DOWN [No Action] S3[perriotbucket] => Local[c:\test]
INFO [org.apache.commons.httpclient.auth.AuthChallengeProcessor] ntlm
authentication scheme selected
WARN [org.jets3t.service.impl.rest.httpclient.RestS3Service] Response
'/' - Unexpected response code 407, expected 200
Exception in thread "main" org.jets3t.service.S3ServiceException: S3
GET connection failed for '/'
at
org.jets3t.service.impl.rest.httpclient.RestS3Service.performRequest(RestS3Service.java:
523)
at
org.jets3t.service.impl.rest.httpclient.RestS3Service.performRestGet(RestS3Service.java:
686)
at
org.jets3t.service.impl.rest.httpclient.RestS3Service.listAllBucketsImpl(RestS3Service.java:
1030)
at org.jets3t.service.S3Service.listAllBuckets(S3Service.java:
1241)
at org.jets3t.service.S3Service.getBucket(S3Service.java:1410)
at
org.jets3t.apps.synchronize.Synchronize.run(Synchronize.java:806)
at
org.jets3t.apps.synchronize.Synchronize.main(Synchronize.java:1292)
Caused by: java.io.IOException: Stream closed
at java.io.BufferedInputStream.getBufIfOpen(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at
org.apache.commons.httpclient.ContentLengthInputStream.read(ContentLengthInputStream.java:
170)
at java.io.FilterInputStream.read(Unknown Source)
at
org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:
108)
at java.io.FilterInputStream.read(Unknown Source)
at
org.apache.commons.httpclient.AutoCloseInputStream.read(AutoCloseInputStream.java:
127)
at
org.apache.commons.httpclient.HttpMethodBase.getResponseBody(HttpMethodBase.java:
690)
at
org.jets3t.service.impl.rest.httpclient.RestS3Service.performRequest(RestS3Service.java:
469)
... 6 more
MWC33410:cperriot:
C:\jets3t-0.6.1\bin>


I was expecting synchronize.bat to ask me for my login/pass for the
proxy or to find some properties to set in the config file but I've
been unable to figure out where I should give the info to the
application.

Any help would be appreciated.
Thank you.

James Murty

unread,
Oct 29, 2008, 8:07:24 AM10/29/08
to jets3t...@googlegroups.com
Hi Cedric,

Unfortunately, unlike Cockpit, Synchronize doesn't have the smarts to prompt for the proxy login credentials. The latest version of the JetS3t codebase available via CVS includes the following extra HTTP proxy settings in jets3t.properties:

httpclient.proxy-user
httpclient.proxy-password
httpclient.proxy-domain

If you are familiar with the CVS source code control system and ANT build tool, you could check out and build this version to see if the extra settings fix your issue. Let me know if you're unable to build the latest code version and I can make a pre-built package available for you.

Cheers,
James

---
http://www.jamesmurty.com

James Murty

unread,
Oct 29, 2008, 8:27:56 AM10/29/08
to jets3t...@googlegroups.com
I have made a packaged version of the latest code available here:
http://s3.jamesmurty.com.s3.amazonaws.com/jets3t-0.6.2-alpha1.zip

This code hasn't necessarily been fully tested so take care, but it has improved support for HTTP proxy authentication.

James

---
http://www.jamesmurty.com

Cedric Perriot

unread,
Oct 29, 2008, 9:37:18 AM10/29/08
to JetS3t Users
thanks for the package :)
It's working like a charm.

By the way i was wondering if there is a roadmap somewhere for
JetS3t ?
When a final 0.6.2 is planned to be released ?

Thanks anyway.

On 29 oct, 13:27, "James Murty" <ja...@misterm.org> wrote:
> I have made a packaged version of the latest code available here:http://s3.jamesmurty.com.s3.amazonaws.com/jets3t-0.6.2-alpha1.zip
>
> This code hasn't necessarily been fully tested so take care, but it has
> improved support for HTTP proxy authentication.
>
> James
>
> ---http://www.jamesmurty.com
>
> On Wed, Oct 29, 2008 at 11:07 PM, James Murty <ja...@misterm.org> wrote:
> > Hi Cedric,
>
> > Unfortunately, unlike Cockpit, Synchronize doesn't have the smarts to
> > prompt for the proxy login credentials. The latest version of the JetS3t
> > codebase available via CVS includes the following extra HTTP proxy settings
> > in jets3t.properties:
>
> > httpclient.proxy-user
> > httpclient.proxy-password
> > httpclient.proxy-domain
>
> > If you are familiar with the CVS source code control system and ANT build
> > tool, you could check out and build this version to see if the extra
> > settings fix your issue. Let me know if you're unable to build the latest
> > code version and I can make a pre-built package available for you.
>
> > Cheers,
> > James
>
> > ---
> >http://www.jamesmurty.com
>

James Murty

unread,
Oct 29, 2008, 7:27:23 PM10/29/08
to jets3t...@googlegroups.com
I'm glad to hear the new proxy settings are working for you.

There isn't a road map for JetS3t but I expect to release the next official version before the end of the year, after Amazon has released the planned new S3-related distribution service which will be supported.

In the meantime, the alpha version of 0.6.2 I packaged up should be pretty stable because it has few changes from the 0.6.1 release beyond the improved proxy support.

Laxmilal Menaria

unread,
Oct 30, 2008, 5:58:35 AM10/30/08
to JetS3t Users
Thanks for update the proxy authentication details in properties file,
But I think proxy authentication password should be encrypted form. So
no one read it easily.


James Murty

unread,
Oct 30, 2008, 6:36:40 AM10/30/08
to jets3t...@googlegroups.com
I'm not sure if it is worthwhile encrypting the proxy password in the properties file, because although it would be more difficult to read directly, it would be trivial for someone to see how it was decrypted by the JetS3t library and overcome the slight security measure.

The best long-term solution may be for Synchronize to prompt for the proxy credentials if it needs them. That way, instead of entering the credentials in the properties file you would type them in manually when prompted by the application. The latest version of Synchronize can already prompt for AWS credentials on demand, so I will look into adding the same capability for the proxy credentials.

---
http://www.jamesmurty.com

Laxmilal Menaria

unread,
Oct 31, 2008, 5:41:10 AM10/31/08
to JetS3t Users
Ok..thanks.

Thats fine.

Cedric Perriot

unread,
Oct 31, 2008, 5:52:43 AM10/31/08
to JetS3t Users
As long as it is a capability and not mandatory I think it is fine
because in case of an automatic tak we do not want to be prompted.
Then I consider that a config file can have a secret key, it is like a
pgp secret key that is stored in a clear txt file. In any encryption
system you will always have a weak point.


On Oct 30, 11:36 am, "James Murty" <ja...@misterm.org> wrote:
> I'm not sure if it is worthwhile encrypting the proxy password in the
> properties file, because although it would be more difficult to read
> directly, it would be trivial for someone to see how it was decrypted by the
> JetS3t library and overcome the slight security measure.
>
> The best long-term solution may be for Synchronize to prompt for the proxy
> credentials if it needs them. That way, instead of entering the credentials
> in the properties file you would type them in manually when prompted by the
> application. The latest version of Synchronize can already prompt for AWS
> credentials on demand, so I will look into adding the same capability for
> the proxy credentials.
>
> ---http://www.jamesmurty.com
>
> On Thu, Oct 30, 2008 at 8:58 PM, Laxmilal Menaria <menarialaxmi...@gmail.com

James Murty

unread,
Dec 29, 2008, 10:52:10 PM12/29/08
to jets3t...@googlegroups.com
I have just updated the latest code to make Synchronize prompt for HTTP Proxy authentication credentials on the command line if they are required, when they have not already been provided in the jets3t.properties file.

If anyone is able to check out the latest code and confirm that it works as expected with your proxy, that would be a great help.

Thanks,
James

Cedric Perriot

unread,
Jan 2, 2009, 3:41:01 AM1/2/09
to JetS3t Users
Do you have a nightly build somewhere ?
At work I cannot easily get the application through CVS and the proxy
to test your development is at work :(
thanks

On Dec 30 2008, 4:52 am, "James Murty" <jamu...@gmail.com> wrote:
> I have just updated the latest code to make Synchronize prompt for HTTP
> Proxy authentication credentials on the command line if they are required,
> when they have not already been provided in the jets3t.properties file.
>
> If anyone is able to check out the latest code and confirm that it works as
> expected with your proxy, that would be a great help.
>
> Thanks,
> James
>

James Murty

unread,
Jan 2, 2009, 8:50:57 PM1/2/09
to jets3t...@googlegroups.com
I don't have a nightly build process, but I've just made the latest code package available here:
http://s3.jamesmurty.com/jets3t-0.6.2-beta.zip

Be warned, this package includes some new S3 features (eg. Requester Pays bucket support) that aren't quite fully baked, but everything should work well enough to test the proxy authentication.

James

James Murty

unread,
Jan 3, 2009, 2:01:57 AM1/3/09
to jets3t...@googlegroups.com
A newer, improved beta is now available here:
http://s3.jamesmurty.com/jets3t-0.7.0-beta1.zip

This is a beta for version 0.7.0, a designation I will use for the next public release (instead of 0.6.2). The Requester Pays functionality should work properly in this beta, both in the toolkit API and in Cockpit (check the Bucket Actions menu).

Cheers,
James
Reply all
Reply to author
Forward
0 new messages