| | |
| | | import org.opends.server.core.ModifyOperation; |
| | | import org.opends.server.core.PasswordPolicyState; |
| | | import org.opends.server.loggers.ErrorLogger; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.opends.server.protocols.asn1.ASN1; |
| | | import org.opends.server.protocols.asn1.ASN1Reader; |
| | | import org.opends.server.protocols.asn1.ASN1Writer; |
| | |
| | | import static org.opends.messages.CoreMessages.*; |
| | | import static org.opends.messages.ExtensionMessages.*; |
| | | import static org.opends.server.extensions.ExtensionsConstants.*; |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | |
| | | CLEAR_PWD_ATTACHMENT = PREFIX + ".CLEAR_PWD"; |
| | | ENCODED_PWD_ATTACHMENT = PREFIX + ".ENCODED_PWD"; |
| | | } |
| | | |
| | | /** |
| | | * The tracer object for the debug logger. |
| | | */ |
| | | private static final DebugTracer TRACER = getTracer(); |
| | | private static final LocalizedLogger logger = LocalizedLogger.getLoggerForThisClass(); |
| | | |
| | | /** The current configuration state. */ |
| | | private PasswordModifyExtendedOperationHandlerCfg currentConfig; |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | LocalizableMessage message = ERR_EXTOP_PASSMOD_CANNOT_DETERMINE_ID_MAPPER.get( |
| | | String.valueOf(config.dn()), getExceptionMessage(e)); |
| | | throw new InitializationException(message, e); |
| | |
| | | } |
| | | catch (Exception ae) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ae); |
| | | } |
| | | logger.traceException(ae); |
| | | |
| | | operation.setResultCode(ResultCode.PROTOCOL_ERROR); |
| | | operation.appendErrorMessage(ERR_EXTOP_PASSMOD_CANNOT_DECODE_REQUEST |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | operation.setResultCode(ResultCode.INVALID_DN_SYNTAX); |
| | | operation.appendErrorMessage( |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | //Encountered an exception while resolving identity. |
| | | operation.setResultCode(de.getResultCode()); |
| | |
| | | } |
| | | catch (DirectoryException ignored) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ignored); |
| | | } |
| | | logger.traceException(ignored); |
| | | } |
| | | |
| | | if (userDN != null && !userDN.isRootDN()) { |
| | |
| | | } |
| | | catch (DirectoryException ignored) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, ignored); |
| | | } |
| | | logger.traceException(ignored); |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | operation.setResultCode(DirectoryServer.getServerErrorResultCode()); |
| | | operation.appendErrorMessage( |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | operation.setResultCode(de.getResultCode()); |
| | | operation.appendErrorMessage( |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | operation.setResultCode(de.getResultCode()); |
| | | operation.appendErrorMessage( |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | // We couldn't decode the provided password value, so remove it |
| | | // from the user's entry. |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | // We couldn't decode the provided password value, so remove it |
| | | // from the user's entry. |
| | |
| | | } |
| | | catch (IOException e) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | logger.traceException(e); |
| | | } |
| | | |
| | | operation.setResponseValue(builder.toByteString()); |
| | |
| | | } |
| | | catch (DirectoryException de) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, de); |
| | | } |
| | | logger.traceException(de); |
| | | |
| | | operation.setResultCode(de.getResultCode()); |
| | | operation.appendErrorMessage(de.getMessageObject()); |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | } |
| | | return null; |
| | | } |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | LocalizableMessage message = ERR_EXTOP_PASSMOD_CANNOT_DETERMINE_ID_MAPPER.get( |
| | | String.valueOf(config.dn()), |
| | |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | logger.traceException(e); |
| | | |
| | | resultCode = DirectoryServer.getServerErrorResultCode(); |
| | | |