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.server;
017
018
019
020import org.forgerock.opendj.config.server.ConfigurationChangeListener;
021import org.forgerock.opendj.ldap.DN;
022import org.forgerock.opendj.ldap.schema.AttributeType;
023import org.forgerock.opendj.server.config.meta.ExternalSASLMechanismHandlerCfgDefn.CertificateValidationPolicy;
024
025
026
027/**
028 * A server-side interface for querying External SASL Mechanism
029 * Handler settings.
030 * <p>
031 * The External SASL Mechanism Handler performs all processing related
032 * to SASL EXTERNAL authentication.
033 */
034public interface ExternalSASLMechanismHandlerCfg extends SASLMechanismHandlerCfg {
035
036  /**
037   * Gets the configuration class associated with this External SASL Mechanism Handler.
038   *
039   * @return Returns the configuration class associated with this External SASL Mechanism Handler.
040   */
041  Class<? extends ExternalSASLMechanismHandlerCfg> configurationClass();
042
043
044
045  /**
046   * Register to be notified when this External SASL Mechanism Handler is changed.
047   *
048   * @param listener
049   *          The External SASL Mechanism Handler configuration change listener.
050   */
051  void addExternalChangeListener(ConfigurationChangeListener<ExternalSASLMechanismHandlerCfg> listener);
052
053
054
055  /**
056   * Deregister an existing External SASL Mechanism Handler configuration change listener.
057   *
058   * @param listener
059   *          The External SASL Mechanism Handler configuration change listener.
060   */
061  void removeExternalChangeListener(ConfigurationChangeListener<ExternalSASLMechanismHandlerCfg> listener);
062
063
064
065  /**
066   * Gets the "certificate-attribute" property.
067   * <p>
068   * Specifies the name of the attribute to hold user certificates.
069   * <p>
070   * This property must specify the name of a valid attribute type
071   * defined in the server schema.
072   *
073   * @return Returns the value of the "certificate-attribute" property.
074   */
075  AttributeType getCertificateAttribute();
076
077
078
079  /**
080   * Gets the "certificate-mapper" property.
081   * <p>
082   * Specifies the name of the certificate mapper that should be used
083   * to match client certificates to user entries.
084   *
085   * @return Returns the value of the "certificate-mapper" property.
086   */
087  String getCertificateMapper();
088
089
090
091  /**
092   * Gets the "certificate-mapper" property as a DN.
093   * <p>
094   * Specifies the name of the certificate mapper that should be used
095   * to match client certificates to user entries.
096   *
097   * @return Returns the DN value of the "certificate-mapper"
098   *         property.
099   */
100  DN getCertificateMapperDN();
101
102
103
104  /**
105   * Gets the "certificate-validation-policy" property.
106   * <p>
107   * Indicates whether to attempt to validate the peer certificate
108   * against a certificate held in the user's entry.
109   *
110   * @return Returns the value of the "certificate-validation-policy" property.
111   */
112  CertificateValidationPolicy getCertificateValidationPolicy();
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 SASL mechanism handler implementation.
121   *
122   * @return Returns the value of the "java-class" property.
123   */
124  String getJavaClass();
125
126}