001 /*
002 * CDDL HEADER START
003 *
004 * The contents of this file are subject to the terms of the
005 * Common Development and Distribution License, Version 1.0 only
006 * (the "License"). You may not use this file except in compliance
007 * with the License.
008 *
009 * You can obtain a copy of the license at
010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE
011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE.
012 * See the License for the specific language governing permissions
013 * and limitations under the License.
014 *
015 * When distributing Covered Code, include this CDDL HEADER in each
016 * file and include the License file at
017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
018 * add the following below this CDDL HEADER, with the fields enclosed
019 * by brackets "[]" replaced with your own identifying information:
020 * Portions Copyright [yyyy] [name of copyright owner]
021 *
022 * CDDL HEADER END
023 *
024 *
025 * Copyright 2006-2008 Sun Microsystems, Inc.
026 */
027 package org.opends.server.extensions;
028
029
030
031 /**
032 * This class defines a number of constants that may be used by Directory Server
033 * extensions.
034 */
035 public class ExtensionsConstants
036 {
037 /**
038 * The authentication password scheme name for use with passwords encoded in a
039 * salted MD5 representation.
040 */
041 public static final String AUTH_PASSWORD_SCHEME_NAME_SALTED_MD5 = "MD5";
042
043
044
045 /**
046 * The authentication password scheme name for use with passwords encoded in a
047 * salted SHA-1 representation.
048 */
049 public static final String AUTH_PASSWORD_SCHEME_NAME_SALTED_SHA_1 = "SHA1";
050
051
052
053 /**
054 * The authentication password scheme name for use with passwords encoded in a
055 * salted SHA-256 representation.
056 */
057 public static final String AUTH_PASSWORD_SCHEME_NAME_SALTED_SHA_256 =
058 "SHA256";
059
060
061
062 /**
063 * The authentication password scheme name for use with passwords encoded in a
064 * salted SHA-384 representation.
065 */
066 public static final String AUTH_PASSWORD_SCHEME_NAME_SALTED_SHA_384 =
067 "SHA384";
068
069
070
071 /**
072 * The authentication password scheme name for use with passwords encoded in a
073 * salted SHA-512 representation.
074 */
075 public static final String AUTH_PASSWORD_SCHEME_NAME_SALTED_SHA_512 =
076 "SHA512";
077
078
079
080 /**
081 * The name of the message digest algorithm that should be used to generate
082 * MD5 hashes.
083 */
084 public static final String MESSAGE_DIGEST_ALGORITHM_MD5 = "MD5";
085
086
087
088 /**
089 * The name of the message digest algorithm that should be used to generate
090 * SHA-1 hashes.
091 */
092 public static final String MESSAGE_DIGEST_ALGORITHM_SHA_1 = "SHA-1";
093
094
095
096 /**
097 * The name of the message digest algorithm that should be used to generate
098 * 256-bit SHA-2 hashes.
099 */
100 public static final String MESSAGE_DIGEST_ALGORITHM_SHA_256 = "SHA-256";
101
102
103
104 /**
105 * The name of the message digest algorithm that should be used to generate
106 * 384-bit SHA-2 hashes.
107 */
108 public static final String MESSAGE_DIGEST_ALGORITHM_SHA_384 = "SHA-384";
109
110
111
112 /**
113 * The name of the message digest algorithm that should be used to generate
114 * 512-bit SHA-2 hashes.
115 */
116 public static final String MESSAGE_DIGEST_ALGORITHM_SHA_512 = "SHA-512";
117
118
119
120 /**
121 * The cipher transformation that should be used when performing 3DES
122 * encryption/decription.
123 */
124 public static final String CIPHER_TRANSFORMATION_3DES =
125 "DESede/CFB/NoPadding";
126
127
128
129 /**
130 * The cipher transformation that should be used when performing AES
131 * encryption/decription.
132 */
133 public static final String CIPHER_TRANSFORMATION_AES = "AES/CFB/NoPadding";
134
135
136
137 /**
138 * The cipher transformation that should be used when performing blowfish
139 * encryption/decription.
140 */
141 public static final String CIPHER_TRANSFORMATION_BLOWFISH =
142 "Blowfish/CFB/NoPadding";
143
144
145
146 /**
147 * The cipher transformation that should be used when performing RC4
148 * encryption/decription.
149 *
150 * TODO: https://opends.dev.java.net/issues/show_bug.cgi?id=2471
151 */
152 public static final String CIPHER_TRANSFORMATION_RC4 = "RC4/NONE/NoPadding";
153
154
155
156 /**
157 * The key size (in bits) that should be used for the encryption key when
158 * using the 3DES cipher.
159 */
160 public static final int KEY_SIZE_3DES = 168;
161
162
163
164 /**
165 * The key size (in bits) that should be used for the encryption key when
166 * using the AES cipher.
167 * TODO: https://opends.dev.java.net/issues/show_bug.cgi?id=2475
168 */
169 public static final int KEY_SIZE_AES = 128;
170
171
172
173 /**
174 * The key size (in bits) that should be used for the encryption key when
175 * using the Blowfish cipher.
176 * TODO: https://opends.dev.java.net/issues/show_bug.cgi?id=2475
177 */
178 public static final int KEY_SIZE_BLOWFISH = 128;
179
180
181
182 /**
183 * The key size (in bits) that should be used for the encryption key when
184 * using the RC4 cipher.
185 * TODO: https://opends.dev.java.net/issues/show_bug.cgi?id=2475
186 */
187 public static final int KEY_SIZE_RC4 = 128;
188
189
190
191 /**
192 * The password storage scheme name that will be used for passwords that are
193 * stored in 3DES-encrypted form.
194 */
195 public static final String STORAGE_SCHEME_NAME_3DES = "3DES";
196
197
198
199 /**
200 * The password storage scheme name that will be used for passwords that are
201 * stored in AES-encrypted form.
202 */
203 public static final String STORAGE_SCHEME_NAME_AES = "AES";
204
205
206
207 /**
208 * The password storage scheme name that will be used for passwords that are
209 * stored in base64-encoded form (virtually no protection, but the value is
210 * reversible).
211 */
212 public static final String STORAGE_SCHEME_NAME_BASE64 = "BASE64";
213
214
215
216 /**
217 * The password storage scheme name that will be used for passwords that are
218 * stored in Blowfish-encrypted form.
219 */
220 public static final String STORAGE_SCHEME_NAME_BLOWFISH = "BLOWFISH";
221
222
223
224 /**
225 * The password storage scheme name that will be used for passwords that are
226 * not encoded or obscured in any way.
227 */
228 public static final String STORAGE_SCHEME_NAME_CLEAR = "CLEAR";
229
230
231
232 /**
233 * The password storage scheme name that will be used for passwords stored in
234 * an MD5 representation.
235 */
236 public static final String STORAGE_SCHEME_NAME_MD5 = "MD5";
237
238
239
240 /**
241 * The password storage scheme name that will be used for passwords that are
242 * stored in RC4-encrypted form.
243 */
244 public static final String STORAGE_SCHEME_NAME_RC4 = "RC4";
245
246
247
248 /**
249 * The password storage scheme name that will be used for passwords stored in
250 * a salted MD5 representation.
251 */
252 public static final String STORAGE_SCHEME_NAME_SALTED_MD5 = "SMD5";
253
254
255
256 /**
257 * The password storage scheme name that will be used for passwords stored in
258 * a SHA-1 representation.
259 */
260 public static final String STORAGE_SCHEME_NAME_SHA_1 = "SHA";
261
262
263
264 /**
265 * The password storage scheme name that will be used for passwords stored in
266 * a salted SHA-1 representation.
267 */
268 public static final String STORAGE_SCHEME_NAME_SALTED_SHA_1 = "SSHA";
269
270
271
272 /**
273 * The password storage scheme name that will be used for passwords stored in
274 * a salted SHA-256 representation.
275 */
276 public static final String STORAGE_SCHEME_NAME_SALTED_SHA_256 = "SSHA256";
277
278
279
280 /**
281 * The password storage scheme name that will be used for passwords stored in
282 * a salted SHA-384 representation.
283 */
284 public static final String STORAGE_SCHEME_NAME_SALTED_SHA_384 = "SSHA384";
285
286
287
288 /**
289 * The password storage scheme name that will be used for passwords stored in
290 * a salted SHA-512 representation.
291 */
292 public static final String STORAGE_SCHEME_NAME_SALTED_SHA_512 = "SSHA512";
293
294
295
296 /**
297 * The password storage scheme name that will be used for passwords stored in
298 * a UNIX crypt representation.
299 */
300 public static final String STORAGE_SCHEME_NAME_CRYPT = "CRYPT";
301
302
303
304 /**
305 * The string that will appear before the name of the password storage scheme
306 * in an encoded password.
307 */
308 public static final String STORAGE_SCHEME_PREFIX = "{";
309
310
311
312 /**
313 * The string that will appear after the name of the password storage scheme
314 * in an encoded password.
315 */
316 public static final String STORAGE_SCHEME_SUFFIX = "}";
317
318
319
320 /**
321 * The ASN.1 element type that will be used to encode the userIdentity
322 * component in a password modify extended request.
323 */
324 public static final byte TYPE_PASSWORD_MODIFY_USER_ID = (byte) 0x80;
325
326
327
328 /**
329 * The ASN.1 element type that will be used to encode the oldPasswd component
330 * in a password modify extended request.
331 */
332 public static final byte TYPE_PASSWORD_MODIFY_OLD_PASSWORD = (byte) 0x81;
333
334
335
336 /**
337 * The ASN.1 element type that will be used to encode the newPasswd component
338 * in a password modify extended request.
339 */
340 public static final byte TYPE_PASSWORD_MODIFY_NEW_PASSWORD = (byte) 0x82;
341
342
343
344 /**
345 * The ASN.1 element type that will be used to encode the genPasswd component
346 * in a password modify extended response.
347 */
348 public static final byte TYPE_PASSWORD_MODIFY_GENERATED_PASSWORD =
349 (byte) 0x80;
350 }
351