Yubico / yubioath-flutter

Yubico Authenticator for Desktop (Windows, macOS and Linux) and Android
https://developers.yubico.com/yubioath-flutter/
Apache License 2.0
983 stars 134 forks source link

Support for Ubuntu on ARM #926

Open barendt opened 1 year ago

barendt commented 1 year ago

Are there any plans to release a Linux ARM build?

I'm running Ubuntu 22.04 on an M1 Mac inside a Parallels VM. I'm happily using my Yubikey for other things inside the VM, so it would be handy to have the Authenticator app also work inside the VM.

ClaytonTDM commented 1 year ago

Can't you just build it for arm yourself?

barendt commented 1 year ago

It looks like I probably can. I'll give that shot when I get a chance.

My other reason for posting here was to let the Yubico folks know there's at least one person interested in Linux ARM builds of their stuff. I didn't even know there was a GitHub project behind the Authenticator app until I contacted Yubico support when I didn't see an ARM build on their site. They suggested I open an issue. So, maybe I'm the only one interested, but I've let them know.

gbcox commented 1 year ago

My other reason for posting here was to let the Yubico folks know there's at least one person interested in Linux ARM builds of their stuff. I didn't even know there was a GitHub project behind the Authenticator app until I contacted Yubico support when I didn't see an ARM build on their site. They suggested I open an issue. So, maybe I'm the only one interested, but I've let them know.

You're not the only one. Due to the platform change to Flutter, the yubikey-flutter package (at least for the time being) will no longer be in the Fedora repositories starting with F38 - so obviously Fedora will not be able to provide builds for different architectures. Fedora Mitigation discussion. I've already had people take notice that there was no AppImage for ARM, so if yubico could provide one, that would be helpful.

Meridien commented 1 year ago

tl;dr; not sure if this is even meant to work

Sorry to bring this conversation up again, but I am also interested in building this for ARM myself. I have set up an ARM VM (Google Cloud TA2) solely for the purpose of installing the Flutter SDK and then building yubioath-flutter. I have got as far as running the build-helper.sh, but it is failing on the poetry install step when it tries to install pyscard.

This is what I am seeing now:

% ./build-helper.sh Building authenticator-helper for linux... /usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.26.16) or chardet (3.0.4) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Installing dependencies from lock file

Package operations: 7 installs, 0 updates, 0 removals • Installing pyscard (2.0.7): Failed DBusErrorResponse [org.freedesktop.DBus.Error.UnknownMethod] ('No such interface “org.freedesktop.DBus.Properties” on object at path /org/freedesktop/secrets/collection/login',) at /usr/local/lib/python3.8/dist-packages/secretstorage/util.py:48 in send_and_get_reply

   44│     def send_and_get_reply(self, msg: Message) -> Any:
   45│         try:
   46│             resp_msg: Message = self._connection.send_and_get_reply(msg)
   47│             if resp_msg.header.message_type == MessageType.error:
→  48│                 raise DBusErrorResponse(resp_msg)
   49│             return resp_msg.body
   50│         except DBusErrorResponse as resp:
   51│             if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT):
   52│                 raise ItemNotFoundException('Item does not exist!') from resp

The following error occurred when trying to handle this error: ItemNotFoundException Item does not exist! at /usr/local/lib/python3.8/dist-packages/secretstorage/util.py:52 in send_and_get_reply

   48│                 raise DBusErrorResponse(resp_msg)
   49│             return resp_msg.body
   50│         except DBusErrorResponse as resp:
   51│             if resp.name in (DBUS_UNKNOWN_METHOD, DBUS_NO_SUCH_OBJECT):
→  52│                 raise ItemNotFoundException('Item does not exist!') from resp
   53│             elif resp.name in (DBUS_SERVICE_UNKNOWN, DBUS_EXEC_FAILED,
   54│                                DBUS_NO_REPLY):
   55│                 data = resp.data
   56│                 if isinstance(data, tuple):

The following error occurred when trying to handle this error: PromptDismissedException Prompt dismissed. at /usr/local/lib/python3.8/dist-packages/secretstorage/collection.py:159 in create_collection

  155│     if len(collection_path) > 1:
  156│         return Collection(connection, collection_path, session=session)
  157│     dismissed, result = exec_prompt(connection, prompt)
  158│     if dismissed:
→ 159│         raise PromptDismissedException('Prompt dismissed.')
  160│     signature, collection_path = result
  161│     assert signature == 'o'
  162│     return Collection(connection, collection_path, session=session)
  163│ 

The following error occurred when trying to handle this error: InitError Failed to create the collection: Prompt dismissed.. at /usr/local/lib/python3.8/dist-packages/keyring/backends/SecretService.py:63 in get_preferred_collection

   59│                 collection = secretstorage.Collection(bus, self.preferred_collection)
   60│             else:
   61│                 collection = secretstorage.get_default_collection(bus)
   62│         except exceptions.SecretStorageException as e:
→  63│             raise InitError("Failed to create the collection: %s." % e)
   64│         if collection.is_locked():
   65│             collection.unlock()
   66│             if collection.is_locked():  # User dismissed the prompt
   67│                 raise KeyringLocked("Failed to unlock the collection!")

And pyscard is installed according to PIP

~/yubioath-flutter % pip3 install pyscard Requirement already satisfied: pyscard in /home/user1/.local/lib/python3.8/site-packages (2.0.7)

My question - should what I am attempting to do actually work? Is it actually a valid case to try to build a linux app from a headless flutter SDK installation? It seems that the step is failing on trying to find a secret store that may rely upon having a visual desktop environment.

castaway commented 11 months ago

Another vote for an arm(64) build - chromebook user here, apparently the desktop build works on intel chromebooks, what about us arm chomebook users ;)

The Android app does work well on it at least ;)

maxrdz commented 7 months ago

Also interested in an aarch64 release of yubioauth. I recently bought a Pinephone, and I really would love to have an app to access my yubikey's FIDO2 and TOTP codes.

maxrdz commented 7 months ago

Another vote for an arm(64) build - chromebook user here, apparently the desktop build works on intel chromebooks, what about us arm chomebook users ;)

The Android app does work well on it at least ;)

How did you get the android app running on aarch64 linux? I'm curious to get it working on my phone.

ClaytonTDM commented 7 months ago

Chromebooks have an Android emulator built-in

jokkon commented 7 months ago

I have set up and built a Linux/arm64 version of yubioath-flutter on a raspberry pi 5. Sadly I didn't take any notes while setting it all up, and I have now forgotten if I had problems doing so (it feels like getting python 3.12 and the dependencies correct might have been a little interesting). At least now you know it is possible to do this.

~/code/yubioath-flutter/build/linux/arm64/release/bundle $ uname -a
Linux pie5 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux

~/code/yubioath-flutter/build/linux/arm64/release/bundle $ file authenticator
authenticator: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=864a250e697b972bb150b34f268a5a5903c48b28, for GNU/Linux 3.7.0, not stripped
maxrdz commented 7 months ago

I have set up and built a Linux/arm64 version of yubioath-flutter on a raspberry pi 5. Sadly I didn't take any notes while setting it all up, and I have now forgotten if I had problems doing so (it feels like getting python 3.12 and the dependencies correct might have been a little interesting). At least now you know it is possible to do this.

~/code/yubioath-flutter/build/linux/arm64/release/bundle $ uname -a
Linux pie5 6.1.0-rpi7-rpi-2712 #1 SMP PREEMPT Debian 1:6.1.63-1+rpt1 (2023-11-24) aarch64 GNU/Linux

~/code/yubioath-flutter/build/linux/arm64/release/bundle $ file authenticator
authenticator: ELF 64-bit LSB pie executable, ARM aarch64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, BuildID[sha1]=864a250e697b972bb150b34f268a5a5903c48b28, for GNU/Linux 3.7.0, not stripped

No worries, your response with this info is greatly appreciated. :)