23 May, 2013

2 commits

  • 
    
    HTTPS was wrongly configured: code was configuring an SSLEngine that was then never used.
    Changed the code to configure an SSLEngineConfigurator that is passed down to Grizzly HTTP server.
    
    
    
    (Un)surprisingly I hit a bug on my Linux Mint:
    https://bugs.launchpad.net/ubuntu/+source/openjdk-6/+bug/1006776
    I had to modify /etc/java-6-openjdk/security/java.security so it uses the sun Elliptic Curve implementation by changing the line
        security.provider.9=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
    to
        security.provider.9=sun.security.ec.SunEC
        #security.provider.10=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/nss.cfg
    
    
    
    HTTPConnectionHandler.java:
    Replaced instance members sslContext and sslEngine with sslEngineConfigurator.
    Renamed createSSLEngine() into createSSLEngineConfigurator().
    In createSSLContext(), removed the try / catch block duplicated with the one in createSSLEngineConfigurator().
    As a consequence, the following methods changed: configureSSL(), getEnabledSSLCipherSuites(), getEnabledSSLProtocols(), getSSLEngine(), isConfigurationAcceptable(), startHttpServer().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8901 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • OPENDJ-914 Upgrade should add Based HTTP Access Logger to config.ldif
    - HTTP connection handler and the based HTTP access logger are now added to upgrade.
    - The http-config.json is added to the config file during upgrade.
    - Simplified UpgradeTasks.java
    - Added new messages.
    - Fixed javadoc for unit test.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8895 41b1ffd8-f28e-4786-ab96-9950f0a78031
    violette
     

22 May, 2013

2 commits

  • OPENDJ-858 Add stats tracking to HTTP client connections
    
    
    The value output by the "cs-uri-query" extended log format was incorrect, the URL parameters should have been separated by a question mark character '?' instead of a slash character '/'.
    
    
    HTTPClientConnection.java:
    Used a question mark character '?' to build the uri query.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8893 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    Protected the HTTP Connection Handler against a failing initialization: after two consecutive startup failures, the HTTP connection handler will be disabled, errors will be logged and alerts will be output.
    
    
    HTTPConnectionHandler.java:
    Added instance member enabled to decouple the enable/disable state from the config.
    Implemented getAlerts() method.
    In startHttpServer(), moved the try / catch block and the call to notify() to the run() method.
    In run(), handle failing initialization.
    In stopHttpServer(), added a null check in case of failed intitialization.
    Extracted method cleanUpHttpServer().
    
    ServerConstants.java:
    Added alerts for HTTP connection handler.
    
    protocol*.properties:
    Modified the name of the LDAP specific properties to be more generic.
    
    LDAPConnectionHandler.java
    Consequence of the change to protocol.properties.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8891 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

21 May, 2013

4 commits

  • * set the default window size to 100K
    * indicate that the properties may be deprecated in future releases
    * tag properties as advanced.
    
    Reviewed manually by Ludo.
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8888 41b1ffd8-f28e-4786-ab96-9950f0a78031
    matthew
     
  • OPENDJ-858 (CR-1702) Add stats tracking to HTTP client connections
    
    
    
    In HTTP access log, changed the name of the non standard "datetime" field to "x-datetime".
    Added the "x-etime" field that outputs as a number.
    Added validation for the log format that outputs error messages.
    
    
    FileBasedHTTPAccessLogPublisherConfiguration.xml, FileBasedHTTPAccessLogPublisherConfiguration.properties:
    Renamed the "datetime" field to "x-datetime" + added the "x-etime" field.
    Improved the description of the ds-cfg-log-format.
    
    TextHTTPAccessLogPublisher.java, config.properties:
    Extracted constants for all supported field names.
    Added ALL_SUPPORTED_FIELDS constant.
    Changed logFormatFields instance member from String[] to List<String>.
    Added validateLogFormat() which can output new error messages and called it from applyConfigurationChange() and initializeLogPublisher().
    Added subtract().
    
    HTTPClientConnection.java, HTTPRequestInfo.java:
    Added instance member totalProcessingTime.
    In sendResponse(), added to the totalProcessingTime + extracted method getProcessingTime().
    Added getTotalProcessingTime().
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8885 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …d as internal operations.
    
    SdkConnectionAdapter.java:
    In close(), marked the UnbindOperationBasis as being an internal/inner operation.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8884 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …ions when it should be
    
    Code review: matthew
    
    
    AbstractTextAccessLogPublisher.java:
    Fixed the bug by coming back a bit to what the old code was doing (it is not totally comparable).
    
    AbstractTextAccessLogPublisherTest.java:
    Updated the test.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8881 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

17 May, 2013

3 commits


16 May, 2013

1 commit


15 May, 2013

2 commits


14 May, 2013

3 commits

  • git-svn-id: https://svn.forgerock.org/opendj/trunk@8869 41b1ffd8-f28e-4786-ab96-9950f0a78031
    cjr
     
  • 
    
    Added support for ds-cfg-num-request-handlers in the HTTPConnectionHandler configuration to bring it at par with the LDAPConnectionHandler configuration.
    
    
    
    02-config.ldif, HTTPConnectionHandlerConfiguration.xml, HTTPConnectionHandlerCfgDefn.properties:
    Added ds-cfg-num-request-handlers.
    
    HTTPConnectionHandler.java:
    Set the SelectorRunnersCount in grizzly based on the numRequestHandlers property.
    
    LDAPConnectionHandler.java, ConnectionHandler.java:
    Moved getNumRequestHandlers() from LDAPConnectionHandler to ConnectionHandler.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8868 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    
    Now monitoring total etime for each supported HTTP method.
    While implementing this, I noticed that HTTPRequestInfo was duplicating fields in HTTPClientConnection and adding little more. I moved the missing data in HTTPRequestInfo to HTTPClientConnection and transformed the HTTPRequestInfo class into an interface to keep zero coupling between logging and HTTPClientConnection.
    
    
    
    HTTPRequestInfo.java:
    Transformed this class into an interface.
    Renamed getRemoteHost() to getClientHost() and getRemoteAddress() to getClientAddress().
    
    HTTPClientConnection.java
    Now implements HTTPRequestInfo.
    Moved several fields from HTTPRequestInfo here + added missing getters and setters.
    In sendResponse(), calling HTTPStatistics.updateRequestMonitoringData().
    Added log().
    
    TextHTTPAccessLogPublisher.java:
    Consequence of the changes to HTTPRequestInfo.
    Also added support for the "c-port", "s-ip", "s-computername", and "s-port" fields.
    
    CollectClientConnectionsFilter.java, SdkConnectionAdapter.java:
    Consequence of the changes to HTTPRequestInfo.
    
    HTTPStatistics.java:
    Renamed instance members nbRequests to requestMethodsTotalCount and nbRequestsTotalCount to requestsTotalCount.
    Added requestMethodsTotalTime instance member.
    Completed the constructor, clearStatistics(), getMonitorData().
    Fixed clearStatistics().
    Added addAll(), updateRequestMonitoringData().
    
    02-config.ldif:
    Added attributes for monitoring the total etime of HTTP requests.
    Renumbered some previously added attributes to follow what is done for LDAP operations etime.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8862 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

13 May, 2013

4 commits

  • In getValuesHistorical(), simplified the code by removing useless generics.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8860 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • Added support for monitoring statistics of the HTTP connection handler:
    It monitors: total number of requests, and number of delete, get, patch, post and put requests.
    It also monitors the internal LDAP operations to display how the server is performing.
    
    
    HTTPConnectionHandler.java, HTTPClientConnection.java, CollectClientConnectionsFilter.java, SdkConnectionAdapter.java:
    Added support for statistics.
    
    config.ldif, HTTPConnectionHandlerConfiguration.xml, HTTPConnectionHandlerCfgDefn.properties:
    Added "keep-stats" property.
    
    02-config.ldif:
    Added attributes "ds-mon-http-*" for monitoring HTTP statistics.
    
    LDAPStatistics.java:
    Changed getMonitorData() return type to List.
    Made createAttribute protected.
    
    HTTPStatsProbe.java, HTTPStatistics.java: ADDED
    
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8859 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • HTTPConnectionHandler.java, HTTPClientConnection.java, CollectClientConnectionsFilter.java, SdkConnectionAdapter.java:
    Added support for statistics.
    
    02-config.ldif, config.ldif, HTTPConnectionHandlerConfiguration.xml, HTTPConnectionHandlerCfgDefn.properties:
    Added "keep-stats" property.
    
    02-config.ldif:
    Added attributes "ds-mon-http-*" for monitoring HTTP statistics.
    
    LDAPStatistics.java:
    Changed getMonitorData() return type to List.
    Made createAttribute protected.
    
    HTTPStatsProbe.java, HTTPStatistics.java: ADDED
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8857 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • …has not been upgraded.
    - Fixed. The tools 'make-ldif' and 'create-rc-scripts' can still be used between unpacking and upgrade.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8856 41b1ffd8-f28e-4786-ab96-9950f0a78031
    violette
     

07 May, 2013

2 commits


06 May, 2013

4 commits


03 May, 2013

2 commits

  • 
    Warn about non existing HTTP access logger when the HTTP connection handler is starting (was when loggers are initialized).
    
    
    LoggerConfigManager.java, HTTPConnectionHandler.java:
    Moved the warning about non existing HTTP access logger from LoggerConfigManager.initializeLoggerConfig() to HTTPConnectionHandler.startServer().
    
    HTTPAccessLogger.java:
    Made getHTTPAccessLogPublishers() public.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8839 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • 
    
    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
     

02 May, 2013

3 commits


01 May, 2013

2 commits


30 Apr, 2013

2 commits

  • Fixed Checkstyle issue.
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8814 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     
  • AttrHistoricalMultiple.java, AttrHistoricalSingle.java:
    Changed comments to javadocs.
    Fixed condition checking.
    Inlined local variables and used the field instead.
    Replaced use of Boolean with boolean.
    
    We were looking at this code with Ludo and thought replacing the List with a Map had to be done in conjunction with breaking up AttrValueHistorical class to reduce memory usage (removing stroing unnecessary references).
    The value field should be used as the key of the Map, and the value of the Map should contain an object with a reference to a ChangeNumber and a boolean indicating whether it is an update or a delete (Since they are mutually exclusive).
    
    git-svn-id: https://svn.forgerock.org/opendj/trunk@8813 41b1ffd8-f28e-4786-ab96-9950f0a78031
    JnRouvignac
     

29 Apr, 2013

1 commit


26 Apr, 2013

3 commits