Skip to content

Support for U2F / Fido2 / webauthn? #849

Closed

Description

@flipsa

Hey there,

I use LineageOS for MicroG on my NFC enabled phone and recently bought a Yubikey 5 NFC. While the phone does detect the Yubikey via NFC or UCB-OTG, there seems to be no support for U2F/ Fido2 / webauthn. I used the Yubico U2F demo site to test it.

If I understand correctly, this functionality is provided on stock Android with the usual Google Apps through the Google play services library, which then exposes it via an API to the mobile browser. On my device, depending on the browser I either get "The user agent does not support public key credentials" (Jelly), or I get a timeout while trying (Chrome, Firefox, Brave).

On a non LineageOS / non-microg device with the Chrome browser, the Yubico demo site works fine.

The browsers (except Jelly) all have support for U2F if I am not mistaken, so that is not the reason I think...

Are there any plans to incorporate this in MicroG? I could not find any info on it, so I'm asking here.

Thanks for any leads - and of course for MicroG in general, I appreciate it very much!

  • Oneplus 6 (Enchilada)
  • LineageOS 16 for MicroG (official build from last week)
  • tried with the following browsers: Jelly, Chrome, Firefox, Brave

Activity

  1. afgks commented on Jul 17, 2020

    @afgks

    Same question here.

  2. gtbuchanan commented on Sep 27, 2020

    @gtbuchanan

    Here's a Chromium ticket confirming this is handled by Google Play Services. I just wanted to throw in that the PIN implementation is especially important to me.

  3. bintzandt commented on Dec 28, 2020

    @bintzandt

    Hi everyone, I was wondering if anybody is currently working on this issue?

  4. Sami32 commented on Feb 18, 2021

    @Sami32

    It seem that this issue should affect CalyxOS, /e/ OS and some others as well.
    So Apps requiring a high security level like banking or trading have to rely on weaker biometrics or 2FA at best :(

    I guess that now with more workers doing their job from home their enterprise will ask for some security level using keys like Yubikey, OnlyKey...

  5. jr64 commented on Aug 9, 2021

    @jr64

    I'm very interested in this feature as well. At least support for simple Registration/Sign-In could probably be implemented fairly easily using https://github.com/cotechde/hwsecurity.

    I've considered trying that route but I'm unsure regarding the licenses. This project is Apache 2.0 licensed, hwsecurity is GPLv3. From my (admittedly very limited) understanding of Open Source license compatibility, this means we can't even link against that library. Is that correct? Can anyone with more knowledge on that subject confirm/deny before I waste time on an unusable implementation?

  6. ssaavedra commented on Aug 9, 2021

    @ssaavedra

    You should not link to that directly or this project would need to switch to GPLv3. However, you could expose an API at this project level that could be implemented in a separate app, like what is done with location providers. This way the supposed hwsecurity "mfa-provider" (or whatever we call it) itself could be a GPLv3 app, keeping microG on the other side of the API, and no licensing issues.

  7. jr64 commented on Aug 19, 2021

    @jr64

    Yeah, that's what I thought, thank you for confirming. While not ideal for the end user, I guess this is still the most viable solution.

    I currently don't have a phone that is suitable for microG but I do plan on getting one. I'll give this a go if I can manage to find the time.

  8. dschuermann commented on Aug 31, 2021

    @dschuermann

    Just a small note from us, the devs of the Hardware Security SDK at https://github.com/cotechde/hwsecurity: Currently, the SDK is dual-licensed under the GPLv3 and a proprietary license. This allows us to have a business model by selling the SDK under the proprietary license that allows our customers to include it in their closed-source software.

    Our business no longer works when we would license the SDK under Apache v2 since the Apache license allows the inclusion in closed-source apps.

    That said, feel free to build one GPLv3 app with the SDK that exposes the API via AIDL and the call it from microG.

  9. nsp-devel commented on Sep 29, 2021

    @nsp-devel

    +1 here, from someone using FIDO2/WebAuthN in production at day job, and having implemented FIDO2 server-side protocol in PHP.

    Having support either in MicroG or the OS build would be great. Noting from the Chromium ticket referenced above, this is nothing that would /have to/ live in MicroG but could go all the way down to AOSP. Sad that there's no resource in AOSP for this to happen.

    I guess an app+linking to HWSecurity code is the easiest way forward short-term.

  10. samsapti commented on Sep 30, 2021

    @samsapti

    I just want to point out, that there's another issue regarding FIDO implementation: last time I tried using FIDO (YubiKey 5 NFC) on a regular Google Play Services enabled Android phone, the only browser that worked with it was Google Chrome. Other browsers didn't work. Now, I don't know if it's Google's FIDO implementation that intentionally makes it unusable in other browsers (since other browsers like Firefox technically do have support for FIDO, just look in about:config) or if it's something else.

    If we were to implement FIDO in microG or all the way down to AOSP, we would still have to wait for third party browsers to implement the API.

  11. samsapti commented on Sep 30, 2021

    @samsapti

    Btw, is there anything wrong with switching microG to GPLv3? Just curious.

  12. nsp-devel commented on Oct 7, 2021

    @nsp-devel

    I tried current Firefox 92 on a Samsung S6 with stock Android 7 and that supported FIDO2 just fine. I.e. can't confirm a "Chrome only".

  13. duplexsystem commented on Oct 7, 2021

    @duplexsystem

    Are the microg maintainers against bountys because if not I'd like to put one on this

  14. duplexsystem commented on Oct 8, 2021

    @duplexsystem

    I added a 20$ bounty for this

  15. 89 remaining items

  16. ale5000-git commented on Oct 31, 2022

    @ale5000-git
    Member

    @restena-sw
    Fennec F-Droid (a fork of Firefox) will likely include microG FIDO libraries soon so it will likely work although it isn't ready yet.
    relan is working on it.

  17. ale5000-git commented on Oct 31, 2022

    @ale5000-git
    Member

    @mar-v-in
    Is it possible to have another nightly build with the latest fixes please?

  18. mar-v-in commented on Nov 2, 2022

    @mar-v-in
    Member

    Nightly is updated.

    I'm closing this issue now, as I feel that Bluetooth support, caBLE support and the non-browser Fido API are minor functionality (which I also probably won't tackle in near future).

  19. fyrak1s commented on Nov 4, 2022

    @fyrak1s

    Hi, sorry for bringing this issue up again.

    I waited a long time for this feature to be implemented and I just tested v0.2.25.x and cannot get FIDO2 to work 🤔

    This is me trying to log into github:
    Screenshot_20221104-200239_1

    It immediatly fails without a prompt.

    So therefore I have tried webauthn.io:
    Screenshot_20221104-200307_1
    Now here at least I did get a prompt if I want to use my securty key and it vibrates after holding it against my phone. However as you see the process still fails.

    Any idea what is happening? Or did I misunderstand the implemented feature?

    My security key is a Solokey 1 NFC.

  20. mar-v-in commented on Nov 4, 2022

    @mar-v-in
    Member

    webauthn.io: If you are using a SoloKey via NFC or USB: microG only supports user verification performed on the authenticator itself, which typically means they need a fingerprint scanner. If you're using the option of using the devices screen lock, that should provide user verification. On webauthn.io you can also disable "require user verification" under advanced settings.

    GitHub does work for me and if it fails without a prompt, the key itself can't be the issue. Can you please provide a logcat (feel free to do a new issue for this)?

  21. ale5000-git commented on Nov 4, 2022

    @ale5000-git
    Member

    @Nuc1eoN: I suggest also to try with the latest nightly build since some bugs were fixed after the release, the NFC timeout was also increased.

  22. fyrak1s commented on Nov 4, 2022

    @fyrak1s

    webauthn.io: If you are using a SoloKey via NFC or USB: microG only supports user verification performed on the authenticator itself, which typically means they need a fingerprint scanner.

    Oh I did not know that! Yes you are right after unticking user verification it works ;)
    Will user verification with security key and PIN be supported in the future?

    GitHub does work for me and if it fails without a prompt, the key itself can't be the issue. Can you please provide a logcat (feel free to do a new issue for this)?

    Thank you I followed your suggestion and opened a new issue: #1817

  23. Yannik commented on Nov 4, 2022

    @Yannik

    webauthn.io: If you are using a SoloKey via NFC or USB: microG only supports user verification performed on the authenticator itself, which typically means they need a fingerprint scanner.

    @mar-v-in Could you clarify please: Is using a FIDO2-Token with a PIN (e.g., a yubikey) not supported at all? Or is this just something with the SoloKey?

  24. mar-v-in commented on Nov 4, 2022

    @mar-v-in
    Member

    microG currently does not support FIDO2 authentication methods that require a PIN to be entered on the client (if PIN is entered on the authenticator, there is no issue, but only few authenticators support that). PIN is required for most popular security keys (incl. Yubikey and Solokey) when user verification is required, but often is optional if user verification is not required. Rule of thumb: If you need to enter your PIN when using your Yubikey for sign-in on your desktop (which typically means your browser asks for your PIN) it won't work with microG. This is the same restriction as is currently present in Play Services, as is reported in this issue in Chromium bug tracker.

    I'm not saying that we can't go beyond the feature set of Play Services, but it is not a primary objection of microG. If someone wants to implement this (shouldn't be too hard) I'd be happy to accept a PR.

  25. Yannik commented on Nov 4, 2022

    @Yannik

    @mar-v-in Oh, that's too bad. Thank you for the explanation.

  26. Chinchzilla commented on Jan 19, 2023

    @Chinchzilla

    Hi there, I'm on 0.2.26.223616-37 and U2F works both via NFC and USB. WebAuthn works on registration via USB but not authentication. NFC for WebAuthn doesn't work at all. Device Pixel 4a.

  27. ale5000-git commented on Jan 20, 2023

    @ale5000-git
    Member

    @Chinchzilla
    Please open a new ticket for the problem.

    If you can. also update microG GmsCore to v0.2.27.223616 (or higher) please.

  28. locked as resolved and limited conversation to collaborators on Jan 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions