Read smart card on demand
Asked Answered
S

1

13

I am making an application in which a user would see a login page, enter his email address and a password. At that time I want the system to read his CAC certificates and permit him to choose. Right now all I can do is require the SSL and it asks for the certificate before the user logs in. Is there any way to do this? I am testing this locally with VS 2015 and changing the applicationhost.config file. I am not sure how it will function differently on a server at this point. Basically, I want to ask the user for a certificate when I need it and not before.

I found some data but it still doesn't work on the server. I changed the SSL settings on the server to not require SSL and to ignore. Then I added this to my web.config file:

 <location path="FileSharing/Index" allowOverride="true">
<system.webServer>
  <security>
    <access sslFlags="Ssl,SslNegotiateCert,SslRequireCert"/>
  </security>
</system.webServer>

With this I am getting a 500 error and the browser is trying to go to:

https://server/FileSharing/FileSharing/Index

where the FileSharing is in the address twice. Any ideas?

The first page, which is simply a welcome page and does not require SSL, comes up fine but I want it to read the cert when going to the Index.

Snowdrop answered 6/2, 2017 at 12:2 Comment(1)
Can you try changing "FileSharing/Index" => "Index" and see if that works?Boogeyman
M
1

You should probably add a secondary page in-between, right after the login, redirect to that "proxy" page that will require the certificate and then if everything checks out, move the flow along.

Maddening answered 15/2, 2017 at 20:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.