| | |
| | | import org.opends.server.api.*; |
| | | import org.opends.server.core.*; |
| | | import org.opends.server.extensions.*; |
| | | import org.opends.server.protocols.asn1.*; |
| | | import org.opends.server.protocols.ldap.*; |
| | | import org.opends.server.protocols.internal.InternalSearchOperation ; |
| | | import org.opends.server.protocols.internal.InternalSearchListener; |
| | | |
| | | import org.opends.server.types.AbstractOperation; |
| | | import org.opends.server.types.Attribute; |
| | | import org.opends.server.types.AttributeType; |
| | | import org.opends.server.types.DebugLogLevel; |
| | | import org.opends.server.types.AuthenticationInfo; |
| | | import org.opends.server.types.CancelRequest; |
| | | import org.opends.server.types.CancelResult; |
| | | import org.opends.server.types.Control; |
| | | import org.opends.server.types.DN; |
| | | import org.opends.server.types.DereferencePolicy; |
| | | import org.opends.server.types.DirectoryException; |
| | | import org.opends.server.types.DisconnectReason; |
| | | import org.opends.server.types.IntermediateResponse; |
| | | import org.opends.server.types.Modification; |
| | | import org.opends.server.types.ObjectClass; |
| | | import org.opends.server.types.Operation; |
| | | import org.opends.server.types.Privilege; |
| | | import org.opends.server.types.RDN; |
| | | import org.opends.server.types.RawAttribute; |
| | | import org.opends.server.types.RawModification; |
| | | import org.opends.server.types.ResultCode; |
| | | import org.opends.server.types.SearchResultEntry; |
| | | import org.opends.server.types.SearchResultReference; |
| | | import org.opends.server.types.SearchScope; |
| | | import org.opends.server.types.*; |
| | | |
| | | import static org.opends.server.loggers.debug.DebugLogger.*; |
| | | import org.opends.server.loggers.debug.DebugTracer; |
| | |
| | | // The operation ID counter to use for operations on this connection. |
| | | private AtomicLong nextOperationID; |
| | | |
| | | // The connection security provider for this client connection. |
| | | private ConnectionSecurityProvider securityProvider; |
| | | |
| | | // The empty operation list for this connection. |
| | | private LinkedList<Operation> operationList; |
| | | |
| | |
| | | } |
| | | operationList = new LinkedList<Operation>(); |
| | | |
| | | try |
| | | { |
| | | securityProvider = new NullConnectionSecurityProvider(); |
| | | securityProvider.initializeConnectionSecurityProvider(null); |
| | | } |
| | | catch (Exception e) |
| | | { |
| | | if (debugEnabled()) |
| | | { |
| | | TRACER.debugCaught(DebugLogLevel.ERROR, e); |
| | | } |
| | | } |
| | | |
| | | // |
| | | // Register the Jmx Notification listener (this) |
| | | jmxConnectionHandler.getRMIConnector().jmxRmiConnectorNoClientCertificate |
| | |
| | | */ |
| | | public boolean isSecure() |
| | | { |
| | | return securityProvider.isSecure(); |
| | | return false; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the connection security provider for this client connection. |
| | | * |
| | | * @return The connection security provider for this client connection. |
| | | */ |
| | | public ConnectionSecurityProvider getConnectionSecurityProvider() |
| | | { |
| | | return securityProvider; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Specifies the connection security provider for this client connection. |
| | | * |
| | | * @param securityProvider The connection security provider to use for |
| | | * communication on this client connection. |
| | | */ |
| | | public void setConnectionSecurityProvider(ConnectionSecurityProvider |
| | | securityProvider) |
| | | { |
| | | this.securityProvider = securityProvider; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * Retrieves the human-readable name of the security mechanism that is used to |
| | | * protect communication with this client. |
| | |
| | | */ |
| | | public String getSecurityMechanism() |
| | | { |
| | | return securityProvider.getSecurityMechanismName(); |
| | | return "NULL"; |
| | | } |
| | | |
| | | |
| | |
| | | * @return A reference to the add operation that was processed and contains |
| | | * information about the result of the processing. |
| | | */ |
| | | public AddOperation processAdd(ASN1OctetString rawEntryDN, |
| | | public AddOperation processAdd(ByteString rawEntryDN, |
| | | ArrayList<RawAttribute> rawAttributes) |
| | | { |
| | | AddOperationBasis addOperation = |
| | |
| | | * @return A reference to the compare operation that was processed and |
| | | * contains information about the result of the processing. |
| | | */ |
| | | public CompareOperation processCompare(ASN1OctetString rawEntryDN, |
| | | String attributeType, |
| | | ASN1OctetString assertionValue) |
| | | public CompareOperation processCompare(ByteString rawEntryDN, |
| | | String attributeType, |
| | | ByteString assertionValue) |
| | | { |
| | | CompareOperationBasis compareOperation = |
| | | new CompareOperationBasis(this, nextOperationID(), nextMessageID(), |
| | |
| | | * @return A reference to the delete operation that was processed and |
| | | * contains information about the result of the processing. |
| | | */ |
| | | public DeleteOperation processDelete(ASN1OctetString rawEntryDN) |
| | | public DeleteOperation processDelete(ByteString rawEntryDN) |
| | | { |
| | | DeleteOperationBasis deleteOperation = |
| | | new DeleteOperationBasis(this, nextOperationID(), nextMessageID(), |
| | |
| | | * contains information about the result of the processing. |
| | | */ |
| | | public ExtendedOperation processExtendedOperation(String requestOID, |
| | | ASN1OctetString requestValue) |
| | | ByteString requestValue) |
| | | { |
| | | ExtendedOperationBasis extendedOperation = |
| | | new ExtendedOperationBasis(this, nextOperationID(), nextMessageID(), |
| | |
| | | * @return A reference to the modify operation that was processed and |
| | | * contains information about the result of the processing |
| | | */ |
| | | public ModifyOperation processModify(ASN1OctetString rawEntryDN, |
| | | public ModifyOperation processModify(ByteString rawEntryDN, |
| | | ArrayList<RawModification> rawModifications) |
| | | { |
| | | ModifyOperationBasis modifyOperation = |
| | |
| | | * @return A reference to the modify DN operation that was processed and |
| | | * contains information about the result of the processing. |
| | | */ |
| | | public ModifyDNOperation processModifyDN(ASN1OctetString rawEntryDN, |
| | | ASN1OctetString rawNewRDN, |
| | | public ModifyDNOperation processModifyDN(ByteString rawEntryDN, |
| | | ByteString rawNewRDN, |
| | | boolean deleteOldRDN) |
| | | { |
| | | return processModifyDN(rawEntryDN, rawNewRDN, deleteOldRDN, null); |
| | |
| | | * @return A reference to the modify DN operation that was processed and |
| | | * contains information about the result of the processing. |
| | | */ |
| | | public ModifyDNOperation processModifyDN(ASN1OctetString rawEntryDN, |
| | | ASN1OctetString rawNewRDN, |
| | | public ModifyDNOperation processModifyDN(ByteString rawEntryDN, |
| | | ByteString rawNewRDN, |
| | | boolean deleteOldRDN, |
| | | ASN1OctetString rawNewSuperior) |
| | | ByteString rawNewSuperior) |
| | | { |
| | | ModifyDNOperationBasis modifyDNOperation = |
| | | new ModifyDNOperationBasis(this, nextOperationID(), nextMessageID(), |
| | |
| | | * and contains information about the result of the processing as |
| | | * well as lists of the matching entries and search references. |
| | | */ |
| | | public InternalSearchOperation processSearch(ASN1OctetString rawBaseDN, |
| | | public InternalSearchOperation processSearch(ByteString rawBaseDN, |
| | | SearchScope scope, LDAPFilter filter) |
| | | { |
| | | return processSearch(rawBaseDN, scope, |
| | |
| | | * and contains information about the result of the processing as |
| | | * well as lists of the matching entries and search references. |
| | | */ |
| | | public InternalSearchOperation processSearch(ASN1OctetString rawBaseDN, |
| | | public InternalSearchOperation processSearch(ByteString rawBaseDN, |
| | | SearchScope scope, |
| | | DereferencePolicy derefPolicy, |
| | | int sizeLimit, int timeLimit, |
| | |
| | | * @return A reference to the internal search operation that was processed |
| | | * and contains information about the result of the processing. |
| | | */ |
| | | public InternalSearchOperation processSearch(ASN1OctetString rawBaseDN, |
| | | public InternalSearchOperation processSearch(ByteString rawBaseDN, |
| | | SearchScope scope, |
| | | DereferencePolicy derefPolicy, |
| | | int sizeLimit, int timeLimit, |
| | |
| | | |
| | | unbindOp.run(); |
| | | } |
| | | catch (Exception e) |
| | | catch (Exception e) |
| | | { |
| | | // TODO print a message ? |
| | | if (debugEnabled()) |
| | |
| | | { |
| | | authDN.toString(buffer); |
| | | } |
| | | |
| | | buffer.append("\" security=\""); |
| | | if (securityProvider.isSecure()) |
| | | { |
| | | buffer.append(securityProvider.getSecurityMechanismName()); |
| | | } |
| | | else |
| | | { |
| | | buffer.append("none"); |
| | | } |
| | | |
| | | buffer.append("\""); |
| | | |
| | | return buffer.toString(); |
| | |
| | | // JMX connections will not be limited. |
| | | return 0; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | public int getSSF() { |
| | | return 0; |
| | | } |
| | | } |
| | | |