001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions Copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2008 Sun Microsystems, Inc.
015 */
016package org.forgerock.opendj.server.config.client;
017
018
019
020import org.forgerock.opendj.config.ManagedObjectDefinition;
021import org.forgerock.opendj.config.PropertyException;
022import org.forgerock.opendj.server.config.meta.CryptPasswordStorageSchemeCfgDefn.CryptPasswordStorageEncryptionAlgorithm;
023import org.forgerock.opendj.server.config.server.CryptPasswordStorageSchemeCfg;
024
025
026
027/**
028 * A client-side interface for reading and modifying Crypt Password
029 * Storage Scheme settings.
030 * <p>
031 * The Crypt Password Storage Scheme provides a mechanism for encoding
032 * user passwords like Unix crypt does. Like on most Unix systems, the
033 * password may be encrypted using different algorithms, either Unix
034 * crypt, md5, sha256 or sha512.
035 */
036public interface CryptPasswordStorageSchemeCfgClient extends PasswordStorageSchemeCfgClient {
037
038  /**
039   * Get the configuration definition associated with this Crypt Password Storage Scheme.
040   *
041   * @return Returns the configuration definition associated with this Crypt Password Storage Scheme.
042   */
043  ManagedObjectDefinition<? extends CryptPasswordStorageSchemeCfgClient, ? extends CryptPasswordStorageSchemeCfg> definition();
044
045
046
047  /**
048   * Gets the "crypt-password-storage-encryption-algorithm" property.
049   * <p>
050   * Specifies the algorithm to use to encrypt new passwords.
051   * <p>
052   * Select the crypt algorithm to use to encrypt new passwords. The
053   * value can either be "unix", which means the password is encrypted
054   * with the weak Unix crypt algorithm, or "md5" which means the
055   * password is encrypted with the BSD MD5 algorithm and has a $1$
056   * prefix, or "sha256" which means the password is encrypted with the
057   * SHA256 algorithm and has a $5$ prefix, or "sha512" which means the
058   * password is encrypted with the SHA512 algorithm and has a $6$
059   * prefix.
060   *
061   * @return Returns the value of the "crypt-password-storage-encryption-algorithm" property.
062   */
063  CryptPasswordStorageEncryptionAlgorithm getCryptPasswordStorageEncryptionAlgorithm();
064
065
066
067  /**
068   * Sets the "crypt-password-storage-encryption-algorithm" property.
069   * <p>
070   * Specifies the algorithm to use to encrypt new passwords.
071   * <p>
072   * Select the crypt algorithm to use to encrypt new passwords. The
073   * value can either be "unix", which means the password is encrypted
074   * with the weak Unix crypt algorithm, or "md5" which means the
075   * password is encrypted with the BSD MD5 algorithm and has a $1$
076   * prefix, or "sha256" which means the password is encrypted with the
077   * SHA256 algorithm and has a $5$ prefix, or "sha512" which means the
078   * password is encrypted with the SHA512 algorithm and has a $6$
079   * prefix.
080   *
081   * @param value The value of the "crypt-password-storage-encryption-algorithm" property.
082   * @throws PropertyException
083   *           If the new value is invalid.
084   */
085  void setCryptPasswordStorageEncryptionAlgorithm(CryptPasswordStorageEncryptionAlgorithm value) throws PropertyException;
086
087
088
089  /**
090   * Gets the "java-class" property.
091   * <p>
092   * Specifies the fully-qualified name of the Java class that
093   * provides the Crypt Password Storage Scheme implementation.
094   *
095   * @return Returns the value of the "java-class" property.
096   */
097  String getJavaClass();
098
099
100
101  /**
102   * Sets the "java-class" property.
103   * <p>
104   * Specifies the fully-qualified name of the Java class that
105   * provides the Crypt Password Storage Scheme implementation.
106   *
107   * @param value The value of the "java-class" property.
108   * @throws PropertyException
109   *           If the new value is invalid.
110   */
111  void setJavaClass(String value) throws PropertyException;
112
113}