I'm building a new asp.net web api application using straight html 5 and a web api restful service. I'm already using forms authentication and the [Authorize] attribute to secure my web api calls. I'm trying to stay true as much as I can to the restful principles.
I'm mimicking what an existing app does that uses two-factor authentication and uses asp.net web forms. The two-factor authentication is not used for logging in, but for an additional task of remoting into another machine through the site and a plugin.
The existing web application uses session state to store a pin that is generated and emailed to the user. Then when the user enters in the pin it is checked against the pin in session state.
So it seems like my options are...
So what out of these options is the best option? Are there other possibilities?
I'm not 100% sure I understand your architecture, but it seems very relevant that your security should at no point rely on the client.
Assume the user has a javascript debugger in their browser (which most people actually do without realizing), and a custom build of your plugin.
So the secondary PIN challenge should be embedded on the server side into the "remoting" protocol. If it is something based on RDP or VNC, it should be possible to change the connection password of the given user on the fly to the one-time generated PIN.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With