ASP.NET and client certificates

From: Craig Humphrey (craig.humphrey_at_nospam.chapmantripp.com)
Date: 04/30/04


Date: Fri, 30 Apr 2004 13:19:17 +1200

Hi People,

I know in IIS Admin you can tick the box to request a client certificate
(over an SSL connection), but does anyone know of a way, programmatically,
to force this to happen for a particular page for a particular user?

Basically I've got a site that uses a common code base to run, however we
want to offer differing levels of security, primarily, with and without the
use of client certs, but I haven't found an easy way to do this
programmatically...

The hard way, that I've thought of is:

if a cert is required (in the DB) for the current user
    if a cert has been presented by the browser
        validate it
    else
        return an HTTP 401 and WWW-Authenticate : client cert
    fi
fi

But I'd rather not be doing this.
The user is already authenticated using Forms authentication over an HTTPS
connection.

Any other ideas?

Later'ish
Craig



Relevant Pages

  • Re: Disable requesting client certificate when running in SSL
    ... Regarding getting your client certificate to work, I think it needs to be ... in the cert or does altSecurityIdentities need ... > done unless the QUERYCLIENTCERT function is set by using the connection ... the handshake only involves identifying the server" ...
    (microsoft.public.windows.server.active_directory)
  • Re: Reading and Writing ADAM User attributes
    ... It was the SecureSocketsLayer flag you need to add to specify an SSL connection. ... realize that it isn't an ADAM attribute. ... I will try your suggestion about checking the event logs for cert ...
    (microsoft.public.windows.server.active_directory)
  • Re: [opensuse] stunnel certificates [partly solved]
    ... echo \>> server.keycrt ... The server.keycrt is the cert stunnel uses. ... With partial success I mean I can connect if I don't check the client certificate at the server. ... I believe the server can't find the client-certificate, ...
    (SuSE)
  • java , ssl, and active directory
    ... In order to set passwords ADS requires a SSL connection. ... At one point I had this working but part of the virtual machine that I have Active Directory running in got corrupted and I had to redo the certificates and since then I can't get a SSL connection to be established using my app. ... I'm not sure how that affects anything since the domain is still okay (I only had to reinstall Cert Services to create a new CA cert and then create a new user cert). ...
    (comp.lang.java.programmer)
  • Re: Web server program to display clients SSL cert
    ... or a VBScript that would display (e.g., a certificate pretty print) the client's cert used in the SSL connection to the page. ...
    (microsoft.public.win2000.general)