Name Date Size #Lines LOC

..--

moduli-gen/H29-Jan-2025-544511

LICENCEH A D09-Jul-20249.1 KiB187163

OVERVIEWH A D09-Jul-20246.2 KiB164120

PROTOCOLH A D09-Jul-202427.9 KiB797586

PROTOCOL.agentH A D16-Jul-20244.3 KiB12090

PROTOCOL.certkeysH A D09-Jul-202412.9 KiB323259

PROTOCOL.chacha20poly1305H A D09-Jul-20244.5 KiB10884

PROTOCOL.keyH A D16-Jul-20241.6 KiB7253

PROTOCOL.krlH A D09-Jul-20246.9 KiB223154

PROTOCOL.muxH A D09-Jul-20248.8 KiB298219

PROTOCOL.sshsigH A D09-Jul-20243.3 KiB10174

PROTOCOL.u2fH A D09-Jul-202410.8 KiB310243

READMEH A D09-Jul-2024917 2922

README.lpkH A D09-Jul-202410.6 KiB268218

addr.cH A D16-Jul-202410.1 KiB509385

addr.hH A D09-Jul-20242.4 KiB6543

addrmatch.cH A D09-Jul-20244.5 KiB171110

atomicio.cH A D09-Jul-20244.7 KiB172117

atomicio.hH A D09-Jul-20242.2 KiB5514

auth-bsdauth.cH A D09-Jul-20243.8 KiB14699

auth-krb5.cH A D09-Jul-20248.2 KiB334239

auth-options.cH A D09-Jul-202423.6 KiB913749

auth-options.hH A D09-Jul-20243.2 KiB10840

auth-pam.cH A D16-Jul-202437.2 KiB1,4341,113

auth-pam.hH A D16-Jul-20242 KiB4920

auth-passwd.cH A D09-Jul-20246.1 KiB204127

auth-rhosts.cH A D16-Jul-20249.3 KiB338223

auth-skey.cH A D09-Jul-20242.9 KiB11368

auth.cH A D29-Jan-202522 KiB

auth.hH A D16-Jul-20248 KiB243150

auth2-chall.cH A D09-Jul-202410 KiB398319

auth2-gss.cH A D16-Jul-20249.3 KiB333236

auth2-hostbased.cH A D16-Jul-20247.9 KiB261203

auth2-kbdint.cH A D16-Jul-20242.4 KiB7436

auth2-krb5.cH A D16-Jul-20242.4 KiB8046

auth2-methods.cH A D16-Jul-20243.6 KiB145105

auth2-none.cH A D16-Jul-20242.3 KiB7237

auth2-passwd.cH A D16-Jul-20242.6 KiB8246

auth2-pubkey.cH A D16-Jul-202423.9 KiB826669

auth2-pubkeyfile.cH A D09-Jul-202416.4 KiB587429

auth2.cH A D29-Jan-202522.3 KiB

authfd.cH A D09-Jul-202419.8 KiB781594

authfd.hH A D09-Jul-20244.1 KiB12479

authfile.cH A D09-Jul-202412.5 KiB526393

authfile.hH A D09-Jul-20242.5 KiB5622

bcrypt_pbkdf.cH A D09-Jul-20245.3 KiB17598

bitmap.cH A D29-Jan-20254.6 KiB

bitmap.hH A D09-Jul-20242 KiB5915

blf.hH A D09-Jul-20243.6 KiB9027

blowfish.cH A D09-Jul-202423.2 KiB696586

canohost.cH A D09-Jul-20244 KiB177123

canohost.hH A D09-Jul-2024837 268

chacha.cH A D09-Jul-20245.4 KiB221190

chacha.hH A D09-Jul-20241 KiB3822

channels.cH A D29-Jan-2025145.2 KiB

channels.hH A D29-Jan-202515.2 KiB

cipher-aesctr.cH A D09-Jul-20242.2 KiB8249

cipher-aesctr.hH A D09-Jul-20241.4 KiB3713

cipher-chachapoly-libcrypto.cH A D09-Jul-20244.9 KiB163109

cipher-chachapoly.cH A D09-Jul-20244.1 KiB13582

cipher-chachapoly.hH A D09-Jul-20241.6 KiB4217

cipher-ctr-mt.cH A D09-Jul-202411.2 KiB476319

cipher.cH A D29-Jan-202513.8 KiB

cipher.hH A D09-Jul-20243.2 KiB7934

cleanup.cH A D09-Jul-20241.1 KiB3411

clientloop.cH A D16-Jul-202482.5 KiB2,8562,096

clientloop.hH A D16-Jul-20243.7 KiB8531

compat.cH A D09-Jul-20245.2 KiB168131

compat.hH A D09-Jul-20242.6 KiB6823

crypto_api.hH A D29-Jan-20251.9 KiB

dh.cH A D09-Jul-202415.4 KiB504402

dh.hH A D09-Jul-20242.7 KiB8636

digest-libc.cH A D09-Jul-20245.7 KiB249200

digest-openssl.cH A D09-Jul-20244.8 KiB193147

digest.hH A D09-Jul-20242.6 KiB7232

dispatch.cH A D09-Jul-20243.6 KiB13696

dispatch.hH A D09-Jul-20242 KiB5117

dns.cH A D09-Jul-20249 KiB347248

dns.hH A D09-Jul-20242.1 KiB6126

ed25519.cH A D09-Jul-2024196.9 KiB2,0311,761

ed25519.shH A D16-Jul-20244.1 KiB12095

fatal.cH A D09-Jul-20241.9 KiB4915

fmt_scaled.cH A D09-Jul-20247.4 KiB278174

fmt_scaled.hH A D09-Jul-2024211 75

freezero.cH A D09-Jul-20241.1 KiB3714

getpeereid.cH A D09-Jul-20241.9 KiB5725

getpeereid.hH A D09-Jul-2024304 125

getrrsetbyname.cH A D09-Jul-202413.9 KiB626438

getrrsetbyname.hH A D09-Jul-20243.7 KiB11245

groupaccess.cH A D09-Jul-20243.3 KiB12268

groupaccess.hH A D09-Jul-20241.6 KiB377

gss-genr.cH A D09-Jul-20247.9 KiB303209

gss-serv-krb5.cH A D09-Jul-20245.3 KiB196127

gss-serv.cH A D09-Jul-202410.5 KiB410260

hash.cH A D09-Jul-2024819 4227

hmac.cH A D09-Jul-20245.1 KiB198151

hmac.hH A D09-Jul-20241.7 KiB4015

hostfile.cH A D09-Jul-202424.7 KiB943729

hostfile.hH A D09-Jul-20244.4 KiB12575

includes.hH A D16-Jul-2024462 1913

kex-names.cH A D29-Jan-20258.1 KiB

kex.cH A D29-Jan-202538.9 KiB

kex.hH A D29-Jan-20259.3 KiB

kexc25519.cH A D29-Jan-20255.8 KiB

kexdh.cH A D09-Jul-20245 KiB200158

kexecdh.cH A D09-Jul-20245.6 KiB210165

kexgen.cH A D29-Jan-202510.9 KiB

kexgex.cH A D09-Jul-20243.7 KiB10168

kexgexc.cH A D09-Jul-20247.1 KiB239184

kexgexs.cH A D16-Jul-20246.4 KiB214156

kexmlkem768x25519.cH A D29-Jan-20258.5 KiB

kexsntrup761x25519.cH A D29-Jan-20257.3 KiB

krl.cH A D09-Jul-202435.8 KiB1,3941,162

krl.hH A D09-Jul-20242.7 KiB6938

ldapauth.cH A D09-Jul-202415.9 KiB573385

ldapauth.hH A D09-Jul-20244.5 KiB12674

libcrux_mlkem768_sha3.hH A D29-Jan-2025450.5 KiB

log.cH A D16-Jul-202410.8 KiB463368

log.hH A D16-Jul-20246.4 KiB12493

lpk-user-example.txtH A D09-Jul-20243.7 KiB11896

mac.cH A D09-Jul-20247.3 KiB262209

mac.hH A D09-Jul-20242 KiB5524

match.cH A D29-Jan-20259.6 KiB

match.hH A D09-Jul-20241.3 KiB3214

md-sha256.cH A D09-Jul-20242.1 KiB7746

misc.cH A D16-Jul-202463.7 KiB3,0022,344

misc.hH A D16-Jul-20249.3 KiB264197

mlkem768.shH A D29-Jan-20255.5 KiB

moduliH A D09-Jul-2024573.3 KiB446445

moduli.5H A D09-Jul-20244.7 KiB167166

moduli.cH A D09-Jul-202420.7 KiB812499

monitor.cH A D29-Jan-202552.8 KiB

monitor.hH A D16-Jul-20244.6 KiB11268

monitor_fdpass.cH A D09-Jul-20244.1 KiB158114

monitor_fdpass.hH A D09-Jul-20241.6 KiB365

monitor_wrap.cH A D16-Jul-202430.9 KiB1,238983

monitor_wrap.hH A D16-Jul-20244.1 KiB11062

msg.cH A D16-Jul-20242.9 KiB9963

msg.hH A D09-Jul-20241.5 KiB346

mux.cH A D29-Jan-202562.7 KiB

myproposal.hH A D29-Jan-20254 KiB

namespace.hH A D09-Jul-20243.7 KiB9997

nchan.cH A D29-Jan-202511.9 KiB

nchan.msH A D09-Jul-20243.9 KiB10174

nchan2.msH A D09-Jul-20243.4 KiB9064

openssh-lpk_openldap.schemaH A D09-Jul-2024537 2016

openssh-lpk_sun.schemaH A D09-Jul-2024609 2218

packet.cH A D29-Jan-202575.3 KiB

packet.hH A D29-Jan-20257.4 KiB

pathnames.hH A D16-Jul-20245.8 KiB16354

pfilter.cH A D29-Jan-2025934

pfilter.hH A D09-Jul-2024118 52

pkcs11.hH A D09-Jul-202441.4 KiB1,3591,119

poly1305.cH A D09-Jul-20244.7 KiB160120

poly1305.hH A D09-Jul-2024712 2411

progressmeter.cH A D09-Jul-20247.9 KiB312226

progressmeter.hH A D09-Jul-20241.5 KiB303

random.hH A D09-Jul-20241.6 KiB353

readconf.cH A D29-Jan-2025109.3 KiB

readconf.hH A D09-Jul-20249.9 KiB279208

readpass.cH A D16-Jul-20248.5 KiB335257

readpassphrase.3H A D09-Jul-20243.6 KiB119113

readpassphrase.cH A D09-Jul-20244.6 KiB153100

readpassphrase.hH A D09-Jul-20242.2 KiB4914

recallocarray.cH A D09-Jul-20242.4 KiB9249

rijndael.cH A D09-Jul-202451.7 KiB1,1301,009

rijndael.hH A D09-Jul-20241.7 KiB4511

sandbox-pledge.cH A D09-Jul-20241.9 KiB7646

sandbox-rlimit.cH A D09-Jul-20242.3 KiB8952

scp.1H A D09-Jul-20248 KiB328327

scp.cH A D16-Jul-202452.6 KiB2,2221,807

servconf.cH A D29-Jan-2025110.4 KiB

servconf.hH A D29-Jan-202512.5 KiB

serverloop.cH A D16-Jul-202428.6 KiB921698

serverloop.hH A D09-Jul-20241 KiB305

session.cH A D16-Jul-202462.4 KiB2,5281,893

session.hH A D09-Jul-20242.7 KiB8849

sftp-client.cH A D16-Jul-202478.7 KiB2,9912,421

sftp-client.hH A D09-Jul-20246.5 KiB20378

sftp-common.cH A D09-Jul-20247.1 KiB269213

sftp-common.hH A D09-Jul-20242.1 KiB5520

sftp-glob.cH A D09-Jul-20243.8 KiB15899

sftp-realpath.cH A D09-Jul-20246 KiB226148

sftp-server-main.cH A D09-Jul-20241.6 KiB5529

sftp-server.8H A D09-Jul-20245 KiB172171

sftp-server.cH A D16-Jul-202451.1 KiB2,0671,759

sftp-usergroup.cH A D09-Jul-20245.8 KiB253199

sftp-usergroup.hH A D09-Jul-20241.1 KiB264

sftp.1H A D09-Jul-202417 KiB729728

sftp.cH A D16-Jul-202463.8 KiB2,6922,219

sftp.hH A D09-Jul-20243.4 KiB10355

sk-api.hH A D09-Jul-20242.8 KiB10263

sk-usbhid.cH A D09-Jul-202434.7 KiB1,3411,203

smult_curve25519_ref.cH A D09-Jul-20246.8 KiB269229

sntrup761.cH A D29-Jan-202578.1 KiB

sntrup761.shH A D29-Jan-20253.6 KiB

srclimit.cH A D29-Jan-202514.9 KiB

srclimit.hH A D29-Jan-20251.6 KiB

ssh-add.1H A D16-Jul-202410.5 KiB350349

ssh-add.cH A D29-Jan-202527 KiB

ssh-agent.1H A D09-Jul-20248.1 KiB276275

ssh-agent.cH A D09-Jul-202465.2 KiB2,4992,098

ssh-dss.cH A D09-Jul-202411.8 KiB456377

ssh-ecdsa-sk.cH A D29-Jan-202513.8 KiB

ssh-ecdsa.cH A D29-Jan-202513.9 KiB

ssh-ed25519-sk.cH A D09-Jul-20247.7 KiB290240

ssh-ed25519.cH A D09-Jul-20247.9 KiB314262

ssh-gss.hH A D16-Jul-20244.2 KiB12075

ssh-keygen.1H A D29-Jan-202541.1 KiB

ssh-keygen.cH A D29-Jan-2025107.6 KiB

ssh-keyscan.1H A D16-Jul-20244.8 KiB190189

ssh-keyscan.cH A D29-Jan-202519.1 KiB

ssh-keysign.8H A D16-Jul-20242.9 KiB9392

ssh-keysign.cH A D16-Jul-20248.3 KiB317236

ssh-pkcs11-client.cH A D29-Jan-202517.9 KiB

ssh-pkcs11-helper.8H A D09-Jul-20241.8 KiB7372

ssh-pkcs11-helper.cH A D29-Jan-202510.5 KiB

ssh-pkcs11.cH A D29-Jan-202547.1 KiB

ssh-pkcs11.hH A D09-Jul-20241.8 KiB4622

ssh-rsa.cH A D29-Jan-202516 KiB

ssh-sandbox.hH A D09-Jul-20241.1 KiB255

ssh-sk-client.cH A D09-Jul-202411.3 KiB474404

ssh-sk-helper.8H A D09-Jul-20241.7 KiB7271

ssh-sk-helper.cH A D09-Jul-202410 KiB358279

ssh-sk.cH A D29-Jan-202522.5 KiB

ssh-sk.hH A D09-Jul-20242.7 KiB8027

ssh-xmss.cH A D09-Jul-202410.2 KiB387329

ssh.1H A D29-Jan-202546.3 KiB

ssh.cH A D09-Jul-202475.1 KiB2,5571,990

ssh.hH A D09-Jul-20242.9 KiB10721

ssh2.hH A D09-Jul-20245.9 KiB18281

ssh_api.cH A D29-Jan-202515.1 KiB

ssh_api.hH A D09-Jul-20244.4 KiB13931

ssh_configH A D09-Jul-20241.8 KiB5548

ssh_config.5H A D29-Jan-202567.3 KiB

sshbuf-getput-basic.cH A D09-Jul-202412.3 KiB632526

sshbuf-getput-crypto.cH A D29-Jan-20254.5 KiB

sshbuf-io.cH A D09-Jul-20242.9 KiB11987

sshbuf-misc.cH A D09-Jul-20247.1 KiB307259

sshbuf.cH A D29-Jan-20259.9 KiB

sshbuf.hH A D29-Jan-202513.7 KiB

sshconnect.cH A D16-Jul-202451.4 KiB1,7981,387

sshconnect.hH A D16-Jul-20243.3 KiB10259

sshconnect2.cH A D29-Jan-202568.4 KiB

sshd-session.cH A D29-Jan-202539.6 KiB

sshd.8H A D29-Jan-202531.3 KiB

sshd.cH A D29-Jan-202547.5 KiB

sshd_configH A D09-Jul-20244 KiB148120

sshd_config.5H A D29-Jan-202564.9 KiB

ssherr.cH A D09-Jul-20245.4 KiB161142

ssherr.hH A D09-Jul-20243.4 KiB9265

sshkey-xmss.cH A D09-Jul-202429.8 KiB1,110971

sshkey-xmss.hH A D09-Jul-20242.9 KiB5828

sshkey.cH A D29-Jan-202592.3 KiB

sshkey.hH A D29-Jan-202512.6 KiB

sshlogin.cH A D09-Jul-20248.5 KiB296203

sshlogin.hH A D09-Jul-2024851 215

sshpty.cH A D09-Jul-20245 KiB199136

sshpty.hH A D09-Jul-20241.1 KiB3010

sshsig.cH A D09-Jul-202429.5 KiB1,1601,002

sshsig.hH A D09-Jul-20244 KiB11236

sshtty.cH A D09-Jul-20243.1 KiB9853

ttymodes.cH A D09-Jul-20249.4 KiB426310

ttymodes.hH A D09-Jul-20244.9 KiB169102

uidswap.cH A D09-Jul-20244.9 KiB15699

uidswap.hH A D09-Jul-2024746 193

umac.cH A D09-Jul-202445.5 KiB1,304784

umac.hH A D09-Jul-20244.6 KiB13142

umac128.cH A D09-Jul-2024340 127

utf8.cH A D09-Jul-20247.1 KiB312216

utf8.hH A D09-Jul-20241.4 KiB3212

version.hH A D29-Jan-2025528

xmalloc.cH A D09-Jul-20242.6 KiB11986

xmalloc.hH A D09-Jul-20241.2 KiB3010

xmss_commons.cH A D09-Jul-2024696 3220

xmss_commons.hH A D09-Jul-2024441 187

xmss_fast.cH A D09-Jul-202432.2 KiB1,104731

xmss_fast.hH A D09-Jul-20243.7 KiB11248

xmss_hash.cH A D09-Jul-20243.4 KiB13795

xmss_hash.hH A D09-Jul-2024869 229

xmss_hash_address.cH A D09-Jul-20241.3 KiB6439

xmss_hash_address.hH A D09-Jul-2024846 4011

xmss_wots.cH A D09-Jul-20244.8 KiB191132

xmss_wots.hH A D09-Jul-20241.8 KiB6016

README

1This release of OpenSSH is for OpenBSD systems only.
2
3Please read
4	http://www.openssh.com/portable.html
5if you want to install OpenSSH on other operating systems.
6
7To extract and install this release on your OpenBSD system use:
8
9      # cd /usr/src/usr.bin
10      # tar xvfz .../openssh-x.y.tgz
11      # cd ssh
12      # make obj
13      # make cleandir
14      # make depend
15      # make
16      # make install
17      # cp ssh_config sshd_config /etc/ssh
18
19OpenSSH is a derivative of the original and free ssh 1.2.12 release
20by Tatu Ylonen.  Aaron Campbell, Bob Beck, Markus Friedl, Niels
21Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer
22features and created OpenSSH.  Markus Friedl contributed the support
23for SSH protocol versions 1.5 and 2.0.
24
25See http://www.openssh.com/ for more information.
26
27$OpenBSD: README,v 1.7 2006/04/01 05:37:46 djm Exp $
28$NetBSD: README,v 1.5 2016/12/25 00:07:46 christos Exp $
29

README.lpk

1OpenSSH LDAP PUBLIC KEY PATCH
2Copyright (c) 2003 Eric AUGE (eau@phear.org)
3All rights reserved.
4
5Redistribution and use in source and binary forms, with or without
6modification, are permitted provided that the following conditions
7are met:
81. Redistributions of source code must retain the above copyright
9   notice, this list of conditions and the following disclaimer.
102. Redistributions in binary form must reproduce the above copyright
11   notice, this list of conditions and the following disclaimer in the
12   documentation and/or other materials provided with the distribution.
133. The name of the author may not be used to endorse or promote products
14   derived from this software without specific prior written permission.
15
16THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27purposes of this patch:
28
29This patch would help to have authentication centralization policy
30using ssh public key authentication.
31This patch could be an alternative to other "secure" authentication system
32working in a similar way (Kerberos, SecurID, etc...), except the fact
33that it's based on OpenSSH and its public key abilities.
34
35>> FYI: <<
36'uid': means unix accounts existing on the current server
37'lpkServerGroup:' mean server group configured on the current server ('lpkServerGroup' in sshd_config)
38
39example schema:
40
41
42                                  server1 (uid: eau,rival,toto) (lpkServerGroup: unix)
43                ___________      /
44               /           \ --- - server3 (uid: eau, titi) (lpkServerGroup: unix)
45              | LDAP Server |    \
46	      | eau  ,rival |     server2 (uid: rival, eau) (lpkServerGroup: unix)
47	      | titi ,toto  |
48	      | userx,....  |         server5 (uid: eau)  (lpkServerGroup: mail)
49               \___________/ \       /
50	                       ----- - server4 (uid: eau, rival)  (no group configured)
51			             \
52				        etc...
53
54- WHAT WE NEED :
55
56  * configured LDAP server somewhere on the network (i.e. OpenLDAP)
57  * patched sshd (with this patch ;)
58  * LDAP user(/group) entry (look at users.ldif (& groups.ldif)):
59        User entry:
60	- attached to the 'ldapPublicKey' objectclass
61	- attached to the 'posixAccount' objectclass
62	- with a filled 'sshPublicKey' attribute
63	Example:
64		dn: uid=eau,ou=users,dc=cuckoos,dc=net
65		objectclass: top
66		objectclass: person
67		objectclass: organizationalPerson
68		objectclass: posixAccount
69		objectclass: ldapPublicKey
70		description: Eric AUGE Account
71		userPassword: blah
72		cn: Eric AUGE
73		sn: Eric AUGE
74		uid: eau
75		uidNumber: 1034
76		gidNumber: 1
77		homeDirectory: /export/home/eau
78		sshPublicKey: ssh-dss AAAAB3...
79		sshPublicKey: ssh-dss AAAAM5...
80
81	Group entry:
82	- attached to the 'posixGroup' objectclass
83	- with a 'cn' groupname attribute
84	- with multiple 'memberUid' attributes filled with usernames allowed in this group
85	Example:
86		# few members
87		dn: cn=unix,ou=groups,dc=cuckoos,dc=net
88		objectclass: top
89		objectclass: posixGroup
90		description: Unix based servers group
91		cn: unix
92		gidNumber: 1002
93		memberUid: eau
94		memberUid: user1
95		memberUid: user2
96
97
98- HOW IT WORKS :
99
100  * without patch
101  If a user wants to authenticate to log in a server the sshd, will first look for authentication method allowed (RSAauth,kerberos,etc..)
102  and if RSAauth and tickets based auth fails, it will fallback to standard password authentication (if enabled).
103
104  * with the patch
105  If a user want to authenticate to log in a server, the sshd will first look for auth method including LDAP pubkey, if the ldappubkey options is enabled.
106  It will do an ldapsearch to get the public key directly from the LDAP instead of reading it from the server filesystem.
107  (usually in $HOME/.ssh/authorized_keys)
108
109  If groups are enabled, it will also check if the user that wants to login is in the group of the server he is trying to log into.
110  If it fails, it falls back on RSA auth files ($HOME/.ssh/authorized_keys), etc.. and finally to standard password authentication (if enabled).
111
112  7 tokens are added to sshd_config :
113  # here is the new patched ldap related tokens
114  # entries in your LDAP must be posixAccount & strongAuthenticationUser & posixGroup
115  UseLPK yes								# look the pub key into LDAP
116  LpkServers ldap://10.31.32.5/ ldap://10.31.32.4 ldap://10.31.32.3	# which LDAP server for users ? (URL format)
117  LpkUserDN  ou=users,dc=foobar,dc=net					# which base DN for users ?
118  LpkGroupDN ou=groups,dc=foobar,dc=net					# which base DN for groups ?
119  LpkBindDN cn=manager,dc=foobar,dc=net					# which bind DN ?
120  LpkBindPw asecret							# bind DN credidentials
121  LpkServerGroup agroupname						# the group the server is part of
122
123  Right now i'm using anonymous binding to get public keys, because getting public keys of someone doesn't impersonate him� but there is some
124  flaws you have to take care of.
125
126- HOW TO INSERT A USER/KEY INTO AN LDAP ENTRY
127
128  * my way (there is plenty :)
129  - create ldif file (i.e. users.ldif)
130  - cat ~/.ssh/id_dsa.pub OR cat ~/.ssh/id_rsa.pub OR cat ~/.ssh/identity.pub
131  - my way in 4 steps :
132  Example:
133
134  # you add this to the user entry in the LDIF file :
135  [...]
136  objectclass: posixAccount
137  objectclass: ldapPublicKey
138  [...]
139  sshPubliKey: ssh-dss AAAABDh12DDUR2...
140  [...]
141
142  # insert your entry and you're done :)
143  ldapadd -D balblabla -w bleh < file.ldif
144
145  all standard options can be present in the 'sshPublicKey' attribute.
146
147- WHY :
148
149  Simply because, i was looking for a way to centralize all sysadmins authentication, easily,  without completely using LDAP
150  as authentication method (like pam_ldap etc..).
151
152  After looking into Kerberos, SecurID, and other centralized secure authentications systems, the use of RSA and LDAP to get
153  public key for authentication allows us to control who has access to which server (the user needs an account and to be in 'strongAuthenticationUser'
154  objectclass within LDAP and part of the group the SSH server is in).
155
156  Passwords update are no longer a nightmare for a server farm (key pair passphrase is stored on each user's box and private key is locally encrypted using his passphrase
157  so each user can change it as much as he wants).
158
159  Blocking a user account can be done directly from the LDAP (if sshd is using RSAAuth + ldap only).
160
161- RULES :
162  Entry in the LDAP server must respect 'posixAccount' and 'ldapPublicKey' which are defined in core.schema.
163  and the additionnal lpk.schema.
164
165  This patch could allow a smooth transition between standard auth (/etc/passwd) and complete LDAP based authentication
166  (pamldap, nss_ldap, etc..).
167
168  This can be an alternative to other (old?/expensive?) authentication methods (Kerberos/SecurID/..).
169
170  Referring to schema at the beginning of this file if user 'eau' is only in group 'unix'
171  'eau' would ONLY access 'server1', 'server2', 'server3' AND 'server4' BUT NOT 'server5'.
172  If you then modify the LDAP 'mail' group entry to add 'memberUid: eau' THEN user 'eau' would be able
173  to log in 'server5' (i hope you got the idea, my english is bad :).
174
175  Each server's sshd is patched and configured to ask the public key and the group infos in the LDAP
176  server.
177  When you want to allow a new user to have access to the server parc, you just add him an account on
178  your servers, you add his public key into his entry on the LDAP server, it's done.
179
180  Because sshds are looking public keys into the LDAP directly instead of a file ($HOME/.ssh/authorized_keys).
181
182  When the user needs to change his passphrase he can do it directly from his workstation by changing
183  his own key set lock passphrase, and all servers are automatically aware.
184
185  With a CAREFUL LDAP server configuration you could allow a user to add/delete/modify his own entry himself
186  so he can add/modify/delete himself his public key when needed.
187
188� FLAWS :
189  LDAP must be well configured, getting the public key of some user is not a problem, but if anonymous LDAP
190  allow write to users dn, somebody could replace someuser's public key by its own and impersonate some
191  of your users in all your server farm be VERY CAREFUL.
192
193  MITM attack when sshd is requesting the public key, could lead to a compromise of your servers allowing login
194  as the impersonnated user.
195
196  If LDAP server is down then, fallback on passwd auth.
197
198  the ldap code part has not been well audited yet.
199
200- LDAP USER ENTRY EXAMPLES (LDIF Format, look in users.ldif)
201    --- CUT HERE ---
202    dn: uid=jdoe,ou=users,dc=foobar,dc=net
203    objectclass: top
204    objectclass: person
205    objectclass: organizationalPerson
206    objectclass: posixAccount
207    objectclass: ldapPublicKey
208    description: My account
209    cn: John Doe
210    sn: John Doe
211    uid: jdoe
212    uidNumber: 100
213    gidNumber: 100
214    homeDirectory: /home/jdoe
215    sshPublicKey: ssh-dss AAAAB3NzaC1kc3MAAAEBAOvL8pREUg9wSy/8+hQJ54YF3AXkB0OZrXB....
216    [...]
217    --- CUT HERE ---
218
219- LDAP GROUP ENTRY EXAMPLES (LDIF Format, look in groups.ldif)
220    --- CUT HERE ---
221    dn: cn=unix,ou=groups,dc=cuckoos,dc=net
222    objectclass: top
223    objectclass: posixGroup
224    description: Unix based servers group
225    cn: unix
226    gidNumber: 1002
227    memberUid: jdoe
228    memberUid: user1
229    memberUid: user2
230    [...]
231    --- CUT HERE ---
232
233>> FYI: <<
234Multiple 'sshPublicKey' in a user entry are allowed, as well as multiple 'memberUid' attributes in a group entry
235
236- COMPILING:
237  1. Apply the patch
238  2. ./configure --with-your-options --with-ldap=/prefix/to/ldap_libs_and_includes
239  3. make
240  4. it's done.
241
242- BLA :
243  I hope this could help, and i hope to be clear enough,, or give ideas.  questions/comments/improvements are welcome.
244
245- TODO :
246  Redesign differently.
247
248- DOCS/LINK :
249  http://pacsec.jp/core05/psj05-barisani-en.pdf
250  http://fritz.potsdam.edu/projects/openssh-lpk/
251  http://fritz.potsdam.edu/projects/sshgate/
252  http://dev.inversepath.com/trac/openssh-lpk
253  http://lam.sf.net/ ( http://lam.sourceforge.net/documentation/supportedSchemas.htm )
254
255- CONTRIBUTORS/IDEAS/GREETS :
256  - Falk Siemonsmeier.
257  - Jacob Rief.
258  - Michael Durchgraf.
259  - frederic peters.
260  - Finlay dobbie.
261  - Stefan Fisher.
262  - Robin H. Johnson.
263  - Adrian Bridgett.
264
265- CONTACT :
266  - Eric AUGE <eau@phear.org>
267  - Andrea Barisani <andrea@inversepath.com>
268