Reading data from a security token in a browser

I would like to write a JS function to have access from the browser to the public data stored on the hardware security token inserted in an USB port.

Specifically, in an intranet where ALL users have security tokens, I would like to have some sort of landing page, which will ask the user to enter his/her security token credentials (inserted in the USB port), and then read the public information from that token (I do not really need ALL of them, but I am interested mostly in the user name, certificate name(s) loaded in the token and their expiration date) and load them in the web page (to be displayed).

I have little to none experience with security devices like that, but I assume this is not a very complicated issue (though "googling" did not manage to get me in the right direction of how to make it work).

Thank you.

Upvotes: 6

Views: 1536

Answers (2)

Supersharp
Supersharp

Reputation: 31181

You can use the WinUSB API implemented in Chrome v54+.

You'll need to know the intrinsic structure of your USB token.

Upvotes: 0

Dajalmar Gutierrez
Dajalmar Gutierrez

Reputation: 466

In my company we created a service installed installed in client's device, this service uses java to access the token and it provides an API(in client localhost), not sure if it's the best way but it works, if you find another way to solve this issue please leave a comment.

Upvotes: 2

Related Questions