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 legal-notices/CDDLv1_0.txt
010 * or http://forgerock.org/license/CDDLv1.0.html.
011 * See the License for the specific language governing permissions
012 * and limitations under the License.
013 *
014 * When distributing Covered Code, include this CDDL HEADER in each
015 * file and include the License file at legal-notices/CDDLv1_0.txt.
016 * If applicable, add the following below this CDDL HEADER, with the
017 * fields enclosed by brackets "[]" replaced with your own identifying
018 * information:
019 *      Portions Copyright [yyyy] [name of copyright owner]
020 *
021 * CDDL HEADER END
022 *
023 *
024 *      Copyright 2008 Sun Microsystems, Inc.
025 */
026package org.opends.server.admin.std.client;
027
028
029
030import java.util.Collection;
031import java.util.SortedSet;
032import org.opends.server.admin.ManagedObjectDefinition;
033import org.opends.server.admin.PropertyException;
034import org.opends.server.admin.std.meta.FingerprintCertificateMapperCfgDefn.FingerprintAlgorithm;
035import org.opends.server.admin.std.server.FingerprintCertificateMapperCfg;
036import org.opends.server.types.AttributeType;
037import org.opends.server.types.DN;
038
039
040
041/**
042 * A client-side interface for reading and modifying Fingerprint
043 * Certificate Mapper settings.
044 * <p>
045 * The Fingerprint Certificate Mapper maps client certificates to user
046 * entries by looking for the MD5 or SHA1 fingerprint in a specified
047 * attribute of user entries.
048 */
049public interface FingerprintCertificateMapperCfgClient extends CertificateMapperCfgClient {
050
051  /**
052   * Get the configuration definition associated with this Fingerprint Certificate Mapper.
053   *
054   * @return Returns the configuration definition associated with this Fingerprint Certificate Mapper.
055   */
056  ManagedObjectDefinition<? extends FingerprintCertificateMapperCfgClient, ? extends FingerprintCertificateMapperCfg> definition();
057
058
059
060  /**
061   * Gets the "fingerprint-algorithm" property.
062   * <p>
063   * Specifies the name of the digest algorithm to compute the
064   * fingerprint of client certificates.
065   *
066   * @return Returns the value of the "fingerprint-algorithm" property.
067   */
068  FingerprintAlgorithm getFingerprintAlgorithm();
069
070
071
072  /**
073   * Sets the "fingerprint-algorithm" property.
074   * <p>
075   * Specifies the name of the digest algorithm to compute the
076   * fingerprint of client certificates.
077   *
078   * @param value The value of the "fingerprint-algorithm" property.
079   * @throws PropertyException
080   *           If the new value is invalid.
081   */
082  void setFingerprintAlgorithm(FingerprintAlgorithm value) throws PropertyException;
083
084
085
086  /**
087   * Gets the "fingerprint-attribute" property.
088   * <p>
089   * Specifies the attribute in which to look for the fingerprint.
090   * <p>
091   * Values of the fingerprint attribute should exactly match the MD5
092   * or SHA1 representation of the certificate fingerprint.
093   *
094   * @return Returns the value of the "fingerprint-attribute" property.
095   */
096  AttributeType getFingerprintAttribute();
097
098
099
100  /**
101   * Sets the "fingerprint-attribute" property.
102   * <p>
103   * Specifies the attribute in which to look for the fingerprint.
104   * <p>
105   * Values of the fingerprint attribute should exactly match the MD5
106   * or SHA1 representation of the certificate fingerprint.
107   *
108   * @param value The value of the "fingerprint-attribute" property.
109   * @throws PropertyException
110   *           If the new value is invalid.
111   */
112  void setFingerprintAttribute(AttributeType value) throws PropertyException;
113
114
115
116  /**
117   * Gets the "java-class" property.
118   * <p>
119   * Specifies the fully-qualified name of the Java class that
120   * provides the Fingerprint Certificate Mapper implementation.
121   *
122   * @return Returns the value of the "java-class" property.
123   */
124  String getJavaClass();
125
126
127
128  /**
129   * Sets the "java-class" property.
130   * <p>
131   * Specifies the fully-qualified name of the Java class that
132   * provides the Fingerprint Certificate Mapper implementation.
133   *
134   * @param value The value of the "java-class" property.
135   * @throws PropertyException
136   *           If the new value is invalid.
137   */
138  void setJavaClass(String value) throws PropertyException;
139
140
141
142  /**
143   * Gets the "user-base-dn" property.
144   * <p>
145   * Specifies the set of base DNs below which to search for users.
146   * <p>
147   * The base DNs are used when performing searches to map the client
148   * certificates to a user entry.
149   *
150   * @return Returns the values of the "user-base-dn" property.
151   */
152  SortedSet<DN> getUserBaseDN();
153
154
155
156  /**
157   * Sets the "user-base-dn" property.
158   * <p>
159   * Specifies the set of base DNs below which to search for users.
160   * <p>
161   * The base DNs are used when performing searches to map the client
162   * certificates to a user entry.
163   *
164   * @param values The values of the "user-base-dn" property.
165   * @throws PropertyException
166   *           If one or more of the new values are invalid.
167   */
168  void setUserBaseDN(Collection<DN> values) throws PropertyException;
169
170}