Hi Guix,
I'm being required to setup a 2FA application to create
one-time-passwords for a self-managed Gitlab instance. The wrinkle is
that I don't own a smartphone. Up until now I've been able to use 2FA
over SMS for most systems I interact with, but Gitlab doesn't support
this option. Instead, there is a hard requirement on using a dedicated
application for this purpose. The recommended choices are Google
Authenticator and Microsoft Authenticator for either iOS or Android.
Again, I don't have access to either of these operating systems, nor do
I want to use these proprietary applications for (what should be) such a
basic task.
In digging through the Guix package list, I found `authenticator`:
==
name: authenticator
version: 3.32.2
outputs:
+ out: everything
systems: x86_64-linux
dependencies: desktop-file-utils@0.26 gettext-minimal@0.21 glib@2.70.2
gobject-introspection@1.66.1 gsettings-desktop-schemas@41.0 gtk+@3.24.30
libhandy@0.0.13
+ libsecret@0.20.5 pkg-config@0.29.2 python-beautifulsoup4@4.11.1
python-pillow@9.2.0 python-pyfavicon@0.1.1 python-pygobject@3.40.1
python-pyotp@2.7.0
+ python-pyzbar@0.1.8 python@3.9.9 yoyo-migrations@7.2.0 zbar@0.23.90
location: gnu/packages/gnome.scm:10394:2
homepage: https://gitlab.gnome.org/World/Authenticator/
license: GPL 3+
synopsis: Two-factor authentication application built for GNOME
description: Authenticator is a two-factor authentication (2FA) application
built for the GNOME desktop environment.
+
+ Features:
+
+* QR code scanner
+
+* Beautiful UI
+
+* Huge database of more than 560 supported services
+
+* Keep your PIN tokens secure by locking the application with a password
+
+* Automatically fetch an image for services using their favicon
+
+* The possibility to add new services
==
It looks like a reasonable FOSS option, so I tried it out via `guix
shell`:
```
$ guix shell authenticator -- authenticator
```
Unfortunately, I just get a program crash and a stacktrace:
==
Traceback (most recent call last):
File
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/application.py",
line 59, in do_startup
self._setup_actions()
File
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/application.py",
line 142, in _setup_actions
Keyring.get_default().connect("notify::can-be-locked",
File
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/models/keyring.py",
line 49, in get_default
Keyring.instance = Keyring()
File
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/models/keyring.py",
line 44, in __init__
self.props.can_be_locked = self.is_password_enabled() and
self.has_password()
File
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/models/keyring.py",
line 136, in is_password_enabled
state = Secret.password_lookup_sync(schema, {}, None)
gi.repository.GLib.GError: g-dbus-error-quark: The name org.freedesktop.secrets
was not provided by any .service files (2)
Traceback (most recent call last):
File
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/application.py",
line 77, in do_activate
window = Window.get_default()
File
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/widgets/window.py",
line 70, in get_default
Window.instance = Window()
File
"/gnu/store/wj5xf38czxxm0jh6lvc5zxy8c7zfg5d3-authenticator-3.32.2/lib/python3.9/site-packages/Authenticator/widgets/window.py",
line 55, in __init__
self.init_template('Window')
TypeError: () takes 0 positional arguments but 1 was given
==
The line that stuck out to me was this one:
```
gi.repository.GLib.GError: g-dbus-error-quark: The name
org.freedesktop.secrets was not provided by any .service files (2)
```
A little web searching led me to understand that I need to have the
`gnome-keyring` daemon running. (I wish that had been in the package
documentation.)
Okay, so I reviewed the Guix manual, and I found this info:
==
-- Variable: gnome-keyring-service-type
This is the type of the service that adds the GNOME Keyring
(https://wiki.gnome.org/Projects/GnomeKeyring). Its value is a
‘gnome-keyring-configuration’ object (see below).
This service adds the ‘gnome-keyring’ package to the system profile
and extends PAM with entries using