1PAM_U2F(8)                   PAM U2F Module Manual                  PAM_U2F(8)
2
3
4

NAME

6       pam_u2f - Module for U2F authentication
7

SYNOPSIS

9       pam_u2f [...]
10

DESCRIPTION

12       The module provides U2F authentication against Yubikeys and other
13       compliant authenticators.
14

OPTIONS

16       debug
17           Enables debug output
18
19       debug_file
20           Filename to write debugging messages to.  If this file is missing,
21           nothing will be logged. This regular file has to be created by the
22           user or must exist and be a regular file for anything getting
23           logged to it. It is not created by pam-u2f on purpose (for security
24           considerations). This filename may be alternatively set to "stderr"
25           (default), "stdout", or "syslog".
26
27       origin=origin
28           Set the relying party ID for the FIDO authentication procedure. If
29           no value is specified, the identifier "pam://$HOSTNAME" is used.
30
31       appid=appid
32           Set the application ID for the U2F authentication procedure. If no
33           value is specified, the same value used for origin is taken
34           ("pam://$HOSTNAME" if also origin is not specified). This setting
35           is only applicable for U2F credentials created with pamu2fcfg
36           versions v1.0.8 or earlier. Note that on v1.1.0 and v1.1.1 of
37           pam-u2f, handling of this setting was temporarily broken if the
38           value was not the same as the value of origin.
39
40       authfile=file
41           Set the location of the file that holds the mappings of user names
42           to keyHandles and user keys. An individual (per user) file may be
43           configured relative to the users' home dirs, e.g. ".ssh/u2f_keys".
44           If not specified, the location defaults to
45           $XDG_CONFIG_HOME/Yubico/u2f_keys. If $XDG_CONFIG_HOME is not set,
46           $HOME/.config/Yubico/u2f_keys is used. The authfile format is
47           <username>:<KeyHandle1>,<UserKey1>,<CoseType1>,<Options1>:<KeyHandle2>,<UserKey2>,<CoseType2>,<Options2>:...
48
49       authpending_file=file
50           Set the location of the file that is used for touch request
51           notifications. This file will be opened when pam-u2f starts waiting
52           for a user to touch the device, and will be closed when it no
53           longer waits for a touch. Use inotify to listen on these events, or
54           a more high-level tool like yubikey-touch-detector. Default value:
55           /var/run/user/$UID/pam-u2f-authpending. Set an empty value in order
56           to disable this functionality, like so: "authpending_file=".
57
58       nouserok
59           Set to enable authentication attempts to succeed even if the user
60           trying to authenticate is not found inside authfile or if authfile
61           is missing/malformed.
62
63       openasuser
64           Setuid to the authenticating user when opening the authfile. Useful
65           when the user’s home is stored on an NFS volume mounted with the
66           root_squash option (which maps root to nobody which will not be
67           able to read the file). Note that after release 1.0.8 this is done
68           by default when no global authfile or XDG_CONFIG_HOME environment
69           variable has been set.
70
71       alwaysok
72           Set to enable all authentication attempts to succeed (aka
73           presentation mode).
74
75       max_devices=n_devices
76           Maximum number of devices allowed per user (default is 24). Devices
77           specified in the authentication file that exceed this value will be
78           ignored.
79
80       interactive
81           Set to prompt a message and wait before testing the presence of a
82           U2F device. Recommended if your device doesn’t have tactile
83           trigger.
84
85       [prompt=your prompt here]
86           Set individual prompt message for interactive mode. Watch the
87           square brackets around this parameter to get spaces correctly
88           recognized by PAM.
89
90       manual
91           Set to drop to a manual console where challenges are printed on
92           screen and response read from standard input. Useful for debugging
93           and SSH sessions without U2F-support from the SSH client/server. If
94           enabled, interactive mode becomes redundant and has no effect.
95
96       cue
97           Set to prompt a message to remind to touch the device.
98
99       [cue_prompt=your prompt here]
100           Set individual prompt message for the cue option. Watch the square
101           brackets around this parameter to get spaces correctly recognized
102           by PAM.
103
104       nodetect
105           Skip detecting if a suitable key is inserted before performing a
106           full authentication. See NOTES below.
107
108       userpresence=int
109           If 1, require user presence during authentication. If 0, do not
110           request user presence during authentication. Otherwise, fallback to
111           the authenticator’s default behaviour.
112
113       userverification=int
114           If 1, require user verification during authentication. If 0, do not
115           request user verification during authentication. Otherwise,
116           fallback to the authenticator’s default behaviour.
117
118       pinverification=int
119           If 1, require PIN verification during authentication. If 0, do not
120           request PIN verification during authentication. Otherwise, fallback
121           to the authenticator’s default behaviour.
122
123       sshformat
124           Use credentials produced by versions of OpenSSH that have support
125           for FIDO devices. It is not possible to mix native credentials and
126           SSH credentials. Once this option is enabled all credentials will
127           be parsed as SSH.
128

EXAMPLES

130       auth sufficient pam_u2f.so debug origin=pam://$HOSTNAME
131       appid=pam://$HOSTNAME
132
133       auth required pam_u2f.so origin=http://example.com
134       appid=http://example.com authfile=/etc/yubikey_mappings
135

CAVEATS

137       By default the mapping file inside a home directory will be opened as
138       the target user, whereas the central file will be opened as "root". If
139       the "XDG_CONFIG_HOME" variable is set, privileges will not be dropped
140       unless the "openasuser" configuration setting is set.
141
142       Using pam-u2f to secure the login to a computer while storing the
143       mapping file in an encrypted home directory, will result in the
144       impossibility of logging into the system. The partition is decrypted
145       after login and the mapping file can not be accessed.
146

NOTES

148       Nodetect
149
150       The "nodetect" option should be used with caution. pam_u2f checks that
151       a key configured for the user is inserted before performing the full
152       tactile authentication. This detection is done by sending a
153       "check-only" authentication request to all inserted tokens to so see if
154       at least one of them responds affirmatively to one or more of the
155       keyhandles configured for the user. By doing this, pam_u2f can avoid
156       emitting the "cue" prompt (if configured), which can cause some
157       confusing UI issues if the cue is emitted followed by the underlying
158       library immediately failing the tactile authentication. This option is
159       also useful to avoid an unintended 1-second delay prior to the tactile
160       authentication caused by versions of libu2f-host <= 1.1.5.
161
162       If pam_u2f is configured to "cue" and "nodetect", an attacker can
163       determine that pam_u2f is part of the authentication stack by inserting
164       any random U2F token and performing an authentication attempt. In this
165       scenario, the attacker would see the cue message followed by an
166       immediate failure, whereas with detection enabled, the U2F
167       authentication will fail silently. Understand that an attacker could
168       choose a U2F token that alerts him or her in some way to the
169       "check-only" authentication attempt, so this precaution only pushes the
170       issue back a step.
171
172       In summary, the detection feature was added to avoid confusing UI
173       issues and to prevent leaking information about the authentication
174       stack in very specific scenario when "cue" is configured. The
175       "nodetect" option was added to avoid buggy sleep behavior in older
176       versions of libu2f-host and for hypothetical tokens that do not
177       tolerate the double authentication. Detection is performed, and
178       likewise "nodetect" honored, regardless of whether "cue" is also
179       specified.
180
181       SELinux
182
183       Due to an issue with Fedora Linux, and possibly with other
184       distributions that use SELinux, a system configured with pam-u2f may
185       end up in a situation where access to the credentials file is denied.
186       If the nouserok option is also set, this will result in a successful
187       authentication within the module, without using the FIDO authenticator.
188
189       In order to correctly update the security context the command fixfiles
190       onboot should be used on existing installations
191
192       Moreover, to allow read access to an authfile or directory placed in a
193       non-standard location, the command
194
195           # chcon -R -t auth_home_t /path/to/authfile
196
197       should be used.
198
199       For more information see
200       https://access.redhat.com/security/cve/CVE-2020-24612.
201

BUGS

203       Report pam-u2f bugs in the issue tracker:
204       https://github.com/Yubico/pam-u2f/issues
205

SEE ALSO

207       pam(7)
208
209       The pam-u2f home page: https://developers.yubico.com/pam-u2f/
210
211       YubiKeys can be obtained from Yubico: http://www.yubico.com/
212
213
214
215pam-u2f                          Version 1.2.0                      PAM_U2F(8)
Impressum