Skip to content

Commit 03efc94

Browse files
committed
Update test_ldap_person to correct jupyterhub
1 parent 485026e commit 03efc94

28 files changed

+3185
-75
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
"""A simple jupyter config file for testing the authenticator."""
2+
# from ldap_hooks import setup_ldap_entry_hook
3+
# from ldap_hooks import LDAP
4+
c = get_config()
5+
6+
c.JupyterHub.authenticator_class = 'jhubauthenticators.HeaderAuthenticator'
7+
c.JupyterHub.spawner_class = 'dockerspawner.Dockerspawner'
8+
9+
# c.Spawner.pre_spawn_hook = setup_ldap_entry_hook
10+
11+
# LDAP.url = 'http://127.0.0.1'
12+
# LDAP.user = 'cn=admin,dc=example,dc=org'
13+
# LDAP.password = 'dummyldap_password'
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Bootstrap schemas, for a container started without an existing ldap config.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
objectclass ( 2.25.254185546955548845187682617152348290622 NAME 'X-certsDistinguishedName' SUP top STRUCTURAL
2+
DESC 'An object containing the attributes
3+
for a common 509 Distinguished Name'
4+
MUST cn
5+
MAY ( c $ st $ l $ o $ ou $ emailAddress ) )
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Mandriva Management Console (MMC) ldap schemas, delete the forlder if not needed ;)

tests/configs/openldap/mount_schema/mmc/dhcp.schema

Lines changed: 466 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# A schema for storing DNS zones in LDAP
2+
#
3+
attributetype ( 1.3.6.1.4.1.2428.20.0.0 NAME 'dNSTTL'
4+
DESC 'An integer denoting time to live'
5+
EQUALITY integerMatch
6+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 )
7+
8+
attributetype ( 1.3.6.1.4.1.2428.20.0.1 NAME 'dNSClass'
9+
DESC 'The class of a resource record'
10+
EQUALITY caseIgnoreIA5Match
11+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
12+
13+
attributetype ( 1.3.6.1.4.1.2428.20.0.2 NAME 'zoneName'
14+
DESC 'The name of a zone, i.e. the name of the highest node in the zone'
15+
EQUALITY caseIgnoreIA5Match
16+
SUBSTR caseIgnoreIA5SubstringsMatch
17+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
18+
19+
attributetype ( 1.3.6.1.4.1.2428.20.0.3 NAME 'relativeDomainName'
20+
DESC 'The starting labels of a domain name'
21+
EQUALITY caseIgnoreIA5Match
22+
SUBSTR caseIgnoreIA5SubstringsMatch
23+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
24+
25+
attributetype ( 1.3.6.1.4.1.2428.20.1.12 NAME 'pTRRecord'
26+
DESC 'domain name pointer, RFC 1035'
27+
EQUALITY caseIgnoreIA5Match
28+
SUBSTR caseIgnoreIA5SubstringsMatch
29+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
30+
31+
attributetype ( 1.3.6.1.4.1.2428.20.1.13 NAME 'hInfoRecord'
32+
DESC 'host information, RFC 1035'
33+
EQUALITY caseIgnoreIA5Match
34+
SUBSTR caseIgnoreIA5SubstringsMatch
35+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
36+
37+
attributetype ( 1.3.6.1.4.1.2428.20.1.14 NAME 'mInfoRecord'
38+
DESC 'mailbox or mail list information, RFC 1035'
39+
EQUALITY caseIgnoreIA5Match
40+
SUBSTR caseIgnoreIA5SubstringsMatch
41+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
42+
43+
attributetype ( 1.3.6.1.4.1.2428.20.1.16 NAME 'tXTRecord'
44+
DESC 'text string, RFC 1035'
45+
EQUALITY caseIgnoreIA5Match
46+
SUBSTR caseIgnoreIA5SubstringsMatch
47+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
48+
49+
attributetype ( 1.3.6.1.4.1.2428.20.1.18 NAME 'aFSDBRecord'
50+
DESC 'for AFS Data Base location, RFC 1183'
51+
EQUALITY caseIgnoreIA5Match
52+
SUBSTR caseIgnoreIA5SubstringsMatch
53+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
54+
55+
attributetype ( 1.3.6.1.4.1.2428.20.1.24 NAME 'SigRecord'
56+
DESC 'Signature, RFC 2535'
57+
EQUALITY caseIgnoreIA5Match
58+
SUBSTR caseIgnoreIA5SubstringsMatch
59+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
60+
61+
attributetype ( 1.3.6.1.4.1.2428.20.1.25 NAME 'KeyRecord'
62+
DESC 'Key, RFC 2535'
63+
EQUALITY caseIgnoreIA5Match
64+
SUBSTR caseIgnoreIA5SubstringsMatch
65+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
66+
67+
attributetype ( 1.3.6.1.4.1.2428.20.1.28 NAME 'aAAARecord'
68+
DESC 'IPv6 address, RFC 1886'
69+
EQUALITY caseIgnoreIA5Match
70+
SUBSTR caseIgnoreIA5SubstringsMatch
71+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
72+
73+
attributetype ( 1.3.6.1.4.1.2428.20.1.29 NAME 'LocRecord'
74+
DESC 'Location, RFC 1876'
75+
EQUALITY caseIgnoreIA5Match
76+
SUBSTR caseIgnoreIA5SubstringsMatch
77+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
78+
79+
attributetype ( 1.3.6.1.4.1.2428.20.1.30 NAME 'nXTRecord'
80+
DESC 'non-existant, RFC 2535'
81+
EQUALITY caseIgnoreIA5Match
82+
SUBSTR caseIgnoreIA5SubstringsMatch
83+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
84+
85+
attributetype ( 1.3.6.1.4.1.2428.20.1.33 NAME 'sRVRecord'
86+
DESC 'service location, RFC 2782'
87+
EQUALITY caseIgnoreIA5Match
88+
SUBSTR caseIgnoreIA5SubstringsMatch
89+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
90+
91+
attributetype ( 1.3.6.1.4.1.2428.20.1.35 NAME 'nAPTRRecord'
92+
DESC 'Naming Authority Pointer, RFC 2915'
93+
EQUALITY caseIgnoreIA5Match
94+
SUBSTR caseIgnoreIA5SubstringsMatch
95+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
96+
97+
attributetype ( 1.3.6.1.4.1.2428.20.1.36 NAME 'kXRecord'
98+
DESC 'Key Exchange Delegation, RFC 2230'
99+
EQUALITY caseIgnoreIA5Match
100+
SUBSTR caseIgnoreIA5SubstringsMatch
101+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
102+
103+
attributetype ( 1.3.6.1.4.1.2428.20.1.37 NAME 'certRecord'
104+
DESC 'certificate, RFC 2538'
105+
EQUALITY caseIgnoreIA5Match
106+
SUBSTR caseIgnoreIA5SubstringsMatch
107+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
108+
109+
attributetype ( 1.3.6.1.4.1.2428.20.1.38 NAME 'a6Record'
110+
DESC 'A6 Record Type, RFC 2874'
111+
EQUALITY caseIgnoreIA5Match
112+
SUBSTR caseIgnoreIA5SubstringsMatch
113+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
114+
115+
attributetype ( 1.3.6.1.4.1.2428.20.1.39 NAME 'dNameRecord'
116+
DESC 'Non-Terminal DNS Name Redirection, RFC 2672'
117+
EQUALITY caseIgnoreIA5Match
118+
SUBSTR caseIgnoreIA5SubstringsMatch
119+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
120+
121+
attributetype ( 1.3.6.1.4.1.2428.20.1.43 NAME 'dSRecord'
122+
DESC 'Delegation Signer, RFC 3658'
123+
EQUALITY caseIgnoreIA5Match
124+
SUBSTR caseIgnoreIA5SubstringsMatch
125+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
126+
127+
attributetype ( 1.3.6.1.4.1.2428.20.1.44 NAME 'sSHFPRecord'
128+
DESC 'SSH Key Fingerprint, draft-ietf-secsh-dns-05.txt'
129+
EQUALITY caseIgnoreIA5Match
130+
SUBSTR caseIgnoreIA5SubstringsMatch
131+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
132+
133+
attributetype ( 1.3.6.1.4.1.2428.20.1.46 NAME 'rRSIGRecord'
134+
DESC 'RRSIG, RFC 3755'
135+
EQUALITY caseIgnoreIA5Match
136+
SUBSTR caseIgnoreIA5SubstringsMatch
137+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
138+
139+
attributetype ( 1.3.6.1.4.1.2428.20.1.47 NAME 'nSECRecord'
140+
DESC 'NSEC, RFC 3755'
141+
EQUALITY caseIgnoreIA5Match
142+
SUBSTR caseIgnoreIA5SubstringsMatch
143+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26 )
144+
145+
objectclass ( 1.3.6.1.4.1.2428.20.3 NAME 'dNSZone'
146+
SUP top STRUCTURAL
147+
MUST ( zoneName $ relativeDomainName )
148+
MAY ( DNSTTL $ DNSClass $
149+
ARecord $ MDRecord $ MXRecord $ NSRecord $
150+
SOARecord $ CNAMERecord $ PTRRecord $ HINFORecord $
151+
MINFORecord $ TXTRecord $ AFSDBRecord $ SIGRecord $
152+
KEYRecord $ AAAARecord $ LOCRecord $ NXTRecord $
153+
SRVRecord $ NAPTRRecord $ KXRecord $ CERTRecord $
154+
A6Record $ DNAMERecord $ DSRecord $ SSHFPRecord $
155+
RRSIGRecord $ NSECRecord ) )
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
##
2+
## Needed attributes for MMC Mail Plugin
3+
##
4+
## Cédric Delfosse (cdelfosse@mandriva.com)
5+
## Matthieu Vogelweith (mvogelweith@mandriva.com)
6+
## Jean-Philippe Braun (jpbraun@mandriva.com)
7+
8+
# Attributes
9+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.1
10+
NAME 'maildrop'
11+
DESC 'Mail addresses where mails are forwarded -- ie forwards'
12+
EQUALITY caseIgnoreMatch
13+
SUBSTR caseIgnoreSubstringsMatch
14+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{512})
15+
16+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.2
17+
NAME 'mailalias'
18+
DESC 'Mail addresses accepted by this account -- ie aliases'
19+
EQUALITY caseIgnoreMatch
20+
SUBSTR caseIgnoreSubstringsMatch
21+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{512})
22+
23+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.3
24+
NAME 'mailenable'
25+
DESC 'Mail Account / Virtual alias validity'
26+
EQUALITY caseIgnoreMatch
27+
SUBSTR caseIgnoreSubstringsMatch
28+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{8})
29+
30+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.4
31+
NAME 'mailbox'
32+
DESC 'Mailbox path where mails are delivered'
33+
EQUALITY caseIgnoreMatch
34+
SUBSTR caseIgnoreSubstringsMatch
35+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{512})
36+
37+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.5
38+
NAME 'virtualdomain'
39+
DESC 'A mail domain name'
40+
EQUALITY caseIgnoreMatch
41+
SUBSTR caseIgnoreSubstringsMatch
42+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{512})
43+
44+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.6
45+
NAME 'virtualdomaindescription'
46+
DESC 'Virtual domain description'
47+
EQUALITY caseIgnoreMatch
48+
SUBSTR caseIgnoreSubstringsMatch
49+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{512})
50+
51+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.7
52+
NAME 'mailuserquota'
53+
DESC 'Mailbox quota for a user in kilo-bytes'
54+
EQUALITY integerMatch
55+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.27 SINGLE-VALUE )
56+
57+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.8
58+
NAME 'mailhost'
59+
DESC 'The mail server IP address or FQDN for a user'
60+
EQUALITY caseIgnoreIA5Match
61+
SUBSTR caseIgnoreIA5SubstringsMatch
62+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE)
63+
64+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.9
65+
NAME 'mailaliasmember'
66+
DESC 'Member of a virtual alias'
67+
SUP distinguishedName )
68+
69+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.10
70+
NAME 'mailproxy'
71+
DESC 'Mail proxy'
72+
EQUALITY caseIgnoreIA5Match
73+
SUBSTR caseIgnoreIA5SubstringsMatch
74+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{256} SINGLE-VALUE)
75+
76+
attributetype ( 1.3.6.1.4.1.21103.1.1.13.11
77+
NAME 'mailhidden'
78+
DESC 'Mail Account hidden in address book'
79+
EQUALITY caseIgnoreMatch
80+
SUBSTR caseIgnoreSubstringsMatch
81+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{8})
82+
83+
# Mail Account Objectclass
84+
objectclass ( 1.3.6.1.4.1.21103.1.2.13.1
85+
NAME 'mailAccount'
86+
DESC 'Mail Account'
87+
SUP top
88+
AUXILIARY
89+
MUST (
90+
mail
91+
)
92+
MAY (
93+
mailalias $ maildrop $ mailenable $ mailbox $ mailuserquota $
94+
mailhost $ mailproxy $ mailhidden
95+
)
96+
)
97+
98+
# Mail Domain Objectclass
99+
objectclass ( 1.3.6.1.4.1.21103.1.2.13.2
100+
NAME 'mailDomain'
101+
DESC 'Domain mail entry'
102+
SUP top
103+
STRUCTURAL
104+
MUST (
105+
virtualdomain
106+
)
107+
MAY (
108+
virtualdomaindescription $ mailuserquota
109+
)
110+
)
111+
112+
# Mail Group Objectclass
113+
objectclass ( 1.3.6.1.4.1.21103.1.2.13.3
114+
NAME 'mailGroup' SUP top AUXILIARY
115+
DESC 'Mail Group'
116+
MUST ( mail )
117+
MAY ( mailhidden )
118+
)
119+
120+
# Virtual Alias Objectclass
121+
objectclass ( 1.3.6.1.4.1.21103.1.2.13.4
122+
NAME 'mailAlias'
123+
DESC 'Mail Alias'
124+
SUP top
125+
STRUCTURAL
126+
MUST ( mailalias )
127+
MAY ( mail $ mailaliasmember $ mailenable )
128+
)
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
##
2+
## Needed attributes for MMC (Mandriva Management Console)
3+
##
4+
## Version 01
5+
##
6+
## J�r�me Wax (jerome.wax@linbox.com)
7+
##
8+
9+
# Attributes
10+
attributetype ( 1.3.6.1.4.1.40098.1.1.12.1 NAME 'lmcACL'
11+
DESC 'LMC acl entry'
12+
EQUALITY caseIgnoreMatch
13+
SUBSTR caseIgnoreSubstringsMatch
14+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
15+
16+
attributetype ( 1.3.6.1.4.1.40098.1.1.12.2 NAME 'lmcPrefMode'
17+
DESC 'LMC user preferences'
18+
EQUALITY caseIgnoreMatch
19+
SUBSTR caseIgnoreSubstringsMatch
20+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.15 SINGLE-VALUE)
21+
22+
attributetype ( 1.3.6.1.4.1.40098.1.1.12.3 NAME 'lmcPrinterAllowed'
23+
DESC 'LMC a printer where the user has the rights to print'
24+
EQUALITY caseIgnoreIA5Match
25+
SUBSTR caseIgnoreSubstringsMatch
26+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26)
27+
28+
# Objectclass
29+
objectclass ( 1.3.6.1.4.1.40098.1.2.1.19.1 NAME 'lmcUserObject' AUXILIARY
30+
DESC 'Objectclass for LMC user settings '
31+
MAY ( lmcACL $ lmcPrefMode $ lmcPrinterAllowed ))
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#
2+
# LDAP Public Key Patch schema for use with openssh-ldappubkey
3+
# Author: Eric AUGE <eau@phear.org>
4+
#
5+
# Based on the proposal of : Mark Ruijter
6+
#
7+
8+
9+
# octetString SYNTAX
10+
attributetype ( 1.3.6.1.4.1.24552.500.1.1.1.13 NAME 'sshPublicKey'
11+
DESC 'MANDATORY: OpenSSH Public key'
12+
EQUALITY octetStringMatch
13+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )
14+
15+
# printableString SYNTAX yes|no
16+
objectclass ( 1.3.6.1.4.1.24552.500.1.1.2.0 NAME 'ldapPublicKey' SUP top AUXILIARY
17+
DESC 'MANDATORY: OpenSSH LPK objectclass'
18+
MAY ( sshPublicKey $ uid )
19+
)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
##
2+
## schema file for Unix Quotas
3+
## Schema for storing Unix Quotas in LDAP
4+
## OIDs are owned by Cogent Innovators, LLC
5+
##
6+
## 1.3.6.1.4.1.19937.1.1.x - attributetypes
7+
## 1.3.6.1.4.1.19937.1.2.x - objectclasses
8+
##
9+
10+
attributetype ( 1.3.6.1.4.1.19937.1.1.1 NAME 'quota'
11+
DESC 'Quotas (FileSystem:BlocksSoft,BlocksHard,InodesSoft,InodesHard)'
12+
EQUALITY caseIgnoreIA5Match
13+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} )
14+
15+
attributetype ( 1.3.6.1.4.1.19937.1.1.2 NAME 'networkquota'
16+
DESC 'Network Quotas (network,protocol,bytes)'
17+
EQUALITY caseIgnoreIA5Match
18+
SYNTAX 1.3.6.1.4.1.1466.115.121.1.26{255} )
19+
20+
objectclass ( 1.3.6.1.4.1.19937.1.2.1 NAME 'systemQuotas' SUP posixAccount AUXILIARY
21+
DESC 'System Quotas'
22+
MUST ( uid )
23+
MAY ( quota $ networkquota ))
24+
25+
objectclass ( 1.3.6.1.4.1.19937.1.2.2 NAME 'defaultQuotas'
26+
DESC 'Quota defaults to apply to members of a group'
27+
SUP top AUXILIARY
28+
MUST ( cn )
29+
MAY ( quota $ networkquota ))

0 commit comments

Comments
 (0)