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