IAJava has guidelines for the package names you build your modules under. They should be your company domain name reversed. Note the rules for "legalizing" a domain name.
http://domain.com
Becomes: com.domain.modulename
After that should be a package name that reflects the scope for the target jar, if applicable:
When you are developing a module, you will not be able to run it outside of developer mode without signing it. Code signing is a process where you will use a cryptographic certificate similar to an SSL certificate to sign a module, which enables Ignition to verify that the module is what it claims to be in installation.
A code signing certificate is essentially an SSL or TLS certificate similar to what you need to install on a webserver to enable https:// traffic. The only difference is that when you generate the certificate signing request, you indicate that the certificate is to be used for code signing.
Enabling Developer Mode
In your ignition.conf, scroll down to the area with a number of entries similar to
This allows the gateway to load unsigned modules.
Use this at your own risk on non-production gateways for development purposes only.
When you need to migrate to signed code, you have two options available:
Self-Signed
Self signed code uses a certificate generated by you to sign the module. You can generate a code signing certificate yourself with minimal effort, and then sign your own modules ready for distribution.
CA Signed
CA signing uses a "CA" or Certificate Authority, who have proven security credentials, to prove that you are who you claim to be and that the code signed with your credentials is able to be proved to be from you, and has not been tampered with.
CA Signing is not necessary, but can appear to some people/organisations as more trustworthy and reliable.
CA Signing is expensive.
Once you have a ceritificate, download Keystore Explorer:
Create an empty JKS keystore and upload your certificate pair to this keystore.
Save the keystore then follow the guide here:
When you have run this command, you will end up with a signed module ready to install on any gateway necessary.
You as the developer are expected to enable and disable your module functions based on the two hour trial period. This applies to free modules as well as paid.
To enable this there are functions like below to get the current license states:
Your module hook will be notified at startup whether it is licensed and/or whether trial mode is active. And will be notified dynamically when/if the licensing state changes. Your module, if it cares, should capture this state in a gateway hook field that the rest of your module can interrogate. (Either make the field static with a static getter, or pass your hook instance into your module's infrastructure.)
This repository is an example demonstrating multiple Ignition modules in the same repository, with shared library support.
Everyone's needs are different. But in our experience as a small team working on multiple related modules, the monorepo architecture has allowed us to move quickly while sharing internal resources in Embr.
Powershell Script for Generating Signing Certificate and gradle.properties
It's not fantastic, but since I only run it a couple times per year I haven't felt the need to improve it. You will definitely need to adjust the Java install location.
This script takes:
A DNS name.
A number of years before expiration.
And generates (in a signature folder):
A password protected signing certificate.
Adds it to a password protected keystore.
Creates a corresponding gradle.properties that can be used with IA's module creation plugin.