views:

38

answers:

1

Hi,

I'd like to use the URL fetch service for app engine (java). I'm just sending a POST to one of my own servers from a servlet.

AppEngine -> post-to: https://www.myotherserver.com/scripts/log.php

I'm reading the url fetch doc:

Secure Connections and HTTPS
An app can fetch a URL with the HTTPS method to connect to secure servers. Request and response data are transmitted over the network in encrypted form.

The proxy the URL Fetch service uses cannot authenticate the host it is contacting. Because there is no certificate trust chain, the proxy accepts all certificates, including self-signed certificates. The proxy server cannot detect "man in the middle" attacks between App Engine and the remote host when using HTTPS.

I don't understand - the first paragraph makesit sound like everything that goes from the servlet on app engine, to my php script is going to be secure if I use https. The second paragraph makes it sound like the opposite, that it won't actually be secure. Which is it?

Thanks

+2  A: 

There are two things HTTPS does for you. One is to encrypt your data so that as it travels over the internet, through various routers and switches, no one can peek at it. The second thing HTTPS does is authenticate that you are actually talking to a certain server. This is the part App Engine can't do. If you were trying to connect to www.myotherserver.com, it is possible that some bad guy named bob could intercept your connection, and pretend to be www.myotherserver.com. Everything you sent to bob would be encrypted on it's way to bob, but bob himself would be able to get the unencrypted data.

In your case, it sounds like you control both the sending server and the destination server, so you could encrypt your data with a shared secret to protect against this possibility.

Peter Recore
Ok that makes sense, but then isn't using https with url fetch + app engine almost pointless then? (Just curious why they might even offer it at all). So I see what you're saying, I just encrypt the strings I want to send myself, then I can decrypt them on the php side where they're received, since I control both endpoints. Thanks.
Even with the limitations on authentication, https is still "more" secure than http. It is harder to do a man in the middle attack than it is to do simple sniffing, for example. Also, some services might only be available via https.
Peter Recore
Everyone knows Eve is the bad guy, not Bob! ;)
Nick Johnson
That's just what "Bad Boy Bob" wants you to think...
Peter Recore