Steven Erat's Blog
 
 
Viewing By Entry
 
 

TalkingTree  ColdFusion Protocol Tags CFHTTP, CFINVOKE, CFLDAP support SSLv2

 

My reply to a comment to an earlier blog entry about importing SSL certificates into ColdFusion cacerts file for CFHTTP purposes warrants its own blog entry here as a separate topic.

The comment:

<cfhttp url="https://httpmailbox1.beta.etrac.net/submit-to-etra... method="post" port="xxx" proxyserver="xxxx" proxyport="xxx" >

I am having the same problem but I am using BlueDragon and CFMX. I am trying to connect to vendor using CFHTTP to send a XML file. The vendor keeps telling me that I am faliing the SSL handshake on his side. I was told by him that I needed to purchase a certificate form a trusted third party which we did (Verisign). This certificate was installed by my server team but I am refused connection at the vendor.

Do I need to export the vendors certificate and install it on my WebLogic server using the Keytool.

It sounds as if the vendor is requiring SSLv3 with client authentication, rather than SSLv2 with only server authentication. The documentation here describes the conditions where you may have to import a certificate into ColdFusion for SSLv2 for server authentication, but this is often confused with the requirement for client auth:

To use HTTPS with the cfhttp tag, you might need to manually import the certificate for each web server into the keystore for the JRE that ColdFusion uses. This procedure should not be necessary if the certificate is signed (issued) by an authority that the JSSE (Java Secure Sockets Extension) recognizes (for example, Verisign); that is, if the signing authority is in the cacerts already. However, you might need to use the procedure if you are issuing SSL (secure sockets layer) certificates yourself.

Lets back up a moment to consider the practical difference between SSLv2 and v3. First, imagine a simple HTTPS connection between a browser and server. A user at a browser types in the URL of a website beginning with https:// and the brower makes the request. Lets assume that the server is using SSLv2. The request gets to the server and the server replies with a message header stating it supports SSLv2 and sends its certificate. The browser receives the SSL certificate, inspects it, and negotiates a session key to be used for the remainder of the request/repsonse communication. This negotiation period is known as the SSL handshake.

This handshake or session key negotiation is done with asymmetric key cryptography, and when a session key is agreed on by the browser and the client they switch to symmetric key cryptography. All this fuss to negotiate a session key is because symmetric key cryptography is much faster than asymmetric.

Anyway, the SSLv2 handshake does not require that the browser send its own certificate back to the server. In SSLv2 only the server has to prove its identity to the client.

However, in SSLv3 not only does the server have to prove its identity to the client, but the client (the browser in this case) also has to identify itself to to the server. The browser does that by sending its own certificate in return. So there are two certifcates involved in SSLv3, one on the server and one on the client.

In the case of a CFHTTP connection, the client is ColdFusion and the server is the target url such as https://httpmailbox1.... So if the vendor says that you need to send a certificate then the vendor is indirectly telling you that they support SSLv3 rather than SSLv2.

This conclusion is bad news unfortunately. ColdFusion MX 7 does not yet support SSLv3 with client authentication for its protocol tags such as CFHTTP, CFINVOKE, CFLDAP, etc.

Importing your new Verisign certificate into ColdFusion's cacerts file will do nothing for your problem. The cacerts file under ColdFusion is which Certificate Authorities ColdFusion will trust for the other end of the CFHTTP connection such as the scenario above for SSLv2. In order to support SSLv3 client authentication ColdFusion would have to perform an HTTP Request, get the HTTP Reply from the SSL website including the other end's SSL certificate, and then ColdFusion would have to send its own certificate back to the other server to say "Hey, I'm such and such ColdFusion server here, really I am". But ColdFusion does not yet do that.

You may need to seek a third party solution, perhaps a Java custom extension that did SSLv3 and HTTP for you, and you could integrate that into your ColdFusion application.

This problem is hinted at in a ColdFusion Technote on Configuring Secure SSL Connection with LDAP Directory Server:

Also, cfldap does not support SSL V3 client authentication (user certificate authentication) in ColdFusion MX, as it did in ColdFusion 5. It only supports SSL V2 (basic username/password authentication over SSL).

 


Comments

Hey Steve,

I've never done it for SSL sites, but I wonder if you could use Apache as a proxy server to get at your intended destination. I've used mod_proxy and the ProxyPass command to forward requests to back end services that (for example) reside behind a firewall. Looking at the docs, it looks like you can use some combination of mod_proxy and mod_ssl (which appears to support SSLv3) to proxy requests to an SSL host...

http://httpd.apache.org/docs/2.0/mod/mod_proxy.htm...
http://httpd.apache.org/docs/2.0/mod/mod_ssl.html

Once configured, you would use CFHTTP to make a (non-ssl) call to your local Apache instance which would then act as the "client" in talking to the remote SSL site. I'm not familiar with IIS, so I'm not sure if it has the same capabilities. I would imagine a hardware proxy could be configured similarly...

- Bernie


Hey Steve, have you heard of anyone who has implemented this SSLv3 within a ColdFusion infrastructure using some sort of Java extension? I have a requirement at work and I'm using this post as a reference for the inability to do what a service provider is asking of our client. Thanks, Phil


This has been fixed for ColdFusion 8, Scorpio.


Clarification, this is fixed for CFHTTP and SSLv3... Cannot confirm CFLDAP and other protocol tags..

[via Sarge]


I just ran into this problem after renewing an SSL key. I tried using this http://www.innovation.ch/java/HTTPClient/
within my CF code, but got the same error
Connection Failure: Status code unavailable The error occurred on line 1.

After reading through a SUN forum, I got the hint to try upgrading the JVM CF is using from j2sdk1.4.2_11 to j2sdk1.4.2_15 on our development server and it fixed the problem for both CFHTTP and the HTTPClient API.

I'm a little afraid to put this into production and I am checking if other people have had experience(good and bad) using j2sdk1.4.2_15 and we will have to test our dev sites too. Hope this helps some people.

Carlos,
Senior Web Developer / MySQL Admin


We're trying to do Client Auth through CF MX7 as well, but we're trying to do it as Phil Duba mentioned through Java objects inside of CF. We're still working our way through trying to get it working but I was jsut wondering if anyone else had done this before too to prove it works or not. We're getting stuck on trying to load the keystore into an application at runtime currently so we don't have to set it for all of CF.


In the post it is mentioned that a 3rd party solution may be needed to connect CF7 to a v3 server. However I haven't found one out there. Does anyone know where there might be a free or even pay solution so a CF7 app can authenticate a user against a v3 ldap server?

Thanks
Greg


 

 

Calendar

 
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

Search This Site

 
This is an exact search only

About This Site

 
I live west of Boston and used to work at Adobe with ColdFusion and Flex, specializing in Unix & Linux. I recently graduated from CDIA in Pro Digital Photography. Curious about my banner image?

More about me

Recent Entries

 
Christmas Eve Service makes F..
How To Filter by File Type in..
Perspective on ColdFusion's B..
Power Mac G5: The lights are ..
My Application to CDIABU in R..

Recent Comments

 
Posted By Yvonne:
Clear video taken! I was looking for such a video through Google & it led me to yours. Wanted to show to my students through a video clip, the whol ...

Posted By Andy Allan:
Fantastic work Steve.

Posted By charlie arehart:
Oh wow, awesome to hear that the relative quiet was an imposed one, and that the gag order has been lifted. Now I'm really excited to hear what may co ...

recently played

 
Snap Judgments
by WNYC, New York Public Radio
on On The Media
On The Media, WNYC, New York Public Radio

now playing, a plug-in for itunes

Categories

 
RSS Adobe (31)
RSS Bicycling (9)
RSS Blogging (37)
RSS Books (13)
RSS Breeze (12)
RSS CFMX Podcasts (10)
RSS ColdFusion (420)
RSS Computer Technology (50)
RSS Events (25)
RSS Flash (3)
RSS Flex (18)
RSS Gadgets (10)
RSS HiTech Industry (16)
RSS Java (25)
RSS Learning (57)
RSS Linux (70)
RSS Mac OS X (22)
RSS Macromedia (28)
RSS Meetup (34)
RSS New England (62)
RSS Odds & Ends (25)
RSS Outdoors (32)
RSS Personal (29)
RSS Photography (109)
RSS Photoshop (29)
RSS Podcasts (18)
RSS Rants (19)
RSS Restaurants (8)
RSS Science (34)
RSS Spain (16)
RSS Travel (42)
RSS Video (20)
RSS Webcam (3)
RSS Writing (10)

Blogs I Read

 
Scrum Sucks
Ben Forta
Ray Camden
Kinky Solutions
Gary Gilbert
Red Hat Blogs
O'Reilly Digital Media
O'Reilly Radar
John Nack
The Strobist
Scott Kelby
Matt Kloskowski
Joe McNally
Digital Photography School
Engadget
Science Blog

RSS

 


Add to Google
Add to My Yahoo!

Aggregated By

 


Consumed By Feed-Squirrel.com
Aggregated by ColdFusionBlogger.org

Credits and Stuff

 
BlogCFC - Free ColdFusion Powered Blog Software
CJM Group - ColdFusion Website Hosting


 
 
blog | photos | flickr | referers | webcam | stats | about | contact
 
Copyright © 2009 Steven Erat. All rights reserved.
This is a personal weblog. The opinions expressed here represent my own and not those of my employer