]> git.argeo.org Git - lgpl/argeo-commons.git/blob - org.argeo.util/src/org/argeo/util/naming/LdapAttrs.java
Include Java services files
[lgpl/argeo-commons.git] / org.argeo.util / src / org / argeo / util / naming / LdapAttrs.java
1 package org.argeo.util.naming;
2
3 import java.util.function.Supplier;
4
5 /**
6 * Standard LDAP attributes as per:<br>
7 * - <a href= "https://www.ldap.com/ldap-oid-reference">Standard LDAP</a><br>
8 * - <a href=
9 * "https://github.com/krb5/krb5/blob/master/src/plugins/kdb/ldap/libkdb_ldap/kerberos.schema">Kerberos
10 * LDAP (partial)</a>
11 */
12 public enum LdapAttrs implements SpecifiedName, Supplier<String> {
13 /** */
14 uid("0.9.2342.19200300.100.1.1", "RFC 4519"),
15 /** */
16 mail("0.9.2342.19200300.100.1.3", "RFC 4524"),
17 /** */
18 info("0.9.2342.19200300.100.1.4", "RFC 4524"),
19 /** */
20 drink("0.9.2342.19200300.100.1.5", "RFC 4524"),
21 /** */
22 roomNumber("0.9.2342.19200300.100.1.6", "RFC 4524"),
23 /** */
24 photo("0.9.2342.19200300.100.1.7", "RFC 2798"),
25 /** */
26 userClass("0.9.2342.19200300.100.1.8", "RFC 4524"),
27 /** */
28 host("0.9.2342.19200300.100.1.9", "RFC 4524"),
29 /** */
30 manager("0.9.2342.19200300.100.1.10", "RFC 4524"),
31 /** */
32 documentIdentifier("0.9.2342.19200300.100.1.11", "RFC 4524"),
33 /** */
34 documentTitle("0.9.2342.19200300.100.1.12", "RFC 4524"),
35 /** */
36 documentVersion("0.9.2342.19200300.100.1.13", "RFC 4524"),
37 /** */
38 documentAuthor("0.9.2342.19200300.100.1.14", "RFC 4524"),
39 /** */
40 documentLocation("0.9.2342.19200300.100.1.15", "RFC 4524"),
41 /** */
42 homePhone("0.9.2342.19200300.100.1.20", "RFC 4524"),
43 /** */
44 secretary("0.9.2342.19200300.100.1.21", "RFC 4524"),
45 /** */
46 dc("0.9.2342.19200300.100.1.25", "RFC 4519"),
47 /** */
48 associatedDomain("0.9.2342.19200300.100.1.37", "RFC 4524"),
49 /** */
50 associatedName("0.9.2342.19200300.100.1.38", "RFC 4524"),
51 /** */
52 homePostalAddress("0.9.2342.19200300.100.1.39", "RFC 4524"),
53 /** */
54 personalTitle("0.9.2342.19200300.100.1.40", "RFC 4524"),
55 /** */
56 mobile("0.9.2342.19200300.100.1.41", "RFC 4524"),
57 /** */
58 pager("0.9.2342.19200300.100.1.42", "RFC 4524"),
59 /** */
60 co("0.9.2342.19200300.100.1.43", "RFC 4524"),
61 /** */
62 uniqueIdentifier("0.9.2342.19200300.100.1.44", "RFC 4524"),
63 /** */
64 organizationalStatus("0.9.2342.19200300.100.1.45", "RFC 4524"),
65 /** */
66 buildingName("0.9.2342.19200300.100.1.48", "RFC 4524"),
67 /** */
68 audio("0.9.2342.19200300.100.1.55", "RFC 2798"),
69 /** */
70 documentPublisher("0.9.2342.19200300.100.1.56", "RFC 4524"),
71 /** */
72 jpegPhoto("0.9.2342.19200300.100.1.60", "RFC 2798"),
73 /** */
74 vendorName("1.3.6.1.1.4", "RFC 3045"),
75 /** */
76 vendorVersion("1.3.6.1.1.5", "RFC 3045"),
77 /** */
78 entryUUID("1.3.6.1.1.16.4", "RFC 4530"),
79 /** */
80 entryDN("1.3.6.1.1.20", "RFC 5020"),
81 /** */
82 labeledURI("1.3.6.1.4.1.250.1.57", "RFC 2798"),
83 /** */
84 numSubordinates("1.3.6.1.4.1.453.16.2.103", "draft-ietf-boreham-numsubordinates"),
85 /** */
86 namingContexts("1.3.6.1.4.1.1466.101.120.5", "RFC 4512"),
87 /** */
88 altServer("1.3.6.1.4.1.1466.101.120.6", "RFC 4512"),
89 /** */
90 supportedExtension("1.3.6.1.4.1.1466.101.120.7", "RFC 4512"),
91 /** */
92 supportedControl("1.3.6.1.4.1.1466.101.120.13", "RFC 4512"),
93 /** */
94 supportedSASLMechanisms("1.3.6.1.4.1.1466.101.120.14", "RFC 4512"),
95 /** */
96 supportedLDAPVersion("1.3.6.1.4.1.1466.101.120.15", "RFC 4512"),
97 /** */
98 ldapSyntaxes("1.3.6.1.4.1.1466.101.120.16", "RFC 4512"),
99 /** */
100 supportedAuthPasswordSchemes("1.3.6.1.4.1.4203.1.3.3", "RFC 3112"),
101 /** */
102 authPassword("1.3.6.1.4.1.4203.1.3.4", "RFC 3112"),
103 /** */
104 supportedFeatures("1.3.6.1.4.1.4203.1.3.5", "RFC 4512"),
105 /** */
106 inheritable("1.3.6.1.4.1.7628.5.4.1", "draft-ietf-ldup-subentry"),
107 /** */
108 blockInheritance("1.3.6.1.4.1.7628.5.4.2", "draft-ietf-ldup-subentry"),
109 /** */
110 objectClass("2.5.4.0", "RFC 4512"),
111 /** */
112 aliasedObjectName("2.5.4.1", "RFC 4512"),
113 /** */
114 cn("2.5.4.3", "RFC 4519"),
115 /** */
116 sn("2.5.4.4", "RFC 4519"),
117 /** */
118 serialNumber("2.5.4.5", "RFC 4519"),
119 /** */
120 c("2.5.4.6", "RFC 4519"),
121 /** */
122 l("2.5.4.7", "RFC 4519"),
123 /** */
124 st("2.5.4.8", "RFC 4519"),
125 /** */
126 street("2.5.4.9", "RFC 4519"),
127 /** */
128 o("2.5.4.10", "RFC 4519"),
129 /** */
130 ou("2.5.4.11", "RFC 4519"),
131 /** */
132 title("2.5.4.12", "RFC 4519"),
133 /** */
134 description("2.5.4.13", "RFC 4519"),
135 /** */
136 searchGuide("2.5.4.14", "RFC 4519"),
137 /** */
138 businessCategory("2.5.4.15", "RFC 4519"),
139 /** */
140 postalAddress("2.5.4.16", "RFC 4519"),
141 /** */
142 postalCode("2.5.4.17", "RFC 4519"),
143 /** */
144 postOfficeBox("2.5.4.18", "RFC 4519"),
145 /** */
146 physicalDeliveryOfficeName("2.5.4.19", "RFC 4519"),
147 /** */
148 telephoneNumber("2.5.4.20", "RFC 4519"),
149 /** */
150 telexNumber("2.5.4.21", "RFC 4519"),
151 /** */
152 teletexTerminalIdentifier("2.5.4.22", "RFC 4519"),
153 /** */
154 facsimileTelephoneNumber("2.5.4.23", "RFC 4519"),
155 /** */
156 x121Address("2.5.4.24", "RFC 4519"),
157 /** */
158 internationalISDNNumber("2.5.4.25", "RFC 4519"),
159 /** */
160 registeredAddress("2.5.4.26", "RFC 4519"),
161 /** */
162 destinationIndicator("2.5.4.27", "RFC 4519"),
163 /** */
164 preferredDeliveryMethod("2.5.4.28", "RFC 4519"),
165 /** */
166 member("2.5.4.31", "RFC 4519"),
167 /** */
168 owner("2.5.4.32", "RFC 4519"),
169 /** */
170 roleOccupant("2.5.4.33", "RFC 4519"),
171 /** */
172 seeAlso("2.5.4.34", "RFC 4519"),
173 /** */
174 userPassword("2.5.4.35", "RFC 4519"),
175 /** */
176 userCertificate("2.5.4.36", "RFC 4523"),
177 /** */
178 cACertificate("2.5.4.37", "RFC 4523"),
179 /** */
180 authorityRevocationList("2.5.4.38", "RFC 4523"),
181 /** */
182 certificateRevocationList("2.5.4.39", "RFC 4523"),
183 /** */
184 crossCertificatePair("2.5.4.40", "RFC 4523"),
185 /** */
186 name("2.5.4.41", "RFC 4519"),
187 /** */
188 givenName("2.5.4.42", "RFC 4519"),
189 /** */
190 initials("2.5.4.43", "RFC 4519"),
191 /** */
192 generationQualifier("2.5.4.44", "RFC 4519"),
193 /** */
194 x500UniqueIdentifier("2.5.4.45", "RFC 4519"),
195 /** */
196 dnQualifier("2.5.4.46", "RFC 4519"),
197 /** */
198 enhancedSearchGuide("2.5.4.47", "RFC 4519"),
199 /** */
200 distinguishedName("2.5.4.49", "RFC 4519"),
201 /** */
202 uniqueMember("2.5.4.50", "RFC 4519"),
203 /** */
204 houseIdentifier("2.5.4.51", "RFC 4519"),
205 /** */
206 supportedAlgorithms("2.5.4.52", "RFC 4523"),
207 /** */
208 deltaRevocationList("2.5.4.53", "RFC 4523"),
209 /** */
210 createTimestamp("2.5.18.1", "RFC 4512"),
211 /** */
212 modifyTimestamp("2.5.18.2", "RFC 4512"),
213 /** */
214 creatorsName("2.5.18.3", "RFC 4512"),
215 /** */
216 modifiersName("2.5.18.4", "RFC 4512"),
217 /** */
218 subschemaSubentry("2.5.18.10", "RFC 4512"),
219 /** */
220 dITStructureRules("2.5.21.1", "RFC 4512"),
221 /** */
222 dITContentRules("2.5.21.2", "RFC 4512"),
223 /** */
224 matchingRules("2.5.21.4", "RFC 4512"),
225 /** */
226 attributeTypes("2.5.21.5", "RFC 4512"),
227 /** */
228 objectClasses("2.5.21.6", "RFC 4512"),
229 /** */
230 nameForms("2.5.21.7", "RFC 4512"),
231 /** */
232 matchingRuleUse("2.5.21.8", "RFC 4512"),
233 /** */
234 structuralObjectClass("2.5.21.9", "RFC 4512"),
235 /** */
236 governingStructureRule("2.5.21.10", "RFC 4512"),
237 /** */
238 carLicense("2.16.840.1.113730.3.1.1", "RFC 2798"),
239 /** */
240 departmentNumber("2.16.840.1.113730.3.1.2", "RFC 2798"),
241 /** */
242 employeeNumber("2.16.840.1.113730.3.1.3", "RFC 2798"),
243 /** */
244 employeeType("2.16.840.1.113730.3.1.4", "RFC 2798"),
245 /** */
246 changeNumber("2.16.840.1.113730.3.1.5", "draft-good-ldap-changelog"),
247 /** */
248 targetDN("2.16.840.1.113730.3.1.6", "draft-good-ldap-changelog"),
249 /** */
250 changeType("2.16.840.1.113730.3.1.7", "draft-good-ldap-changelog"),
251 /** */
252 changes("2.16.840.1.113730.3.1.8", "draft-good-ldap-changelog"),
253 /** */
254 newRDN("2.16.840.1.113730.3.1.9", "draft-good-ldap-changelog"),
255 /** */
256 deleteOldRDN("2.16.840.1.113730.3.1.10", "draft-good-ldap-changelog"),
257 /** */
258 newSuperior("2.16.840.1.113730.3.1.11", "draft-good-ldap-changelog"),
259 /** */
260 ref("2.16.840.1.113730.3.1.34", "RFC 3296"),
261 /** */
262 changelog("2.16.840.1.113730.3.1.35", "draft-good-ldap-changelog"),
263 /** */
264 preferredLanguage("2.16.840.1.113730.3.1.39", "RFC 2798"),
265 /** */
266 userSMIMECertificate("2.16.840.1.113730.3.1.40", "RFC 2798"),
267 /** */
268 userPKCS12("2.16.840.1.113730.3.1.216", "RFC 2798"),
269 /** */
270 displayName("2.16.840.1.113730.3.1.241", "RFC 2798"),
271
272 // Sun memberOf
273 memberOf("1.2.840.113556.1.2.102", "389 DS memberOf"),
274
275 // KERBEROS (partial)
276 krbPrincipalName("2.16.840.1.113719.1.301.6.8.1", "Novell Kerberos Schema Definitions"),
277
278 // RFC 2985 and RFC 3039 (partial)
279 dateOfBirth("1.3.6.1.5.5.7.9.1", "RFC 2985"),
280 /** */
281 placeOfBirth("1.3.6.1.5.5.7.9.2", "RFC 2985"),
282 /** */
283 gender("1.3.6.1.5.5.7.9.3", "RFC 2985"),
284 /** */
285 countryOfCitizenship("1.3.6.1.5.5.7.9.4", "RFC 2985"),
286 /** */
287 countryOfResidence("1.3.6.1.5.5.7.9.5", "RFC 2985"),
288 //
289 ;
290
291 public final static String DN = "dn";
292
293 // private final static String LDAP_ = "ldap:";
294
295 private final String oid, spec;
296
297 LdapAttrs(String oid, String spec) {
298 this.oid = oid;
299 this.spec = spec;
300 }
301
302 @Override
303 public String getID() {
304 return oid;
305 }
306
307 @Override
308 public String getSpec() {
309 return spec;
310 }
311
312 public String getPrefix() {
313 return prefix();
314 }
315
316 public static String prefix() {
317 return "ldap";
318 }
319
320 @Deprecated
321 public String property() {
322 return get();
323 }
324
325 @Deprecated
326 public String qualified() {
327 return get();
328 }
329
330 public String get() {
331 String prefix = getPrefix();
332 return prefix != null ? prefix + ":" + name() : name();
333 }
334
335 public String getNamespace() {
336 return namespace();
337 }
338
339 public static String namespace() {
340 return "http://www.argeo.org/ns/ldap";
341 }
342
343 @Override
344 public final String toString() {
345 // must return the name
346 return name();
347 }
348
349 }