06 May, 2013

1 commit


03 May, 2013

1 commit

  • 
    
    Implemented the HTTP access logger by taking inspiration from other loggers.
    Configured the new logger everywhere other loggers are configured.
    Logged the HTTP request in several places to cover all cases (happy paths, errors, etc.).
    
    
    
    config.ldif, 02-config.ldif, HTTPAccessLogPublisherConfiguration.xml, FileBasedHTTPAccessLogPublisherConfiguration.xml, HTTPAccessLogPublisherCfgDefn.properties, FileBasedHTTPAccessLogPublisherCfgDefn.properties: ADDED
    Added 2 new objectClasses HTTPAccessLogPublisherConfiguration and FileBasedHTTPAccessLogPublisherConfiguration.
    
    config.properties:
    Added new error messages for the HTTP access logger.
    
    HTTPAccessLogger.java, HTTPAccessLogPublisher.java, TextHTTPAccessLogPublisher.java, HTTPRequestInfo.java: ADDED
    HTTPRequestInfo.log() prevents double logging.
    
    CollectClientConnectionsFilter.java:
    Logged the request info when HttpServletResponse.setStatus(), sendAuthenticationFailure() and onFailure() are called.
    Pushed more data to the HTTPRequestContext + switched to use the more specific HttpServletRequest/HttpServletResponse
    
    SdkConnectionAdapter.java:
    Logged the request info when close() is called.
    
    LoggerConfigManager.java, TestCaseUtils.java:
    Configured the HTTP access logger.
    
    InProcessServerController.java: TO BE REMOVED (by Matt on the native packaging branch)
    
    
    
    Sample log:
    localhost bjensen [03/May/2013:10:14:54 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 500 "curl/7.27.0"
    localhost bjensen [03/May/2013:10:15:05 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 200 "curl/7.27.0"
    localhost  [03/May/2013:10:15:14 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 200 "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0"
    localhost  [03/May/2013:10:16:40 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 401 "curl/7.27.0"
    localhost  [03/May/2013:10:16:50 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 200 "curl/7.27.0"
    localhost  [03/May/2013:10:16:51 +0200] "GET /favicon.ico/null HTTP/1.1" 404 "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:20.0) Gecko/20100101 Firefox/20.0"
    localhost  [03/May/2013:10:17:10 +0200] "GET /users/_queryFilter=true&_prettyPrint=true HTTP/1.1" 200 "curl/7.27.0"
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8832 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

01 May, 2013

6 commits


30 Apr, 2013

2 commits


29 Apr, 2013

2 commits


26 Apr, 2013

1 commit


25 Apr, 2013

1 commit


24 Apr, 2013

2 commits

  • Tons of simplification of code, fix of typos, transformed comments to block.
    In ReplicationDomain, changed synchronization of Map with a concurrentHashMap.
    Fixed an error message in LDAPReplicationDomain
    Removed mods from error message on Assured replication ack timeout (could be too large).
    Added a log message on critical error (when reading change from RS db).
    Removed some unused code.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8797 41b1ffd8-f28e-4786-ab96-9950f0a78031
    ludo
     
  • CryptoManagerTestCase.java:
    Replaced use of reflection with use of direct method call.
    Removed useless parentheses.
    
    
    ExtensionTestUtils.java: ADDED
    Factorizes common code among Extensions tests cases.
    
    EntryDNVirtualAttributeProviderTestCase.java, EntryUUIDVirtualAttributeProviderTestCase.java, GoverningStructureRuleVirtualAttributeProviderTestCase.java, HasSubordinatesVirtualAttributeProviderTestCase.java, NumSubordinatesVirtualAttributeProviderTestCase.java, StructuralObjectClassVirtualAttributeProviderTestCase.java, SubschemaSubentryVirtualAttributeProviderTestCase.java:
    Moved common code from 6 tests methods to ExtensionTestUtils + made tests delegate to the ExtensionTestUtils static methods.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8790 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

23 Apr, 2013

2 commits

  • Implemented the authentication steps (search username + bind) in an async way.
    
    CollectClientConnectionsFilter.java:
    Added inner classes HTTPRequestContext, DoBindResultHandler and CallDoFilterResultHandler to support async processing.
    In doFilter(), built the HTTPRequestContext + removed some local parameters.
    Extracted the methods doFilter(HTTPRequestContext, AuthenticationInfo), sendAuthenticationFailure() and onFailure() from doFilter(ServletRequest, ServletResponse, FilterChain).
    In several methods, replaced several parameters by using just one HTTPRequestContext parameter.
    Extracted method buildSearchRequest(String) from searchUniqueEntryDN().
    Removed getAuthenticationInfo() and added the code back to doFilter().
    Removed authenticate(), searchUniqueEntryDN() and bind(), and moved their corresponding code to the inner classes.
    Added getAsyncContext().
    
    CollectClientConnectionsFilter.java:
    Removed the test for authenticate()
    
    SdkConnectionAdapter.java:
    Fixed two bugs
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8783 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Many thanks to Manuel Gaupp for the contributed patch and tests.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8781 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     

22 Apr, 2013

1 commit

  • 
    
    Limited the number of concurrent operations per client connection.
    
    
    
    SdkConnectionAdapter.java:
    Changed the queueing strategy to BoundedWorkQueueStrategy.
    
    BoundedWorkQueueStrategy.java: ADDED
    
    AbandonOperationWrapper.java, xtendedOperationWrapper.java, UnbindOperationWrapper.java: ADDED
    
    DirectoryServer.java:
    Extracted checkCanEnqueueRequest() from enqueueRequest().
    Added tryEnqueueRequest().
    
    WorkQueue.java:
    Pulled computeNumWorkerThreads() here from sub classes.
    Added abstract method trySubmitOperation().
    Added abstract getter getNumWorkerThreads().
    
    ParallelWorkQueue.java:
    Implemented trySubmitOperation() and getter getNumWorkerThreads().
    Renamed getNumWorkerThreads() to computeNumWorkerThreads() + moved it to WorkQueue.
    
    TraditionalWorkQueue.java:
    Implemented trySubmitOperation() and getter getNumWorkerThreads().
    Renamed getNumWorkerThreads() to computeNumWorkerThreads() + moved it to WorkQueue.
    Extacted overloaded method submitOperation(Operation, boolean) from submitOperation(Operation).
    
    
    
    ClientConnection.java, JmxClientConnection.java, HTTPClientConnection.java, InternalClientConnection.java, MockClientConnection.java, LDAPClientConnection.java:
    Added abstract method isConnectionValid() + implemented it in subclasses.
    
    
    
    02-config.ldif, HTTPConnectionHandlerConfiguration.xml:
    Added property max-concurrent-ops-per-connection
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8775 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

19 Apr, 2013

1 commit


16 Apr, 2013

1 commit

  • 
    Improved error reporting to the client: Internal exceptions are now returned to the client as such.
    This simplified the error handling code.
    
    
    CollectClientConnectionsFilter.java:
    Renamed sendUnauthorizedResponseWithHTTPBasicAuthChallenge() to sendErrorResponse().
    Extracted more generic method toJSON() from sendErrorResponse().
    Removed several try / catch + logging and replaced them with throwing the exception up.
    
    HTTPClientConnection.java:
    A connection is now valid by default (doh!)
    
    CollectClientConnectionsFilterTest.java:
    Updated the tests.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8752 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

15 Apr, 2013

1 commit

  • … the HTTP connection handler
    
    
    
    Added logging for CONNECT / DISCONNECT operations. All LDAP inner operations are already logged.
    Ensured the inner operations are not logged by default.
    
    
    
    LDAPClientConnection.java, LDAPConnectionHandler.java:
    Moved the disconnect logging from LDAPClientConnection ctor to LDAPConnectionHandler.acceptConnection() in line with other calls to disconnect logging.
    
    HTTPClientConnection.java:
    Moved the disconnect logging from HTTPClientConnection ctor to CollectClientConnectionsFilter..doFilter() in line with other calls to disconnect logging.
    In sendIntermediateResponseMessage(), throw an exception.
    In disconnect(), removed the connection from the connection handler + log the disconnect.
    
    HTTPConnectionHandler.java:
    Added addClientConnection() and removeClientConnection().
    
    CollectClientConnectionsFilter.java:
    In doFilter(), called HTTPConnectionHandler.addClientConnection() and do not remove the client connection because it is removed when Rest2LDAP calls Connection.close() + called logConnect() + call client disconnect if we sent back the unauthorized status code.
    
    ClientConnection.java
    Added isInnerConnection().
    
    Operation.java, AbstractOperation.java, OperationWrapper.java:
    Added isInnerOperation() and setInnerOperation().
    
    AbstractTextAccessLogPublisher.java:
    Called Operation.isInnerOperation() and ClientConnection.isInnerConnection() instead of checking the connectionID.
    
    AbstractTextAccessLogPublisherTest.java:
    Updated the test.
    
    SdkConnectionAdapter.java
    In enqueueOperation(), setInnerOperation().
    In close(UnbindRequest, String), do not issue run the UnbindOperation if we were not authenticated, but issue a disconnect log message.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8746 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

12 Apr, 2013

2 commits


11 Apr, 2013

2 commits


10 Apr, 2013

2 commits

  • Fixed issues with two consecutive spaces appearing in the access log.
    
    AbstractTextAccessLogPublisherTest.java: ADDED
    
    AbstractTextAccessLogPublisher.java:
    Made RootFilter.isLoggable() defaut visibility to allow unit testing
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8722 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Output an error JSON document in case of authentication failure.
    
    CollectClientConnectionsFilter.java:
    In sendUnauthorizedResponseWithHTTPBasicAuthChallenge(), send a JSON document to the caller to bring the HTTP Connection Handler at par with the gateway.
    
    CollectClientConnectionsFilterTest.java:
    Updated tests.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8718 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

05 Apr, 2013

2 commits

  • AttributeBuilder.java:
    Added method add(ByteString) - to be used with the adapters' Converters class.
    
    AttributeBuilderTest.java:
    Added test method testAttributeBuilderAddByteString().
    Suppressed javadoc warnings + removed javadoc for exceptions.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8697 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Implemented authentication with a synchronous username search + bind.
    To come next: asynchronous username search + bind.
    
    
    HTTPAuthenticationConfig.java: ADDED
    
    build.xml, ivy.xml:
    Added some tests jars + updated grizzly to the newly released 2.3 stable version.
    
    CollectClientConnectionsFilter.java:
    Added HTTPAuthenticationConfig instance member to configure the HTTP auth from the JSON file.
    Added many methods to handle HTTP auth in a synchronous way. Will have to change this code to run asynchronously for performance.
    
    HTTPClientConnection.java:
    Changed a few signatures and types to handle more than Search operations.
    
    HTTPConnectionHandler.java:
    Added methods parseJsonConfiguration(), getAuthenticationConfig(), asString() and asBool() to read the config for HTTP Authentication.
    
    SdkConnectionAdapter.java:
    Handled several messages being sent through the same connection.
    Extracted methods enqueueOperation() from searchAsync().
    Implemented bindAsync().
    
    Adapters.java, Converters.java:
    Added new conversion methods.
    Renamed local variables to correctly use camel case.
    
    ConvertersTestCase.java:
    Removed try / catch / empty anti pattern.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8694 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

04 Apr, 2013

1 commit

  • Added NO_ATTRIBUTES for OID "1.1".
    
    Used SchemaConstants.NO_ATTRIBUTES throughout OpenDJ server's code.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8683 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

27 Mar, 2013

1 commit


26 Mar, 2013

3 commits


25 Mar, 2013

2 commits

  • Fixing build.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8634 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • TLSByteChannel.java:
    Extracted static method getSSF() to allow testing.
    Modified CIPHER_MAP: added WITH_ARIA_256, WITH_ARIA_128
    + removed the modes of operation CBC and GCM at the end of some cipher names
    + removed subsequent duplicates, sorted by SSF size descending (moved WITH_3DES_EDE)
    + fixed overlapping bug with WITH_DES and WITH_DES_CBC_40.
    
    TLSByteChannelTestCase.java: ADDED
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8632 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

22 Mar, 2013

1 commit


19 Mar, 2013

1 commit


18 Mar, 2013

1 commit