AnonymousSASLMechanismHandler.java revision 221
0N/A * The contents of this file are subject to the terms of the 0N/A * Common Development and Distribution License, Version 1.0 only 0N/A * (the "License"). You may not use this file except in compliance 0N/A * You can obtain a copy of the license at 0N/A * See the License for the specific language governing permissions 0N/A * and limitations under the License. 0N/A * When distributing Covered Code, include this CDDL HEADER in each 0N/A * file and include the License file at 0N/A * add the following below this CDDL HEADER, with the fields enclosed 0N/A * by brackets "[]" replaced with your own identifying * information: 0N/A * Portions Copyright [yyyy] [name of copyright owner] 0N/A * Portions Copyright 2006 Sun Microsystems, Inc. 0N/A * This class provides an implementation of a SASL mechanism, as defined in RFC 0N/A * 4505, that does not perform any authentication. That is, anyone attempting 0N/A * to bind with this SASL mechanism will be successful and will be given the 0N/A * rights of an unauthenticated user. The request may or may not include a set 0N/A * of SASL credentials which will serve as trace information. If provided, 0N/A * then that trace information will be written to the server error log. 0N/A * The fully-qualified name of this class for debugging purposes. 0N/A "org.opends.server.extensions.AnonymousSASLMechanismHandler";
0N/A * Creates a new instance of this SASL mechanism handler. No initialization 0N/A * should be done in this method, as it should all be performed in the 0N/A * <CODE>initializeSASLMechanismHandler</CODE> method. 0N/A * Initializes this SASL mechanism handler based on the information in the 0N/A * provided configuration entry. It should also register itself with the 0N/A * Directory Server for the particular kinds of SASL mechanisms that it 0N/A * @param configEntry The configuration entry that contains the information 0N/A * to use to initialize this SASL mechanism handler. 0N/A * @throws ConfigException If an unrecoverable problem arises in the 0N/A * process of performing the initialization. 0N/A * @throws InitializationException If a problem occurs during initialization 0N/A * that is not related to the server 0N/A // No real implementation is required. Simply register with the Directory 0N/A // Server for the ANONYMOUS mechanism. 221N/A * Performs any finalization that may be necessary for this SASL mechanism 0N/A * Processes the provided SASL bind operation. Note that if the SASL 0N/A * processing gets far enough to be able to map the associated request to a 0N/A * user entry (regardless of whether the authentication is ultimately 0N/A * successful), then this method must call the 0N/A * <CODE>BindOperation.setSASLAuthUserEntry</CODE> to provide it with the 0N/A * entry for the user that attempted to authenticate. 0N/A * @param bindOperation The SASL bind operation to be processed. 0N/A // See if the client provided SASL credentials including trace information. 0N/A // If so, then log it to the error log. 0N/A // Authenticate the client anonymously and indicate that the bind was 0N/A * Indicates whether the specified SASL mechanism is password-based or uses 0N/A * some other form of credentials (e.g., an SSL client certificate or Kerberos 0N/A * @param mechanism The name of the mechanism for which to make the 0N/A * determination. This will only be invoked with names of 0N/A * mechanisms for which this handler has previously 0N/A * @return <CODE>true</CODE> if this SASL mechanism is password-based, or 0N/A * <CODE>false</CODE> if it uses some other form of credentials. 0N/A // This is not a password-based mechanism. 0N/A * Indicates whether the specified SASL mechanism should be considered secure 0N/A * (i.e., it does not expose the authentication credentials in a manner that 0N/A * is useful to a third-party observer, and other aspects of the 0N/A * authentication are generally secure). 0N/A * @param mechanism The name of the mechanism for which to make the 0N/A * determination. This will only be invoked with names of 0N/A * mechanisms for which this handler has previously 0N/A * @return <CODE>true</CODE> if this SASL mechanism should be considered 0N/A * secure, or <CODE>false</CODE> if not. 0N/A // This is not a secure mechanism.