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.server.SubjectAttributeToUserAttributeCertificateMapperCfg;
035import org.opends.server.types.DN;
036
037
038
039/**
040 * A client-side interface for reading and modifying Subject Attribute
041 * To User Attribute Certificate Mapper settings.
042 * <p>
043 * The Subject Attribute To User Attribute Certificate Mapper maps
044 * client certificates to user entries by mapping the values of
045 * attributes contained in the certificate subject to attributes
046 * contained in user entries.
047 */
048public interface SubjectAttributeToUserAttributeCertificateMapperCfgClient extends CertificateMapperCfgClient {
049
050  /**
051   * Get the configuration definition associated with this Subject Attribute To User Attribute Certificate Mapper.
052   *
053   * @return Returns the configuration definition associated with this Subject Attribute To User Attribute Certificate Mapper.
054   */
055  ManagedObjectDefinition<? extends SubjectAttributeToUserAttributeCertificateMapperCfgClient, ? extends SubjectAttributeToUserAttributeCertificateMapperCfg> definition();
056
057
058
059  /**
060   * Gets the "java-class" property.
061   * <p>
062   * Specifies the fully-qualified name of the Java class that
063   * provides the Subject Attribute To User Attribute Certificate
064   * Mapper implementation.
065   *
066   * @return Returns the value of the "java-class" property.
067   */
068  String getJavaClass();
069
070
071
072  /**
073   * Sets the "java-class" property.
074   * <p>
075   * Specifies the fully-qualified name of the Java class that
076   * provides the Subject Attribute To User Attribute Certificate
077   * Mapper implementation.
078   *
079   * @param value The value of the "java-class" property.
080   * @throws PropertyException
081   *           If the new value is invalid.
082   */
083  void setJavaClass(String value) throws PropertyException;
084
085
086
087  /**
088   * Gets the "subject-attribute-mapping" property.
089   * <p>
090   * Specifies a mapping between certificate attributes and user
091   * attributes.
092   * <p>
093   * Each value should be in the form "certattr:userattr" where
094   * certattr is the name of the attribute in the certificate subject
095   * and userattr is the name of the corresponding attribute in user
096   * entries. There may be multiple mappings defined, and when
097   * performing the mapping values for all attributes present in the
098   * certificate subject that have mappings defined must be present in
099   * the corresponding user entries.
100   *
101   * @return Returns the values of the "subject-attribute-mapping" property.
102   */
103  SortedSet<String> getSubjectAttributeMapping();
104
105
106
107  /**
108   * Sets the "subject-attribute-mapping" property.
109   * <p>
110   * Specifies a mapping between certificate attributes and user
111   * attributes.
112   * <p>
113   * Each value should be in the form "certattr:userattr" where
114   * certattr is the name of the attribute in the certificate subject
115   * and userattr is the name of the corresponding attribute in user
116   * entries. There may be multiple mappings defined, and when
117   * performing the mapping values for all attributes present in the
118   * certificate subject that have mappings defined must be present in
119   * the corresponding user entries.
120   *
121   * @param values The values of the "subject-attribute-mapping" property.
122   * @throws PropertyException
123   *           If one or more of the new values are invalid.
124   */
125  void setSubjectAttributeMapping(Collection<String> values) throws PropertyException;
126
127
128
129  /**
130   * Gets the "user-base-dn" property.
131   * <p>
132   * Specifies the base DNs that should be used when performing
133   * searches to map the client certificate to a user entry.
134   *
135   * @return Returns the values of the "user-base-dn" property.
136   */
137  SortedSet<DN> getUserBaseDN();
138
139
140
141  /**
142   * Sets the "user-base-dn" property.
143   * <p>
144   * Specifies the base DNs that should be used when performing
145   * searches to map the client certificate to a user entry.
146   *
147   * @param values The values of the "user-base-dn" property.
148   * @throws PropertyException
149   *           If one or more of the new values are invalid.
150   */
151  void setUserBaseDN(Collection<DN> values) throws PropertyException;
152
153}