Re: Need for encryption in WSE 3.0 if using SS-avoid man-in-middle



Hi John,

Yes, your concern that some malicious user may redirect the user to a fake
server is reasonable. However, this can be detected by SSL/HTTPS client in
almost every webclient implementation. For example, in IE browser, when
you visit a ssl/https protected site, if the server certificate is not in
your client machine's trust storage, IE will raise dialog to alert you and
only if you proof to continue will the https/ssl connection successfully
establish.

When you use .net network API(such as webservice proxy or webrequest class)
to access remote SSL/https service, there also exist programming interface
to do the validation. I've mentioned the
"ServicePointManager.ServerCertificateValidationCallback" event in my first
reply, is there any particular reason or difficulty that this is not
suitable in your scenario?

This event is firing everytime at the initialize time of a https/ssl
connection between client and server(when the client just receive server's
SSL certificate), you can query the certificate's attributes to determine
whether it is your expected one(this validation logic is up to you since
you know what certificate is expected ....). Surely, at that time, the
webservice hasn't send any message since SSL/HTTPS connection is even not
established, if you found that the server certificate is not expected one,
just return false for the function or even through exception.

Here is my original message in first reply
==============================
If your concern is that some malicious one else may redirect the request
to a fake server with SSL/certificates, then you can add codelogic in your
client application to valiate the server certificate exposed from the
SSL/HTTPS server. The ServicePointManager class in .net framework provide
ServerCertificateValidationCallback event that can let us add custom code
logic to verify the server (which provide the SSL/HTTPS service hannel).
And this event will occur at the initial time when your webservice (or
other webclient) which connect to HTTPS/SSL server through .net webrequest
components:


#ServicePointManager.ServerCertificateValidationCallback Property
http://msdn2.microsoft.com/en-us/library/system.net.servicepointmanager.serv
ercertificatevalidationcallback.aspx

#RemoteCertificateValidationCallback Delegate
http://msdn2.microsoft.com/en-us/library/system.net.security.remotecertifica
tevalidationcallback.aspx
=============================

Anyway, I think https/ssl the prefered approach if possible since it is
much simpler and strong for secure channel over http.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


This posting is provided "AS IS" with no warranties, and confers no rights.

.



Relevant Pages

  • Re: Need for encryption in WSE 3.0 if using SS-avoid man-in-middle
    ... order to detect we are connected to the wrong server (even though its SSL ... certificate is OK and valid by Verisign); we would need a client certificate. ... this can be detected by SSL/HTTPS client in ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • RE: Client based Certificates
    ... | a server certificate why would you have to go and buy ... certificate is to security context like a user account. ...
    (microsoft.public.inetserver.iis.security)
  • Re: SSL Query
    ... both the client and server in situation ... Server will have Server Certificate and Client ... public key and Client will encrypt a message using Server's public key. ...
    (microsoft.public.security)
  • RE: 802.1X configuration for IAS and Cisco WLC 4402
    ... these docs are describing several configurations and when you start ... addition to the server authenticating the client/user, ... server must have a server certificate that meets the minimum server ... client computers must be configured to ...
    (microsoft.public.internet.radius)
  • Re: How to ensure Im doing lwp with https correctly?
    ... SSL_connect:before/connect initialization ... SSL_connect:SSLv2/v3 write client hello A ... SSL_connect:SSLv3 read server certificate A ...
    (comp.lang.perl.misc)