android / android/security-samples

Fido auth with Android SDK. Error from a server: invalid origin

オープン
#71 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Kotlin
スター
1k
フォーク
449
PR マージ指標
30日以内にマージされた PR はありません

説明

I use a FIDO android SDK https://developers.google.com/android/reference/com/google/android/gms/fido/package-summary and
web FIDO lib https://github.com/lbuchs/WebAuthn as a server

To complete authentication I send to the server the following payload:

```{"authenticatorData":"uGLTOEtQtBsB4wjhEvR0ZVayRWn/3mhUyp6dqFFY0a8BAAABDQ==","clientDataJSON":"eyJ0eXBlIjoid2ViYXV0aG4uZ2V0IiwiY2hhbGxlbmdlIjoiLW9zc3JiYXY3SmhmUWlQY1ZlMzFkdDQxMG5ZWHVvWW9kM1FYdHc5VmlIUSIsIm9yaWdpbiI6ImFuZHJvaWQ6YXBrLWtleS1oYXNoOmZiRU5UdkNTZVItQXdKVjVycnJCc2I5OHAtakV3MGM1U1NPTXVsX0t3YUkiLCJhbmRyb2lkUGFja2FnZU5hbWUiOiJjb20uYWZ0ZXJsb2dpYy5hdXJvcmEubWFpbCIsInRva2VuQmluZGluZyI6eyJzdGF0dXMiOiJwcmVzZW50IiwiaWQiOiJodHRwczpcL1wvdGVzdC5hZnRlcmxvZ2ljLmNvbSJ9fQ==","id":"LEBlQOlamqsmKzRBPQe9y0BFN5IaQ5BBB1ByiDH85HulzCYQTffqeK0RQDoZqUO7syGZY+hkfWf9P2FiQQ3eVA==","signature":"MEUCICFf8qFGiXxGTBokpstfUsCwbd7JTsLlDrFZoGMi3tZzAiEA0zAXxFDeqA7gF6YahudK+LD2gDUPtAnXqgAvvhVc/vE="}```

The field ```clientDataJSON``` contains a base64-encrypted JSON object that has property ```"origin":"android:apk-key-hash:fbENTvCSeR-AwJV5rrrBsb98p-jEw0c5SSOMul_KwaI"```

But the server responds with an error "invalid origin".

At the same time, my web FIDO auth implementation sends ```clientDataJSON``` with ```"origin":"https://test.afterlogic.com"``` and everything is working fine in this case.

How I can verify origin with android:apk-key-hash on the webserver? I will be appreciated any other ideas on how to deal with this.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、提供された clientDataJSON をデコードし、その android:apk-key-hash origin を WebAuthn サーバーで使用されている origin の検証と比較します。リンクされている Android FIDO SDK のリファレンスと WebAuthn サーバーのドキュメントを読み、この origin がサポートされているか、またどのように検証すべきかを確認します。サポートされている検証方法を特定するか、互換性がないことを文書化できれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
android
領域
authentication, security
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
25/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。