Skip to content

Commit

Permalink
Release 2.4.0 (#50)
Browse files Browse the repository at this point in the history
* Fix typo in config file (#44)

* Enhance request reader (#46)

* Replaced forceStop with recoverable error

- DirectoryPollingModule now moves the file to the error directory if it fails to process, instead of relying on forceStop
- DirectoryResenderModule already had error directory handling, simply removed forceStop

* Revert "#15 Provide recoverable solution to invalid file name in "toAny" folder"

* Release version 2.3.0 (#35)

* Upgrade to latest BuncyCastle libraries

* Cater for JRE and JDK location of JSSE certificate file

* Update developers guide

* Refactored maven configuration

- Introduced maven wrapper in order to stick to certain version of maven and eliminate dependency on local installation
- Moved dependencies and plugins to parent in order to have a single point version declaration
- Remove unnecessary configurations from poms
- Fix modules hierarchy
- Introduced SNAPSHOT version for further configuration of release process
- Removed IDE specific files
- Update .gitignore

* Improved Maven config

- Added automatically copied dependencies, no need to put jars into lib manually
- Renamed artifact names to standard since start-up scripts were improved
- Scripts and configs were relocated for further release process configuration
- Introduced maven-site-plugin for documentation uploading
- Removed obsolete Ant configuration since Maven wrapper can be used.

* State processing value fixes (#27)

* Fix the DIRECTION setting for database logging
* Set FILE_NAME of payload as early as possible to ensure it is logged in the state processing log events

* Fix uuid in stored file name (#28)

* Fix the DIRECTION setting for database logging

* Set FILE_NAME of payload as early as possible to ensure it is logged in
the state processing log events

* Remove redundant import

* Using direct setOption call instead.

* Remove automatically appending a UUID to the stored inbound files name

* Make OpenAS2Server more testable (#29)

* Make OpenAS2Server more testable

- Added a build for OpenAS2Server instance.
- Command processor initialization moved to XMLSession.
- H2DBHandler moved to appropriate package.
- Graceful shutdown on exit command.
- Added an integration test.
- All threads and timers were named in order to simplify profiling.
- Introduced a scheduler component for periodical tasks.
- Code cleanup and re-formatting.
- Bumped version.

* Minor enhancements and bugfixes (#30)

* Make message Id globally reconfigurable

* Make session object available in resend method to facilitate DB logging

* Update to use a specified format to avoid failure when format is
changed.

* Use a common method for generating the message ID between AS2 message
and MDN response

* Support InvalidParameterException exception in generatMessageId method

* Make information about app available as properties

* Use the Properties object for app info

* Remove hard coded app info

* Use Properties for app title

* Remove redundant method

* The terminate method will either call server shutdown method or teminate
JVM depending on flag

* Add the global default format for message ID generation

Change fileid to filename for format attribute on the generic directory
polling module instance

* Support access to server object via session and add mechanism to
determine if JVM shutdown should be allowed

* Allow payload file name to be accessed via message object if not
extracted from disposition

* Allow storing the server object

* Use common methid for genrating message ID.
Add some trace  logging to simplify debug

* Changes to support using external databases and make embedded DB handler
more generic to allow easier replacement with other embedded DB

* Persist all message attributes for pending files to retain information
through the lifecycle of the sent messages

* Support Random parameters on MDN file name format string

* Add 2 new paramters for controlling the DB tracking database

* Copy new "resources" folder containing DB utilities into distribution
package

* Start extending the developer related documentation

* Various additions and enhancements to documentation for 2.3.0 release

* Add a resend queued message state

* Split building the metadata from the actual message to facilitate new
functionality that depends on the metadata

* Support PRIOR_MSG_ID column for back reference tpo previous message send
attempt

* Add a state message log when resend is going to be attempted to provide
a final state to the old message

* Tools to create database table SQL and manage upgrade to database

* Sample script to run DDLUtils builder

* Set formal release number

* Update for latest release

* Refined LogManager (#31)

- Added default logger for cases when no logger are configured.
- Refactored initialization of LogManager

* Proxy server plus bug fixes (#33)

* Fixed exit command

- Added Session lifecycle controls.
- H2 server thread was still running event after shutdown() that prevented server from shutdown.

* Set the class to ActiveModule when building and returning a list of
active modules to avoid unnecessary class casts and check for running
modules to stop to avoid unnecessary calls.

* Remove call to stop modules method in stop() method for session since
destroy() method on processors modules does that.

* Add additional debug message to facilitate debugging

* Support proxy server

Support proxy authentication
Support handing the openConnection() method a proxy instance

* Remove redundant imports

* Support ASYNC MDN send retry

* Add default "retries" attribute to AS2SenderModule and
AsyncMDNSenderModule

* Support extracting key/value pairs from XML without changing key to
lowercase

* Avoid changing property names to lowercase when pushed into Properties
object

* Enhanced documentation and added Proxy server information

* Prevent the "fallback" parameter being set as the property value

* Release documentation

* Release notes updated

* Updated the valid version statement for new release

* Move messaging so it is relevant to the stage it is at. (#34)

* Minor enhancement to HTTP reader for debugging

* Healthcheck (#49)

* Rework to allow for a more generic use

* Initial basic health check module

* Include sample module config for health check module

* Release notes for 2.4.0

* Version 2.4.0

* Add deployment via Sonatype to maven central

* Updated documentation for new release enhancements.

* Remove from repo as incorrectly uploaded

* Fix Javadoc issues

* Add developer info
  • Loading branch information
uhurusurfa authored Sep 25, 2017
1 parent 41f925e commit 62d1a99
Show file tree
Hide file tree
Showing 33 changed files with 658 additions and 7,276 deletions.
2 changes: 1 addition & 1 deletion Bundle/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>net.sf.openas2</groupId>
<artifactId>OpenAS2</artifactId>
<version>2.3.2</version>
<version>2.4.0</version>
</parent>

<artifactId>openas2-osgi</artifactId>
Expand Down
15 changes: 8 additions & 7 deletions RELEASE-NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
OpenAS2 Server
Version 2.3.2
Version 2.4.0
RELEASE NOTES

The OpenAS2 project is pleased to announce the release of OpenAS2 2.3.2
The OpenAS2 project is pleased to announce the release of OpenAS2 2.4.0

The release download file is: OpenAS2Server-2.3.2.zip
The release download file is: OpenAS2Server-2.4.0.zip
The zip file contains a PDF document providing information on installing and using the application.

Version 2.3.2 - 2017-08-17
This is a minor enhancement release:
Version 2.4.0 - 2017-09-25
This is an enhancement release:
IMPORTANT NOTE: Please review upgrade notes below if you are upgrading

1. Enhance the HTTP reader to allow logging the raw data when unable to determine how to process the data
2. Correct the config.xml that was missing a $ sign in the log file name
1. Add initial basic health check listener on HTTP port for load balancer/high availability deployment
2. Enhance POM to deploy code base to central maven repository


Upgrade Notes
See the openAS2HowTo appendix for the general process on upgrading OpenAS2.
Expand Down
2 changes: 1 addition & 1 deletion Remote/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>net.sf.openas2</groupId>
<artifactId>OpenAS2</artifactId>
<version>2.3.2</version>
<version>2.4.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
Expand Down
5 changes: 1 addition & 4 deletions Remote/src/main/java/org/openas2/remote/SocketLogging.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public SocketLogging(int port) throws IOException {
* add a new line character if told to
* repeat
* @param out - PrintStream object to log to
* @param doCRLF - after each logging event add a new line ?
* @param addOn - after each logging event add a new line ?
* @throws IOException - socket or io errors are possible
*/
public void logToPrintStream(PrintStream out, String addOn) throws IOException {
Expand All @@ -57,9 +57,6 @@ public void logToPrintStream(PrintStream out, String addOn) throws IOException

}

/**
*
*/
public void close() {
try {
ss.close();
Expand Down
2 changes: 1 addition & 1 deletion Server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>net.sf.openas2</groupId>
<artifactId>OpenAS2</artifactId>
<version>2.3.2</version>
<version>2.4.0</version>
</parent>

<artifactId>openas2-server</artifactId>
Expand Down
7 changes: 7 additions & 0 deletions Server/src/config/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,5 +137,12 @@
resenddir="%home%/../data/resend"
errordir="%home%/../data/resend/error"
resenddelay="60"/>
<!--
<module classname="org.openas2.processor.receiver.HealthCheckModule"
port="10099"
/>
-->


</processor>
</openas2>
2 changes: 1 addition & 1 deletion Server/src/main/java/org/openas2/BaseSession.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public abstract class BaseSession implements Session {
/**
* Creates a <code>BaseSession</code> object, then calls the <code>init()</code> method.
*
* @throws OpenAS2Exception
* @throws OpenAS2Exception - - Houston we have a problem
* @see #init()
*/
public BaseSession() throws OpenAS2Exception
Expand Down
5 changes: 1 addition & 4 deletions Server/src/main/java/org/openas2/Component.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,17 +49,14 @@ public interface Component {
* @param session the component uses this object to access other components
* @param parameters configuration values for the component
* @throws OpenAS2Exception If an error occurs while initializing the component
* @throws InvalidParameterException If a required parameter is null in the parameters
* Map
* @see #getParameter(String key, boolean required)
* @see Session
*/
public void init(Session session, Map<String, String> parameters) throws OpenAS2Exception;

/**
* Component lifecycle hook. If lifecycle of {@link Component} requires a destroy function this method can be used.
*
* @throws Exception
* @throws Exception Something went wrong
* @see #init(Session, Map)
* @see Session
*/
Expand Down
16 changes: 8 additions & 8 deletions Server/src/main/java/org/openas2/Session.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
/**
* The <code>Session</code> interface provides configuration and resource information, and a means for
* components to access the functionality of other components.
* The <code>Session</code> has its own lifecycle controlled by two methods {@link #start()} and {@link #close()}.
* The <code>Session</code> has its own lifecycle controlled by two methods {@link #start()} and {@link #stop()}.
*
* @author Aaron Silinskas
* @see Component
* @see org.openas2.cert.CertificateFactory
* @see org.openas2.partner.PartnerFactory
* @see org.openas2.partner.PartnershipFactory
* @see org.openas2.processor.Processor
*/
public interface Session {
Expand All @@ -25,22 +25,22 @@ public interface Session {
/**
* Lifecycle control method.
*
* @throws Exception
* @throws Exception - - Houston we have a problem
*/
void start() throws Exception;

/**
* Lifecycle control method.
*
* @throws Exception
* @throws Exception - - Houston we have a problem
*/
void stop() throws Exception;

/**
* Short-cut method to retrieve a certificate factory.
*
* @return the currently registered <code>CertificateFactory</code> component
* @throws ComponentNotFound If a <code>CertificateFactory</code> component has not been
* @throws ComponentNotFoundException If a <code>CertificateFactory</code> component has not been
* registered
* @see CertificateFactory
* @see Component
Expand All @@ -52,7 +52,7 @@ public interface Session {
*
* @param componentID ID to search for
* @return the component registered to the ID or null
* @throws ComponentNotFound If a component is not registered with the ID
* @throws ComponentNotFoundException If a component is not registered with the ID
*/
Component getComponent(String componentID) throws ComponentNotFoundException;

Expand All @@ -67,7 +67,7 @@ public interface Session {
* Short-cut method to retrieve a partner factory.
*
* @return the currently registered <code>PartnerFactory</code> component
* @throws ComponentNotFound If a <code>PartnerFactory</code> component has not been registered
* @throws ComponentNotFoundException If a <code>PartnerFactory</code> component has not been registered
* @see PartnershipFactory
* @see Component
*/
Expand All @@ -77,7 +77,7 @@ public interface Session {
* Short-cut method to retrieve a processor.
*
* @return the currently registered <code>Processor</code> component
* @throws ComponentNotFound If a <code>Processor</code> component has not been registered
* @throws ComponentNotFoundException If a <code>Processor</code> component has not been registered
* @see Processor
* @see Component
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* used to parse commands from the socket command processor
* message format
* <command userid="abc" pasword="xyz"> the actual command </command>
* &lt;command userid="abc" pasword="xyz"&gt; the actual command &lt;/command&gt;
*
* @author joseph mcverry
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* actual socket command processor
* takes commands from socket/port and passes them to the OpenAS2Server
* message format
* <command userid="abc" pasword="xyz"> the actual command </command>
* &lt;command userid="abc" pasword="xyz"&gt; the actual command &lt;/command&gt;
* <p>
* when inited the valid userid and password is passed, then as each
* command is processed the processCommand method verifies the two fields correctness
Expand Down
11 changes: 6 additions & 5 deletions Server/src/main/java/org/openas2/lib/helper/BCCryptoHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -654,12 +654,13 @@ protected String convertAlgorithm(String algorithm, boolean toBC)


/**
* @param algorithm
* @return the OutputEncryptor of the given hash algorithm
* @throws NoSuchAlgorithmException
* @description Looks up the correct ASN1 OID of the passed in algorithm string and returns the encryptor.
* Looks up the correct ASN1 OID of the passed in algorithm string and returns the encryptor.
* The encryption key length is set where necessary
* <p>
*
* @param algorithm The name of the algorithm to use for encryption
* @return the OutputEncryptor of the given hash algorithm
* @throws NoSuchAlgorithmException - Houston we have a problem
*
* TODO: Possibly just use new ASN1ObjectIdentifier(algorithm) instead of explicit lookup to support random configured algorithms
* but will require determining if this has any side effects from a security point of view.
*/
Expand Down
1 change: 1 addition & 0 deletions Server/src/main/java/org/openas2/logging/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,7 @@ public void setLevel(int currentLogLevel) {

/**
* Get logging level.
* @return the current logging level
*/
public int getLevel() {
return currentLogLevel;
Expand Down
4 changes: 3 additions & 1 deletion Server/src/main/java/org/openas2/logging/LogManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public static LogManager getLogManager()
}

/**
* Check to confirm the logger is registered with Apache library
* @return the registeredWithApache
*/
public static boolean isRegisteredWithApache()
Expand Down Expand Up @@ -56,7 +57,8 @@ public void log(@Nonnull Throwable e, boolean terminated)
}

/**
* @param level
* Logs a message to the configured logging systems
* @param level - current log level
* @param clazzName - the name of the class that the log was generated in
* @param msg - the logging object to create the message from
*/
Expand Down
6 changes: 3 additions & 3 deletions Server/src/main/java/org/openas2/logging/Logger.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ public interface Logger extends Component {

/**
*
* @param level
* @param msgText
* @param message
* @param level The log level we are spewing out
* @param msgText The message to log
* @param message The context object that will provide additional information
*/
public void log(Level level, String msgText, Message message);

Expand Down
4 changes: 1 addition & 3 deletions Server/src/main/java/org/openas2/message/AS2Message.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@


public class AS2Message extends BaseMessage implements Message {
/**
*
*/

private static final long serialVersionUID = 1L;
public static final String PROTOCOL_AS2 = "as2";

Expand Down
9 changes: 2 additions & 7 deletions Server/src/main/java/org/openas2/message/AS2MessageMDN.java
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
package org.openas2.message;

import org.apache.commons.lang3.RandomStringUtils;
import org.openas2.params.InvalidParameterException;
import org.openas2.partner.AS2Partnership;
import org.openas2.partner.CustomIDPartnership;
import org.openas2.partner.Partnership;
import org.openas2.util.DateUtil;

public class AS2MessageMDN extends BaseMessageMDN {
public static final String MDNA_REPORTING_UA = "REPORTING_UA";
Expand All @@ -31,10 +26,10 @@ public AS2MessageMDN(AS2Message msg, boolean copyMsgHeaders)
}

/**
* Generate Random Message ID based on data in the preconfigured format, sender and receiver Ids.
* Generate Random Message ID based on data in the preconfigured format, sender and receiver IDs.
*
* @return a string
* @throws InvalidParameterException
* @throws InvalidParameterException - the message ID generator could not identfy a parameter in the ID format string
*/
@Override
public String generateMessageID() throws InvalidParameterException
Expand Down
8 changes: 4 additions & 4 deletions Server/src/main/java/org/openas2/message/BaseMessage.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,16 +136,16 @@ public void setCompressionType(String myCompressionType) {
}

/**
* @since 2007-06-01
* @return
* Gets the "Content-Disposition" header from the message object
* @return the string value of the header
*/
public String getContentDisposition() {
return getHeader("Content-Disposition");
}

/**
* @param contentDisposition
* @since 2007-06-01
* Sets the "Content-Disposition" header in the message object
* @param contentDisposition the string value to be set
*/
public void setContentDisposition(String contentDisposition)
{
Expand Down
8 changes: 4 additions & 4 deletions Server/src/main/java/org/openas2/params/ParameterParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public abstract void setParameter(String key, String value)
/**
* Set parameters from a string, like "msg.sender.as2_id=ME,msg.headers.content-type=application/X12"
* @param encodedParams string to parse
* @throws InvalidParameterException
* @throws InvalidParameterException - error in the parameter format string
*/
public void setParameters(String encodedParams) throws InvalidParameterException {
StringTokenizer params = new StringTokenizer(encodedParams, "=,", false);
Expand All @@ -42,7 +42,7 @@ public void setParameters(String encodedParams) throws InvalidParameterException
* <code>msg.sender.as2_id,msg.receiver.as2_id,msg.header.content-type</code>
* @param delimiters delimiters in string to parse, like "-."
* @param value string to parse, like <code>"NORINCO-WALMART.application/X12"</code>
* @throws OpenAS2Exception
* @throws OpenAS2Exception - error in the parameter format string
*/
public void setParameters(String format, String delimiters, String value)
throws OpenAS2Exception {
Expand Down Expand Up @@ -70,7 +70,7 @@ public void setParameters(String format, String delimiters, String value)
* @param format the format to fill in
* @param parser the place to get the parsed info
* @return the filled in format
* @throws InvalidParameterException
* @throws InvalidParameterException - error in the parameter format string
*/
public static String parse(String format, ParameterParser parser)
throws InvalidParameterException
Expand All @@ -82,7 +82,7 @@ public static String parse(String format, ParameterParser parser)
* Fill in a format string with information from a ParameterParser
* @param format the format string to fill in
* @return the filled in format string.
* @throws InvalidParameterException
* @throws InvalidParameterException - error in the parameter format string
*/
public String format(String format) throws InvalidParameterException {
StringBuffer result = new StringBuffer();
Expand Down
2 changes: 2 additions & 0 deletions Server/src/main/java/org/openas2/pgp/PGPEncryptionUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public PGPEncryptionUtil(PGPPublicKey key, String payloadFilename, OutputStream

/**
* Get an output stream connected to the encrypted file payload.
* @return The output stream for the payload to be sent
*/
public OutputStream getPayloadOutputStream()
{
Expand All @@ -80,6 +81,7 @@ public OutputStream getPayloadOutputStream()

/**
* Close the encrypted output writers.
* @throws IOException - stream handling had a problem
*/
public void close() throws IOException
{
Expand Down
Loading

0 comments on commit 62d1a99

Please sign in to comment.