I've made a simple console application that calls Windows WebAuthn API's WebAuthNAuthenticatorGetAssertion() which will display CredentialUIBroker.exe to authenticate with an external FIDO2 security key.
I'm trying to integrate that application with my Custom Credential Provider by executing it in a child process. However, the UI does not show up on the login page. I went to check the system event log and saw that the authentication process failed with Error: 0x8000401A. The server process could not be started because the configured identity is incorrect. Check the username and password
, which is odd because by using the same credential id and the same security key, the process will be successful in a normal logged in session.
There are some discussions claiming that we could not use Windows WebAuthn API in Credential Provider and that we must use another fido client such as libfido2. However, one discussion suggests that it was just a UI thread problem and we should be able to show the Broker just like how we create a window in samplehardwareeventcredentialprovider.
I've tried to call the WebAuthNAuthenticatorGetAssertion() using the other thread and also from the CommandLinkClicked
callback and both attempts failed.
Are we limited to using a third-party fido client in Credential Provider? What could be causing the failed authentication in my process? It will be unfortunate if we could not use Windows WebAuthn API in Credential Provider since it provides a simple way to operate with FIDO-compatible devices.