Git Product home page Git Product logo

apigw-maven-plugin's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

apigw-maven-plugin's Issues

Check certificate expiration

As Is

If certificates are configured to be added or to be replaced, there is no check of the expiration date of the certificates.

To Do

Enable the configuration tool to check configured certificates for expiration.

Generate JSON archive description

Additionally to the 'gateway.pol' and 'gateway.env' files the plugin shall generate a gateway.info.json file. The file will contain a JSON, describing the content of the archive.

Additionally the plugin will pass the content of the gateway.info.json file to the _system.artifact.info property of the buildfed tool.

The property can be used to build information endpoints which return a JSON document of the currently deployed version.

Consolidate working directories for PolicyStudio

For each project separate working directories are used for PolicyStudio. This enables parallel instances and project specific configuration of PolicyStudio.

Currently two separate directories (".data" and ".policystudio") within the project folder are used.

The two directories should be consolidated under a single ".studio" directory within the project folder.

How to auto-generate the gateway.certs.json?

I could not find in the documentation any way to auto-generate the gateway.certs.json
Similar to what happen with the "gateway.config.json", I was expecting to have it auto generated either from a "/certs" dir containing e.g. .PEM or .CRT files or from the certs inside my server project.

Inconsistent update of configuration files

Bug

Configuration files will not be updated even if the content is changed.

E.g. fields marked as unused are not refreshed even if the they are used in the newer version.

Also certificate configuration files are updated even if the content isn't changed.

Standard gateway deployment via plugin

As Is

Currently the deployment archives have to deployed to the gateway manually or via a custom script.

To Be

Project can be deployed to a gateway group via the plugin.

  • Policy Project: Test server project will be deployed to gateway.
  • Server Project: The server project will be deployed to the gateway.
  • Deployment Project: The generated .fed will be deployed to the gateway.

Limitations

  • Static files will not be deployed
  • dependent JAR files will not be deployed

Use logging for Python scripts

As Is

Currently print commands are used to print log information in the buildfed tool.

To Do

Use Python looging module for printing log information.

Simulation mode shouldn't update the entity store

As Is

Currently the simulation mode also updates the in-memory representation of the entity store. This may cause issues if the variables contain values which aren't compatible with the type of the field (e.g. value are just placeholders for further CI/CD configuration).

To Be

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

buildfed: read property content from files

The buildfed tool should be enhanced to support reading property content from files.

A new parameter -F or --fromFile will be introduced. This parameter defines a new property which content is read from a specified file.

Example:

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

Defines a new property description for which the content is read from the description.txt file.

Add dependent JARs to PolicyStudio

As Is

Depend JARs have to be configured in PolicyStudio manually.

To Be

Depend JARs are automatically configured in PolicyStudio by the plugin.

References not supported for environmentalization

Hi,
Currently I have to manage many .ENV files manually. It is really painful and error prone. So I really loved when I found out about this project.
I tried to use it and I get a lot of errors like:
[ERROR] ValueError(u'Reference types are not supported for environmentalization: name=serverCert; index=0; type=reference;

Then I found your FAQ:
https://github.com/Axway-API-Management-Plus/apigw-maven-plugin/blob/master/doc/manual/_faq.adoc#why-are-references-not-supported-for-environmentalization

We have lots of references (since we encrypt end-to-end, including two-way SSL), so I just want to say that this is a show stopper for us.

Base directory for certificates

As Is
Currently the path to the certificate files are specified as an absolute path or as a relative path to the current directory.

To Do
Add parameter to specify a base directory for the relative path to certificate files.

Certificate replaces in different environments

Hello,

We have four different environment starting from Dev to Prod. I would like to standardize the promotion of code and environment settings including certificates to the upper environments.

While promoting to Stage from Dev, I would like to replace the existing Dev listeners certs to reflect Stage certs. I am wondering if we can do something like below :

"Dev-1-p12": {
"origin": {
"info": {
"not_after": "2020-05-21T07:02:00+02:00",
"subject": "CN=Dev1, O=Axway, L=Berlin, ST=Berlin, C=DE"
}
},
"update": {
"file": "cert/Stage.p12",
"password": "server",
"source": "password",
"type": "p12"
}
},

Does the existing plugin already supports this or we can add it as an enhancement ?

Fature request: add support for multiple gateway.certs.json files

Use case: we have many CAs that are common to all environments and only the private certs are different for each environment.
So being able to provide multiple gateway.certs.json files would allow us to put all common CAs in 1 single common/shared file.
It would be equal to what we can do with the <configPropertyFiles>: https://github.com/Axway-API-Management-Plus/apigw-maven-plugin/blob/master/doc/manual/_usage.adoc#configure-properties

Support passphrase for Maven plugin

As Is

With issue #1 the configuration tool supports passphrases for input and output archives. But the Maven plugin doesn't support the new feature.

To Do

Add passphrase support for Maven plugin.

Optionally skip package goal

As Is

For CI/CD pipelines it would be usefully to separate the package and deployment phase.

Currently the goals install and deploy automatically execute the package goal. Therefore, if the pipeline has separate stages for package and deploy the project will be build twice.

To Do

Provide a property axway.skipPackaging to skip the package goal in case of the target archive already exists.

Limitation

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

'source' property to specifiy source for values and passwords

As Is

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

For certificates password there are separate properties ("password" and "password-property") to configure the password for a p12 certificate.

To Be

The source of the field values will be identified by a "source" property. This 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.

The source field for certificate passwords will be identified by a "source" property. This 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 "property" the password is retrieved from the property named by the "password" property.

The older formats of the configuration file will be converted automatically into the new format.

Background

This enables a better extensibility of further sources (e.g. environment variables, see issue #29).
Also is makes it easier to search for not configured values or passwords (just search for "value": null or "password": null).

Improve error message in case of invalid certificate passphrase

In case of an wrong passphrase for a certificate file the buildfed stops with a traceback and a strange error message:

error:23076071:PKCS12 routines:PKCS12_parse:mac verify failure, source location: .\crypto\pkcs12\p12_kiss.c:120

The error message has to be improved.

NullPointerException if POM has no <build> element

If a element is missing in the pom.xml file (e.g. because of it is defined in a parent POM) a NullPointerException occurs on flattening the resulting POM.

Server and deployment projects are affected by this bug.

Configuration tool not working with 7.5.3

When using the configuration tool with API Gateway 7.5.3 an TypeError occurred.

TypeError("com.vordel.archive.fed.DeploymentArchive(): 1st arg can't be coerced to java.io.File, String, com.vordel.archive.fed.PolicyArchive, com.vordel.es.fed.FederatedEntityStore",)

Disable "info" section within certificate config file

As Is

On applying the configured certificates, an "info" section is written to "update" certificate.

This will change a source file, which is not suitable for build environments.

To Do

In the certification configuration file, don't create an "info" section for "update" certificates.

Add properties or parameters to support previous behavior.

MinGW support for buildfed.sh

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

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

"property" as default source

For the environmentalized fields a new property will be created in the configuration file. Default source for the property is "value".

The default source has to be changed to "property" to prevent missconfiguration.

Background:
For new attributes it is easy to forget to change the source attribute if the value attribute should contain a property name. If the default source is "property" the configuration process stops due to a missing property. This prevents from configuring a property source as value source by accident.

Change directory layout for configuration tool

As Is

The current directory layout of the source files for the configuration tool doesn't allow to execute the shell commands directly from the cloned Git repository.

To Do

Change directory layout and shell commands to enable direct execution of the configuration tool from the cloned Git repository.

Config Tool: error in case of non existing configuration file

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.

Package and Deploy tools not sufficient for creating .fed file

Hello,
nice plugin you have. Here is my setup:

  • Axway API Management 7.7.0
  • Linux CI Runner with package and deploy tools installed with the same version 7.7..0
  • apigw-maven-plugin:0.11.1

I currently have the problem that Im not able to build deployment projects (.fed) file within the pipeline runners (see attached screenshot)
jython_missing

As stated within your Wiki, only the package and deploy tools are a prerequesite, but the missing "jython" files for building the .fed file only come with the API Gateway installation, not with the package and deploy tools.

Is there another way, or do I have to add the whole API Gateway installation to the CI Runner? I mean apart from the 800 MB on top its more about arguing with the team thats managing the CI why we need to install the whole Gateway solution for just building our configuration.

Greetings

Encrypted Properties

Currently all configuration values are in plain text. Some values may contain credentials which shouldn't be visible.
Support for encrypted property values has to be added. On configuration the values will be decrypted via master password provided on configuration time.

Test automation

As Is

Currently the plugin is tested manually.

To Do

Automate integration tests for plugin.

Simulation mode for configuration tool

As Is

Currently the configuration tool fails if a certificate file is not found.

To Do

Provide a simulation mode for the configuration tool.
In simulation mode no output files (.fed or .env) are written. Also non existing certificate files are ignored.

Change

As 'buildtemplate' tool is no longer required, as the 'buildfed' in combination with the simulation mode can be used to write the configuration files.

Passphrase support for configuration tool

As Is

Currently the configuration tool doesn't support archives having passphrases and also doesn't support to add a passphrase to the generated .fed or .env file.

To Do

Add options to specify passphrases for the source and target archives.

Customized version

The plugin automatically configures the "Version" attribute of a policy property within .pol and .fed. packages. The version is displayed within the "Grid" tab of the Admin Node Manager.

Currently the version string is fixed to the ${project.version} of the Maven project.

A new property axway.project.version will be introduced to customize the version. 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

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

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

Remove certificates

Currently certificates can only be update during the .fed package configuration.

The configuration has to be enhanced to support removal of certificates.

Ignore generated files by SCM (Git)

Some files are generated by the plugin which must not be added to the SCM.

A .gitignore file will be created to ignore the generated files by Git.

Error on upgrading to new config file version

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'",)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.