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.ldap.schema.AttributeType;
023import org.forgerock.opendj.server.config.meta.ExternalSASLMechanismHandlerCfgDefn.CertificateValidationPolicy;
024import org.forgerock.opendj.server.config.server.ExternalSASLMechanismHandlerCfg;
025
026
027
028/**
029 * A client-side interface for reading and modifying External SASL
030 * Mechanism Handler settings.
031 * <p>
032 * The External SASL Mechanism Handler performs all processing related
033 * to SASL EXTERNAL authentication.
034 */
035public interface ExternalSASLMechanismHandlerCfgClient extends SASLMechanismHandlerCfgClient {
036
037  /**
038   * Get the configuration definition associated with this External SASL Mechanism Handler.
039   *
040   * @return Returns the configuration definition associated with this External SASL Mechanism Handler.
041   */
042  ManagedObjectDefinition<? extends ExternalSASLMechanismHandlerCfgClient, ? extends ExternalSASLMechanismHandlerCfg> definition();
043
044
045
046  /**
047   * Gets the "certificate-attribute" property.
048   * <p>
049   * Specifies the name of the attribute to hold user certificates.
050   * <p>
051   * This property must specify the name of a valid attribute type
052   * defined in the server schema.
053   *
054   * @return Returns the value of the "certificate-attribute" property.
055   */
056  AttributeType getCertificateAttribute();
057
058
059
060  /**
061   * Sets the "certificate-attribute" property.
062   * <p>
063   * Specifies the name of the attribute to hold user certificates.
064   * <p>
065   * This property must specify the name of a valid attribute type
066   * defined in the server schema.
067   *
068   * @param value The value of the "certificate-attribute" property.
069   * @throws PropertyException
070   *           If the new value is invalid.
071   */
072  void setCertificateAttribute(AttributeType value) throws PropertyException;
073
074
075
076  /**
077   * Gets the "certificate-mapper" property.
078   * <p>
079   * Specifies the name of the certificate mapper that should be used
080   * to match client certificates to user entries.
081   *
082   * @return Returns the value of the "certificate-mapper" property.
083   */
084  String getCertificateMapper();
085
086
087
088  /**
089   * Sets the "certificate-mapper" property.
090   * <p>
091   * Specifies the name of the certificate mapper that should be used
092   * to match client certificates to user entries.
093   *
094   * @param value The value of the "certificate-mapper" property.
095   * @throws PropertyException
096   *           If the new value is invalid.
097   */
098  void setCertificateMapper(String value) throws PropertyException;
099
100
101
102  /**
103   * Gets the "certificate-validation-policy" property.
104   * <p>
105   * Indicates whether to attempt to validate the peer certificate
106   * against a certificate held in the user's entry.
107   *
108   * @return Returns the value of the "certificate-validation-policy" property.
109   */
110  CertificateValidationPolicy getCertificateValidationPolicy();
111
112
113
114  /**
115   * Sets the "certificate-validation-policy" property.
116   * <p>
117   * Indicates whether to attempt to validate the peer certificate
118   * against a certificate held in the user's entry.
119   *
120   * @param value The value of the "certificate-validation-policy" property.
121   * @throws PropertyException
122   *           If the new value is invalid.
123   */
124  void setCertificateValidationPolicy(CertificateValidationPolicy value) throws PropertyException;
125
126
127
128  /**
129   * Gets the "java-class" property.
130   * <p>
131   * Specifies the fully-qualified name of the Java class that
132   * provides the SASL mechanism handler implementation.
133   *
134   * @return Returns the value of the "java-class" property.
135   */
136  String getJavaClass();
137
138
139
140  /**
141   * Sets the "java-class" property.
142   * <p>
143   * Specifies the fully-qualified name of the Java class that
144   * provides the SASL mechanism handler implementation.
145   *
146   * @param value The value of the "java-class" property.
147   * @throws PropertyException
148   *           If the new value is invalid.
149   */
150  void setJavaClass(String value) throws PropertyException;
151
152}