30 Apr, 2013
2 commits
-
Fixed Checkstyle issue. git-svn-id: https://svn.forgerock.org/opendj/trunk@8814 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
29 Apr, 2013
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@8812 41b1ffd8-f28e-4786-ab96-9950f0a78031
26 Apr, 2013
3 commits
-
The test was failing due to concurrent modification exception. Using an iterator now to permit removing items from the map during the iteration. Additional minor cleanup. git-svn-id: https://svn.forgerock.org/opendj/trunk@8808 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@8807 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@8806 41b1ffd8-f28e-4786-ab96-9950f0a78031
25 Apr, 2013
1 commit
-
Consolidated common code for the *Logger classes prior to implementing the HTTP access log. AbstractLogger.java: ADDED Pulled up from the *Logger classes. AccessLogger.java, ErrorLogger.java, DebugLogger.java: Now inherit from AbstractLogger. Removed code pulled up into AbstractLogger: initializeErrorLogger(), isConfigurationAddAcceptable(), applyConfigurationAdd(), applyConfigurationChange(), isConfigurationDeleteAcceptable(), applyConfigurationDelete(), isJavaClassAcceptable(), getErrorPublisher(). Added the loggerStorage static variable. Added a ctor + implemented getJavaClassPropertyDefinition() and getStorage(). LoggerConfigManager.java: Replaced the calls to the various initialize*Logger() methods with calling initializeLogger(). Extracted method getLoggerInstance() and used it in all the other methods. LogPublisherConfiguration.xml: Pulled up the declaration of "java-class" property here from sub configurations. AccessLogPublisherConfiguration.xml, DebugLogPublisherConfiguration.xml, ErrorLogPublisherConfiguration.xml, LogPublisherConfiguration.xml: Replaced the declaration of "java-class" property by a property-override. StaticUtils.java: Added close(Collection<Closeable>) git-svn-id: https://svn.forgerock.org/opendj/trunk@8802 41b1ffd8-f28e-4786-ab96-9950f0a78031
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
-
Consolidated common code for the *LogPublisher classes prior to implementing the HTTP access log. LogPublisher.java: ADDED Unify all the *LogPublisher classes. Implements Closeable. AccessLogPublisher.java, DebugLogPublisher.java, ErrorLogPublisher.java: Now implementing LogPublisher. Pulled up isConfigurationAcceptable(), initialize*LogPublisher() renamed to initializeLogPublisher(), close(), getDN(). Removed syntactic/spaces differences between all these classes to better expose their commonalities. Used Set and MAp interfaces rather than comcrete classes. AccessLogger.java, ErrorLogger.java, DebugLogger.java: In isJavaClassAcceptable() and getAccessPublisher(), replaced method invocations via reflection by direct method calls. TextAccessLogPublisher.java, TextAuditLogPublisher.java, TextErrorLogPublisher.java, ThreadFilterTextErrorLogPublisher.java, TextDebugLogPublisher.java, ConsoleDebugLogPublisher.java: Consequence of renaming the initialize*LogPublisher() methods, or generecizing the isConfigurationAcceptable() methods in their parent classes. git-svn-id: https://svn.forgerock.org/opendj/trunk@8792 41b1ffd8-f28e-4786-ab96-9950f0a78031
23 Apr, 2013
5 commits
-
Reordered the inner classes so they appear in the same order as they are executed. git-svn-id: https://svn.forgerock.org/opendj/trunk@8785 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Fixed information leak on unsuccessful authentication: if the username was incorrect, the server was returning 404 (not found) instead of 401 (invalid credentials). When authentication was unsuccessful, the client was not receiving a response and the connection was not closed leaving it hanging. CollectClientConnectionFilter.java: In DoBindResultHandler.handleErrorResult(), send back an authentication failure when a search on the user name does not return a unique result. In sendAuthenticationFailure(), correctly complete the AsyncContext. In doFilter(), removed the call to AsyncContext.setTimeout(). git-svn-id: https://svn.forgerock.org/opendj/trunk@8784 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@8782 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
22 Apr, 2013
2 commits
-
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, InternalClientConnection.java, HTTPClientConnection.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@8776 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
19 Apr, 2013
1 commit
-
…va, ModifyRequestProtocolOp.java, SearchRequestProtocolOp.java: Replaced the use of collections' concrete classes by interfaces in the method signatures. TestModifyRequestProtocolOp.java: Consequence of the change above. git-svn-id: https://svn.forgerock.org/opendj/trunk@8772 41b1ffd8-f28e-4786-ab96-9950f0a78031
17 Apr, 2013
1 commit
-
StaticUtils.java: Added sleep(long). HTTPConnectionHandler.java, LDAPConnectionHandler.java: Used StaticUtils.sleep(long). git-svn-id: https://svn.forgerock.org/opendj/trunk@8760 41b1ffd8-f28e-4786-ab96-9950f0a78031
16 Apr, 2013
2 commits
-
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
-
OperationWrapper.java: Generecized the type of the wrapped operation. Added protected method getOperation() that returns the wrapped operation. AddOperationWrapper.java, BindOperationWrapper.java, CompareOperationWrapper.java, DeleteOperationWrapper.java, ModifyDNOperationWrapper.java, ModifyOperationWrapper.java, SearchOperationWrapper.java: Added the generic type to the superclass OperationWrapper. Got rid of specific instance members to old the operation with the correct type and called getOperation() instead. git-svn-id: https://svn.forgerock.org/opendj/trunk@8749 41b1ffd8-f28e-4786-ab96-9950f0a78031
15 Apr, 2013
3 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@8748 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
CR-1544. git-svn-id: https://svn.forgerock.org/opendj/trunk@8747 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
… 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
12 Apr, 2013
5 commits
-
…and post- read controls git-svn-id: https://svn.forgerock.org/opendj/trunk@8739 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Committing automated changes before real changes. Converted normal comments to javadocs. Removed abstract method declarations that are duplicating those from the interface. Operation.java: Moved run() here from AbstractOperation. git-svn-id: https://svn.forgerock.org/opendj/trunk@8738 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Committing automated changes before real changes. git-svn-id: https://svn.forgerock.org/opendj/trunk@8737 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@8735 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Added the possibility for the HTTP Connection Handler to accept unauthenticated requests. CollectClientConnectionsFilter.java: Extracted method getAuthenticationInfo() and added support for unauthenticated requests here. CollectClientConnectionsFilterTest.java: Added tests. HTTPConnectionHandler.java: Added acceptUnauthenticatedRequests(). config.ldif, 02-config.ldif, HTTPConnectionHandlerConfiguration.xml, HTTPConnectionHandlerCfgDefn.properties: Added property 'ds-cfg-authentication-required' with default 'true' to HTTP Connection Handler git-svn-id: https://svn.forgerock.org/opendj/trunk@8733 41b1ffd8-f28e-4786-ab96-9950f0a78031
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
-
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
09 Apr, 2013
2 commits
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@8716 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@8714 41b1ffd8-f28e-4786-ab96-9950f0a78031
08 Apr, 2013
3 commits
-
Resolve race condition in Windows Services when stopping the server. git-svn-id: https://svn.forgerock.org/opendj/trunk@8705 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
… the HTTP connection handler SdkConnectionAdapter.java: Implemented all operations. I could test REST create and delete operations. git-svn-id: https://svn.forgerock.org/opendj/trunk@8704 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
… config settings to latest recommendations / expected machine capabilities. * db-evictor-lru-only - change to false (depth based then lru) since it exhibits better behavior in partially cached deployments and does not impact cases where the DB is fully cached * db-log-file-max - increase back to 100MB due to recent improvements in JE which mean that smaller file sizes are no longer needed. Bigger log files means less of them, less frequent fsyncs, and less FDs * db-checkpointer-bytes-interval - increased to 500MB. The increased recovery time is minimal and a bigger checkpoint interval dramatically reduces the risk of persisting volatile data to disk * disk-low-threshold - updated to 200MB to align with increased log file size * disk-full-threshold - updated to 100MB to align with increased log file size git-svn-id: https://svn.forgerock.org/opendj/trunk@8703 41b1ffd8-f28e-4786-ab96-9950f0a78031
05 Apr, 2013
4 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
-
Making checkstyle happy. git-svn-id: https://svn.forgerock.org/opendj/trunk@8696 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
Making checkstyle happy. git-svn-id: https://svn.forgerock.org/opendj/trunk@8695 41b1ffd8-f28e-4786-ab96-9950f0a78031
-
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
04 Apr, 2013
1 commit
-
git-svn-id: https://svn.forgerock.org/opendj/trunk@8691 41b1ffd8-f28e-4786-ab96-9950f0a78031