問題陳述:
我想使用 FIDO2 協議(通過提供 SDK)解決 Android 應用程式上的用戶身份驗證,而無需為同一設備上的不同應用程式執行多個注冊儀式。例如,如果用戶已經在 Android 應用 A 中注冊(生成公鑰-私鑰對),則他/她不需要在 Android 應用 B 中注冊(假設 App A 和 App B 在同一設備上) .
可能的解決方案是什么(據我所知):-
- 與應用程式 A 和 B 集成的通用 SDK,以提供身份驗證。
- 單獨的身份驗證應用程式。
我想繼續使用解決方案 1,因為解決方案 2 可能不可取,因為它需要額外的步驟來下載額外的應用程式(身份驗證應用程式)。
我現在能實作什么:- 我們能夠通過為應用 A 和應用 B 維護單獨的私鑰來對應用 A 和應用 B 的用戶進行無密碼身份驗證。
在上圖中:-
- 用戶 XYZ 登錄到應用程式 A 并在此設備上向應用程式 A 注冊自己。
- 在注冊步驟中,認證者會生成一個公私密鑰對。
- PrivateKey_1(PrivateKey) 被創建并存盤在 Keystore 中,PublicKey_1(PublicKey) 被創建并與服務器共享。
- 現在假設用戶 XYZ 想要登錄應用程式 B。用戶 XYZ 重復相同的程序以將他注冊到應用程式 B。
- In this process, A PrivateKey_2 gets created and is stored in the Keystore and PublicKey_2 gets created and is shared with the server.
- So in above scenario User XYZ is able to authenticate on App A and App B using private key PrivateKey_1 and PrivateKey_2 respectively.
I want to know the feasibility of the following Scenario? I want to do passwordless authentication of user XYZ for app A and app B, where applications(app A and app B) can use the same credentials (public and private key pair ) and do not need to perform a repeated registration ceremony(creating public and private key) for the same user on the same device for multiple applications sharing the common SDK(app A and app B).
In the above diagram:-
- User XYZ logs-in to App A and registers himself with app A on this device.
- 在這個程序中,PrivateKey_1 被創建并存盤在 Keystore 中,PublicKey_1 被創建并與服務器共享。
- 用戶 XYZ 想要登錄應用程式 B。
- 應用 B 應該能夠使用先前生成的憑據(由應用 A)驗證用戶 XYZ。
這甚至可能嗎?我的理解有什么差距嗎?
任何建議和幫助都是非常可觀的:) :)
uj5u.com熱心網友回復:
只要您在嘗試身份驗證時參考相同的RP ID,就可以在 API 可用的任何地方重復使用 FIDO2 憑據。FIDO 憑據系結到唯一的 RP ID,只要您可以證明 RP ID 的所有權,您就可以使用與同一 RP ID 關聯的任何憑據請求身份驗證。
對于 Android,只要兩個應用程式都連接到一個網站及其唯一的 RP ID,您就可以跨應用程式進行身份驗證。要將您的應用程式連接到網站,請查看FIDO2 API for Android檔案,尤其是其與您的網站的互操作性部分。它鏈接到用于在您的網站上設定數字資產鏈接的 Google 頁面,以便您可以證明 RP ID 的所有權并使用與其關聯的憑據在應用程式之間進行身份驗證。
一旦您的應用程式和網站鏈接并且用戶已在一個應用程式中注冊,您就應該能夠Fido2ApiClient.getSignPendingIntent()在您的第二個應用程式中進行身份驗證,只要您指定站點的 RP ID(與注冊期間指定的相同)作為您rpId的PublicKeyCredentialRequestOptions傳遞給方法。
PS 所有這一切的好處是,您在本機應用程式中使用 Fido2ApiClient(或其他平臺上的任何等效 API)注冊的憑據稍后可用于使用瀏覽器中的 WebAuthn API 登錄您的網站;您只需要在PublicKeyCredentialRequestOptions傳遞給 WebAuthn 的中參考相同的 RP ID navigator.credentials.get()!
uj5u.com熱心網友回復:
FIDO2 的主要優點之一是它可以防止攻擊者試圖冒充真正的回復方的中間人攻擊。FIDO2 密鑰只會回應注冊了私鑰的 RP。跨多個 RP 共享 authn 會破壞這種模式。我不知道在 Android 設備上可能發生什么,但我原以為您需要某種形式的身份驗證代理(IdP),您使用密鑰對其進行身份驗證,它負責向應用程式證明身份驗證。
uj5u.com熱心網友回復:
這些帳戶是否在同一服務上注冊?閱讀與您的網站部分的 Android FIDO2 API互操作性,似乎可以托管https://example.com/.well-known/assetlinks.json列出的多個 Android 應用程式。
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/424363.html
