oath-toolkit-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Bug#807992: marked as done (per user oath files)


From: Debian Bug Tracking System
Subject: Bug#807992: marked as done (per user oath files)
Date: Thu, 03 Oct 2024 07:54:02 +0000

Your message dated Thu, 03 Oct 2024 09:50:59 +0200
with message-id <87wmip7hgc.fsf@kaka.sjd.se>
and subject line Re: Bug#807992:  Bug#807992: per user oath files
has caused the Debian Bug report #807992,
regarding per user oath files
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
807992: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=807992
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message --- Subject: per user oath files Date: Tue, 15 Dec 2015 00:23:45 -0500
Package: libpam-oath
Version: 2.4.1-1
Severity: wishlist

i find it problematic that the management of the OATH secrets is all
centralised in a single file. it seems to me it would be preferable to
delegate this management to users, the same way we have
`~/.ssh/authorized_keys`.

i suggest checking into `~user/.oath` for a similar format (obviously
ommitting the username, to avoid forging other people's credentials).

could that be considered?

-- System Information:
Debian Release: 8.2
  APT prefers stable
  APT policy: (500, 'stable'), (1, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=fr_CA.UTF-8, LC_CTYPE=fr_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages libpam-oath depends on:
ii  libc6           2.19-18+deb8u1
ii  liboath0        2.4.1-1
ii  libpam-runtime  1.1.8-3.1
ii  libpam0g        1.1.8-3.1

libpam-oath recommends no packages.

libpam-oath suggests no packages.

-- no debconf information

--- End Message ---
--- Begin Message --- Subject: Re: Bug#807992: Bug#807992: per user oath files Date: Thu, 03 Oct 2024 09:50:59 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)
Antoine Beaupré <anarcat@debian.org> writes:

> On 2016-03-05 15:01:39, Antoine Beaupré wrote:
>> On 2015-12-21 16:44:23, Ilkka Virta wrote:
>>> On 16.12. 15:44, Antoine Beaupré wrote:
>>>> On 2015-12-16 06:21:01, Ilkka Virta wrote:
>>>> Right, you are right of course. I do think it's critical to keep that
>>>> file from being readable from random apps. The format *is* also a little
>>>> brittle so it seems important to have standardized access as well...
>>>>
>>>> Maybe having a system similar to shadow passwords would be necessary
>>>> here: there could be a secret file that can only be read by root (or
>>>> with the right caps) and would need a special tool (oath.passwd?) to
>>>> reset.
>>>
>>> Well being root-only and having some sort of a helper app is already 
>>> needed. (Though the helper might well be the admins text editor.
>>>
>>> As for brittleness, it shares the same thing with all other text files: 
>>> they kind of have to be rewritten completely every time (can't just 
>>> replace a single line). Unless you meant some other brittleness? Of 
>>> course there's locking, per-user files would make that a bit simpler.
>>
>> No that is pretty much it - i was thinking of lock contention issues and
>> so on.
>>
>>> This was the per-user shadow file thingy I was thinking of:
>>> http://www.openwall.com/tcb/ (see the slides)
>>
>> right. pretty much what i had in mind.
>
> Any progress here?
>
> it's still kind of inconvenient to deploy this on multi-user systems
> right now... should we write a "choath" to input the user token or split
> the file?

Hi!  I am going through bug reports, and noticed this one.  I believe
this was implemented in the 2.6.7 release, long after your original
report and the discussion.  See NEWS entry:

** pam_oath: Support variables in usersfile string parameter.
These changes introduce the ${USER} and ${HOME} placeholder values for
the usersfile string in the pam_oath configuration file. The
placeholder values allow the user credentials file to be stored in a
file path that is relative to the user, and mimics similar behavior
found in google-authenticator-libpam.
The motivation for these changes is to allow for non-privileged
processes to use pam_oath (e.g., for 2FA with
xscreensaver). Non-privileged and non-suid programs are unable to use
pam_oath. These changes are a proposed alternative to a suid helper
binary as well.
Thanks to Jason Graham <jgraham@compukix.net> for the patch.  See
<https://gitlab.com/oath-toolkit/oath-toolkit/-/merge_requests/12>.

Please have a look at the pam_oath README and use the 'usersfile'
setting:

  "usersfile": Specify filename where credentials are stored, for
               example "/etc/users.oath". The placeholder values
               "${USER}" and "${HOME}" may be used to specify the
               filename on a per-user basis. The values "${USER}" and
               "${HOME}" expand to the user's username and home
               directory, respectively.

I believe there are three relevant basic use cases:

1) usersfile=/etc/users.oath - root owned and read/write protected
against end-users, for centralized control.

2) usersfile=${HOME}/.config/oath/secrets - user controlled secrets, for
easy end-user management.  Disadvantage is that user can read their OATH
secret, and potentially damage their ability to login by messing up the
file, but in some situations that may be an advantage.

3) usersfile=/var/oath/oath.${USER}.secrets -- root-controlled per-user
file, typically more relevant for larger multi-user system where you
want to split up the /etc/users.oath file on a per-user basis.

Reading through this bug report makes me believe this is now already
implemented, so I am closing this bug report.  Feel free to re-open if I
missed some important use-case or if you want some other functionality!

/Simon

Attachment: signature.asc
Description: PGP signature


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]