Debian Codegraph @

README

raw
1 This is the README of the PKCS #11 PAM Login Module
2 ======================================================================
3
4 Authors: Mario Strasser <[email protected]>
5 Juan Antonio Martinez <[email protected]>
6 Ludovic Rouseau <[email protected]>
7 Frank Morgner <[email protected]>
8 Paul Wolneykien <[email protected]>
9
10 This Linux-PAM login module allows a X.509 certificate based user
11 login. The certificate and its dedicated private key are thereby
12 accessed by means of an appropriate PKCS #11 module. For the
13 verification of the users' certificates, locally stored CA
14 certificates as well as either online or locally accessible CRLs are
15 used.
16
17 Detailed information about the Linux-PAM system can be found in [1],
18 [2] and [3]. The specification of the Cryptographic Token Interface
19 Standard (PKCS #11) is available at [4].
20
21
22 PKCS #11 Module Requirements
23 ----------------------------------------------------------------------
24 The PKCS #11 modules must fulfill the requirements given by the RSA
25 Asymmetric Client Signing Profile, which has been specified in the
26 PKCS #11 Conformance Profile Specification [5] by RSA Laboratories.
27
28
29 User Matching
30 ----------------------------------------------------------------------
31 To approve the ownership of a certificate, that is to allow the owner
32 of a certificate to login as a particular user Several modules
33 are provided. See README.mappers file in doc directory
34
35 [Note: This is still a work in progress, any suggestions for
36 improvements or alternative matching algorithms are welcome.]
37
38
39 Installation
40 ----------------------------------------------------------------------
41
42 bash# tar xvzf pam_pkcs11-X.Y.Z.tar.gz
43 bash# cd pam_pkcs11-X.Y.Z
44 bash# ./configure
45 bash# make
46 bash# sudo make install
47
48
49 Configuration
50
51 1- Create a directory /etc/pam_pkcs11
52 2- Copy $(base)/etc/pam_pkcs11.conf.example to /etc/pam_pkcs11/ and personalize
53 3- Create crls and cacerts directories according with configuration file,
54 and fill them with proper data
55 4- Choose one or more mappers to install, set up configuration file, and
56 if needed configure mappers
57
58 The file etc/pam_pkcs11.conf is fully auto-documented, to allow you easy
59 editing
60
61 5- setup /etc/pam.d/xxx entries
62
63 ----------------------------------------------------------------------
64 To make use of the PKCS #11 login module replace the line
65
66 auth requisite pam_unix2.so ...
67
68 with
69
70 auth requisite pam_pkcs11.so ...
71
72 in the pam configuration files.
73
74 Some mappers doesn't map to an existing user. To allow correct login,
75 you may need to install also pam-mkhomedir in session pam stack
76 See http://www.kernel.org/pub/linux/libs/pam for details
77
78 The following options are recognised for pam-pkcs11.so:
79
80 debug
81 Enable debugging support.
82
83 config_file
84 To specify up configuration file ( default /etc/pam_pkcs11/pam_pkcs11.conf )
85
86 Next options should be taken from configuration file, but is up to the
87 user to specify them from command line. If so, it takes precedence over
88 configuration file
89
90 nullok
91 Allow empty passwords.
92
93 use_first_pass
94 Do not prompt the user for the passwords but take them from the
95 PAM_ items instead.
96
97 try_first_pass
98 Do not prompt the user for the passwords unless PAM_(OLD)AUTHTOK
99 is unset.
100
101 use_authtok
102 Like try_first_pass, but fail if the new PAM_AUTHTOK has not been
103 previously set (intended for stacking password modules only).
104
105 card_only
106 Always try to get the userid from the certificate, don't prompt for the user name if
107 the card is present, and if the token is present, then we must use it to authenticate.
108
109 wait_for_card
110 This option needs card_only to be set. This will make the system wait for the
111 token to be inserted on login, or after login it will require the same token be
112 inserted to unlock the system.
113
114
115 Next options are pkcs11 module specific
116
117 pkcs11_module=<file>
118 Filename of the PKCS #11 module. The default value is
119 /etc/pam_pkcs11/pkcs11_module.so.
120 Note that this option takes precedence over "module" entry
121 in proper pkcs11_module section, but this section is still needed
122
123 slot_num=<nr>
124 Slot-number to use. One for the first, two for the second and so
125 on. The default value is zero which means to use the first slot
126 with an available token.
127
128 ca_dir=<path>
129 Path to the directory where the CA certificates are stored. The
130 directory must contain an openssl hash-link to each certificate.
131 The default value is /etc/pam_pkcs11/cacerts.
132
133 crl_dir=<path>
134 Path to the directory where the CRLs are stored. The directory
135 must contain an openssl hash-link to each CRL. The default value
136 is /etc/pam_pkcs11/crls.
137
138 crl_policy={none, online, offline, auto}
139 Sets the CRL verification policy. None performs no verification
140 at all, online downloads the CRL form the location given by the
141 CRL distribution point extension of the certificate and offline
142 uses the locally stored CRLs. Auto is a combination of online and
143 offline; it first tries to download the CRL from a possibly
144 given CRL distribution point and if this fails, uses the local
145 CRLs. The default setting is none.
146
147 Example:
148
149 auth sufficient pam_pkcs11.so config_file=/etc/pam_pkcs11/pam_pkcs11.conf
150
151 or ( avoid if possible )
152
153 auth sufficient pam_pkcs11.so nullok debug try_first_pass \
154 pkcs11_module=/usr/lib/pkcs11/pkcs11_module.so \
155 ca_dir=/etc/cacerts/ crl_dir=/etc/cacerts/ crl_policy=auto
156
157
158 Contact
159 ----------------------------------------------------------------------
160
161 Any comments, suggestions and bug reports are welcome. Please, mention
162 the keywords 'pkcs' and 'pam' in the subject.
163
164 Mario Strasser <[email protected]>
165 Juan Antonio Martinez <[email protected]>
166
167
168 References
169 ----------------------------------------------------------------------
170
171 [1] The Linux-PAM System Administrators' Guide
172 http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam.html
173
174 [2] The Linux-PAM Module Writers' Guide
175 http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam_modules.html
176
177 [3] The Linux-PAM Application Developers' Guide
178 http://www.kernel.org/pub/linux/libs/pam/Linux-PAM-html/pam_appl.html
179
180 [4] PKCS #11 - Cryptographic Token Interface Standard
181 http://www.rsasecurity.com/rsalabs/pkcs/pkcs-11/
182
183 [5] PKCS #11: Conformance Profile Specification
184 http://www.rsasecurity.com/rsalabs/pkcs/pkcs-11/
185