eBay / UAF

UAF - Universal Authentication Framework
Apache License 2.0
281 stars 151 forks source link

This is about KeyID, to make the fidouafclient application can save KeyID successfully. #29

Closed ghost closed 7 years ago

ghost commented 7 years ago

What changes were proposed in this pull request?

In the registration protocol, once the client signs the challenge data that it has received from the server, the latter responds by sending keyID and AAID back to the client. The function responsible for this interaction is clientSendRegResponse in the file UAF/fidouafclient/app/src/main/java/org/ebayopensource/fidouafclient/op/OpUtils.java. Upon receiving the server's response, the client then retrieves keyID and AAID through the function saveAAIDandKeyID in the file UAF/fidouafclient/app/src/main/java/org/ebayopensource/fidouafclient/op/Reg.java.

The problem is that, in the original code, the string returned by clientSendRegResponse was not properly formatted (as a string representation of an array of a single JSON object). Consequently, when the function saveAAIDandKeyID attempts to recover keyID and AAID from the said string, the operation fails.

A part of the problem is that, in the original code, the string returned by clientSendRegResponse (which in turn eventually gets processed by saveAAIDandKeyID) contains extraneous data, namely the signature produced by the client. Removing this part and simply returning the server's response, namely keyID and AAID, solves the problem.

How was this patch tested?

The error in the original code causes an exception to be thrown in the function saveAAIDandKeyID. We verified that after the aforementioned change was implemented, no exceptions were thrown.

Additionally, we performed the following sequence: we registered a user, terminated the client application, then restarted it to verify that the user has been successfully registered.

ghost commented 7 years ago

I'm sorry. I made the pull request inappropriately because only commit id "e31bc40cc005a2fb6c8eb53badd0638f2112e01f" that is relevant to this pull request. so I will close this pull request and make the new one