Skip to content

Latest commit

 

History

History
718 lines (567 loc) · 22.3 KB

CHANGELOG.adoc

File metadata and controls

718 lines (567 loc) · 22.3 KB

Changelog

Version 1.2.1

ID Type Description

#64

Bug Fix

Update versions of dependencies.

Version 1.2.0

ID Type Description

#55

Enhancement

Add support for multiple base directories for certificates.

#56

Enhancement

Read properties from stdin.

If the filename of the --prop parameter is a single dash -, stdin will be used to read properties from a flat key/value JSON document.

Example of flat key/value JSON
{
  "prop1": "value1",
  "prop2": "value2"
}
Note

This feature can be used to read properties from external sources (e.g. AWS Secrets Manager or Hashicorp Vault).

# Get properties from Vault key/value engine
vault kv get -format=json kv/apim/dev | jq -r .data.data | buildfed --prop=- -p src/gw.pol -e src/gw.env -c config/gw.config.json

# Get properties from AWS Secrets Manager
aws secretsmanager get-secret-value --secret-id apim/dev | jq -r .SecretString | buildfed --prop=- -p src/gw.pol -e src/gw.env -c config/gw.config.json

Version 1.1.0

ID Type Description

#53

Enhancement

The property configuration now supports JSON boolean values.

{
  "properties": {
    "enables": false (1)
  }
}
  1. Boolean values are now supported

#52

Bug

In case the entity field configuration file doesn’t exist the following error occurs:

AttributeError: EnvConfig instance has no attribute '_EnvConfig__origin_json_str'

This is fixed. If the configuration file doesn’t exists the file will be created automatically.

#51

Enhancement

Customized version name for .pol and .fed packages.

A new property axway.project.version is introduced to customize the version of .pol and .fed packages. As default the value will be set to ${project.version}. The version can be overwritten by a command line property or by a defined property within the pom.xml.

Example

Command line

$ mvn clean package -Daxway.project.version="${project.version}-BN20201031"

pom.xml
<properties>
  <axway.project.version>${project.version}-BN20201031</axway.project.version>
</properties>

#45

Enhancement

Docker capabilities.

Version 1.0.1

ID Type Description

#41

Enhancement

Improve error message in case of wrong certificate passphrase.

#46

Bug

Base path for certificates is ignored by apigw:deploy goal (server or policy projects).

If the apigw:deploy goal is executed for server or policy projects, the configuration of the base path for certificates is ignored.

Version 1.0.0

ID Type Description

#40

Enhancement

Base directory for certificate files.

Use the --base-dir parameter of the configuration tool or the axway.config.certs.basedir property of the plugin to specify the base directory for certificate files.

#39

Enhancement

Support for confidential properties.

For confidential properties the configuration tools supports to pass a secrets file. It is a JSON file where the values of the properties are encrypted by a key.

Version 0.12.0

ID Type Description

#35

Enhancement

Support removal of certificates.

A new certificate type empty is introduced for the update object of the certificate configuration file. It indicates that a certificate will be updated with an empty certificate and therefore will be removed.

{
  "certifictates": {
    "to-be-deleted": {
      "origin": {
        "info": {
          "not_after": "2020-08-23T20:24:00+02:00",
          "subject": "CN=localhost, O=ACME Inc., C=EX"
        }
      },
      "update": {
        "type": "empty" (1)
      }
    }
}
  1. Type empty will remove the certificate.

#36

Enhancement

The default source for new environmentalized fields is property.

Old default source
{
  "field#0": {
    "source": "value", (1)
    "type": "string",
    "used": true,
    "value": null
  }
}
  1. Previously the default source for new fields is value.

New default source
{
  "field#0": {
    "source": "property", (1)
    "type": "string",
    "used": true,
    "value": null
  }
}
  1. The new default source for new fields is property.

Note

In case of new environmentalized fields, the configuration file has to be edited to set the value for the new fields.

In case of the source of the value should be a property the name of the property has to be specified in the value attribute. Unfortunately it is easy to forget to also change the source attribute to property. As the default source is value the configuration tool will just configure the name of property instead of the content of the property, without any warning or error.

To prevent this pitfall the default source for new fields is property. This guarantees that the specified property exists. Also in case of the source has to be value, the configuration tool forces to switch the source attribute.

Version 0.11.2

ID Type Description

#34

Bug

For configuration files in the old format having fields with "property" attribute set to null, the field will not be upgraded to the newer version.

Example
"fields": {
  "attributeValue#0": {
    "property": null,
    "type": "string",
    "used": true,
    "value": "artifact"
  }
}

This results in the error message:

ERROR: ValueError(u"Missing 'source' property in field 'xxxxxx' of entity 'xxxxxx'",)

The bug is fixed and the configuration files will be upgraded to the new version, now.

Version 0.11.1

ID Type Description

#33

Bug

The configuration files are only updated if they are changed.

Also a bug is fixed where the configuration will not be updated even if the used state is changed. If a field is marked as unused, the configuration wasn’t updated even if the field is used now.

Version 0.11.0

ID Type Description

#31

Enhancement

The buildfed tool is enhanced to set properties from the content of a specified file.

A new -F NAME:FILE command line parameter is introduced.

Example:

$ buildfed ... -F description:config/description.txt

This will define a new property description which is populated from the content of the description.txt file.

#32

Enhancement

Build artifact information JSON.

For server and deployment archives the plugin will generate a gateway.info.json file. The file contains information about the version of the artifact and its dependencies.

On configuring the .fed package, the plugin passes the content of the gateway.info.json file as _system.artifact.info property to the buildfed tool. This enables the developer to use the contained JSON document to build an endpoint providing information about the currently deployed version.

Version 0.10.0

ID Type Description

#30

Enhancement

New property "source" for fields and certificates to specify the source for the values or passwords.

The are following advantages:

  • Easy extensibility for new sources (e.g. environment variables).

  • Easier to find missing configurations (search for "value": null or "password": null).

Environmentalized Fields

For field values there are separate properties ("property" and "value") to configure the field value (see example below).

Old Format
{
  "field#0": {
    "property": null, (1)
    "type": "string",
    "used": true,
    "value": null (2)
  }
}
  1. specifies a property as the source of the field value

  2. literal field value

A new property "source" is introduced to specify the source of the field value. The property defines the kind of the "value" property. In case of "source" is equal to "value" the field value is directly configured by the value of the "value" property. In case of "source" is equal to "property" the field value is retrieved from the property named by the "value" property.

New Format
{
  "field#0": {
    "source": "property", (1)
    "type": "string",
    "used": true,
    "value": "property.name" (2)
  },
  "field#1": {
    "source": "value", (3)
    "type": "string",
    "used": true,
    "value": "field value" (4)
  }
}
  1. specifies a property as the source of a field value

  2. field value is retrieved from the property named property.name

  3. field value is retrieved directly from "value"

  4. literal field value

Certificates

For certificate passwords there are separate properties ("password" and "password-property") to configure the password (see example below).

Old Format
"update": {
  "file": "cert/server.p12",
  "password": "server.password", (1)
  "type": "p12"
}
...
"update": {
  "file": "cert/server.p12",
  "password-property": "property.name", (2)
  "type": "p12"
}
  1. literal password value

  2. password is retrieved from a property named property.name

A new property "source" is introduced to specify the source of the certificate password. The property defines the kind of the "password" property. In case of "source" is equal to "password" the password is directly configured by the value of the "password" property. In case of "source" is equal to "property" the password is retrieved form the property named by the "password" property.

New Format
"update": {
  "file": "cert/server.p12",
  "password": "server.password", (1)
  "source": "password", (2)
  "type": "p12"
}
...
"update": {
  "file": "cert/server.p12",
  "password": "property.name", (3)
  "source": "property", (4)
  "type": "p12"
}
  1. literal password value

  2. password is retrieved directly from "password"

  3. password is retrieved from the property named property.name

  4. specifies a property as the source of the password

Note
Configuration files in the old format are automatically converted into the new format.

#29

Enhancement

Add support for environment variables for field and password configuration.

The source property new supports a new value env to specify an environment variable as the source for field values and certificate passwords.

Environmentalized Fields

  "field#0": {
    "source": "env", (1)
    "type": "string",
    "used": true,
    "value": "ENV_NAME" (2)
  }
  1. specifies an environment variable as the source of the field value

  2. field value is retrieved from the environment variable ENV_NAME

Certificates

"update": {
  "file": "cert/server.p12",
  "password": "SERVER_PASSWORD", (1)
  "source": "env", (2)
  "type": "p12"
}
  1. password is retrieved from the environment variable SERVER_PASSWORD

  2. specifies an environment variable as the source of the password

Version 0.9.2

ID Type Description

#28

Bug

The "process hasn’t exited" error on executing external commands is fixed.

Version 0.9.1

ID Type Description

#26

Enhancement

Add MinGW (Minimalistic GNU for Windows) support for buildfed.sh.

Remark: MinGW is provided as part of Git for Windows. This enhancement allows to execute the plugin within a Git Bash shell on Windows.

#27

Bug

The buildfed shall not update the in-memory entity store in simulation mode.

Version 0.9.0

ID Type Description

#22

Fix

Broken passphrase feature for API Gateway 7.6.2 is fixed.

#23

Enhancement

Support for multiple property files.

Additionally to the axway.config.props property, property files can be configured via the <configuration> element of the <plugin> element or via the axway.config.props.files property.

pom.xml
<plugin>
  <groupId>com.axway.maven.plugins</groupId>
  <artifactId>apigw-maven-plugin</artifactId>
  <version>${axway.maven.plugin.ver}</version>
  <extensions>true</extensions>
  <configuration>
    <configPropertyFiles> <!--(1)-->
      <configPropertyFile>${basedir}/a.json</configPropertyFile>
      <configPropertyFile>${basedir}/b.json</configPropertyFile>
    </configPropertyFiles>
  </configuration>
</plugin>
  1. Configure multiple property files.

command line
$ mvn package -Daxway.config.props.files=c.json,d.json

The files are used in the following order:

  1. File specified by axway.config.props property.

  2. Files specified in the <configuration> element.

  3. Files specified by axway.config.props.files property.

If a property exists in the multiple property files the value of from the last property file is used.

#24

Enhancement

Use Python logging for buildfed` tool.

Version 0.8.1

ID Type Description

#20

Fix

Configuration tool now supports API Gateway 7.5.3

#21

Fix

Support verbose mode of configuration tool for goal apigw:deploy.

Version 0.8.0

ID Type Description

#11

Enhancement

Deployment to gateway via plugin.

The plugin now supports to deploy a project directly via the plugin goal apigw:deploy. Only the standard deployment is supported. The deployment of static files and JARs are not supported.

New properties:

  • axway.anm.host: Host of the Admin Node Manager.

  • axway.anm.port: Port of the Admin Node Manager (default: 8090).

  • axway.anm.user: User to connect to the Admin Node Manager (default: admin).

  • axway.anm.password: Password of the user.

  • axway.deploy.group: Name of the group the project is deployed to.

  • axway.passphrase.pol: Passphrase for .pol and .env packages.

  • axway.passphrase.fed: Passphrase for .fed packages.

  • axway.passphrase.deploy: Passphrase for deployment group.

  • axway.config.envs: Path to environmentalized fields configuration file.

  • axway.config.certs: Path to certificates configuration file.

  • axway.config.props: Path to properties configuration file.

Deleted properties:

  • axway.passphrase.in: replaced by axway.passphrase.pol

  • axway.passphrase.out: replaced by axway.passphrase.out

  • propertyFile: replaced by axway.config.props

  • certsFile: replaced by axway.config.certs

Version 0.7.0

ID Type Description

#17

Enhancement

Check expiration of configured certificates.

The plugin and the configuration tool now supports to check if configured certificates expires within a given number of days. If at least one certificate expires within the time frame an error will be raised.

For the configuration tool the check is disabled by default.

For the plugin the default number of days is 10. To disable the check for the plugin specify set axway.tools.cfg.cert.expirationDays property to -1.

#18

Enhancement

Don’t create "info" section for "update" certificates. Information about the configured certificates are written to log instead.

Previously the configuration tool has written the "info" section (see below). This will change a source file, which is not suitable for build environments.

previous-cert-config.json
            "update": {
                "file": "cert/server.p12",
                "info": { (1)
                    "not_after": "2020-05-21T07:02:00+02:00",
                    "subject": "CN=server, O=Axway, L=Berlin, ST=Berlin, C=DE"
                },
                "password": "server",
                "type": "p12"
            }
  1. Information about the configured certificate, will no longer be created or updated.

The "info" section is no longer created or updated for "update" certificates.

cert-config.json
            "update": {
                "file": "cert/server.p12",
                "password": "server",
                "type": "p12"
            }
Note
To enable the previous behavior, use the --cert-config-update parameter of the configuration tool or the axway.tools.cfg.cert.updateConfigured property of the plugin.

#19

Fix

On flattening the resulting POM a NullPointerException occurred if the pom.xml has no <build> element (e.g. in case of the <build> element is defined in the parent POM).

The issue occurred for server and deployment projects.

Version 0.6.0

ID Type Description

#15

Enhancement

Optionally skip package goal.

For CI/CD pipelines it would be usefully to separate the package and deployment phase. A property axway.skipPackaging is provided to skip the package goal in case of the target archive already exists.

Note
There is no check if source files are newer than the target archive. So ensure that the package goal was executed before.

#16

Enhancement

Support simulation mode for configuration tool.

In simulation mode no output files (.fed or .env) are written. Also non existing certificate files will be ignored.

To ensure proper configuration files, unconfigured fields or certificates will still raise a build error.

Note
The buildtemplate tool is removed as it can be fully replaced by the buildfed tool.

Version 0.5.0

ID Type Description

#1

Enhancement

Configuration tool now supports passphrases for input archives (.pol and .env) and for output archives (.fed and .env).

Example:

buildfed -e gateway.env -p gateway.pol -c gateway.config.json -passphrase-in=foo -passphrase-out=bar --output-fed=gateway.fed

Uses the passphrase "foo" to open the gateway.env and gateway.pol archive and uses the passphrase "bar" to write the configured gateway.fed file.

Limitation:

  • For all input archives, the same passphrase will be used.

#2

Enhancement

The source directory layout for the configuration tool is changed. The tool can be invoked directly from the cloned project folder, now.

Example:

Windows

> git clone https://github.com/Axway-API-Management-Plus/apigw-maven-plugin.git
> cd apigw-mavem-plugin
> set AXWAY_HOME=c:\axway
> src\main\resources\scripts\buildfed.cmd -h

Unix

$ git clone https://github.com/Axway-API-Management-Plus/apigw-maven-plugin.git
$ cd apigw-mavem-plugin
$ export AXWAY_HOME=/opt/axway
$ src/main/resources/scripts/buildfed.sh -h

Extracting the tool from the Maven plugin via the apigw:tools goal is still supported.

#7

Fix

Configured certificates were not updated by configuration tool.

Now updating or adding certificates works as expected.

#6

Enhancement

Example for using standalone configuration tool added.

Folder: example/config-tool

#8

Enhancement

Working directories of PolicyStudio consolidated under a single .studio folder.

#3

Enhancement

Generate default .gitignore file on initialization.

#4

Enhancement

Maven plugin now supports passphrases for reading input packages and for writing output packages. Applicable for server and deployment packages only.

You can use the properties axway.passphrase.in and axway.passphrase.out to specify the passphrases for reading and writing packages.

Examples:

~/server-project$ mvn -Daxway.passphrase.out=changeme clean install

Generates a server archive containing passphrase protected .pol and .env packages.

~/deploy-project$ mvn -Daxway.passphrase.in=changeme -Daxway.passphrase.out=changed clean install

Uses a passphrase protected server archive and generates a deployment archive containing a passphrase protected .fed package.