1
Within a jPOS project, add a reference to the
Excrypt JAR.None
2
Run
gradle installResources to add the following QBean configuration samples to the project:None
3
Change the configuration values in
20_excrypt.xml as needed.Excrypt Adapter
TheExcryptAdapter class encapsulates all the Excrypt command set implementation. It implements the SMAdapter interface so it can be configured and deployed as any other jPOS SMAdapter implementation.
Example (20_excrypt.xml):
Xml
Configuration
| Property | Description |
|---|---|
| host | Excrypt host (for example, hsm.example.com) |
| port | Excrypt port (i.e. 6000) |
| pkcs12 | Path to the PKCS #12 file (i.e. cfg/certificate.p12) |
| passphrase | Passphrase for the PKCS #12 file |
Accessing the adapter
The Excrypt adapter instance can be pulled off the name registrar by doing the following:Java
JCESecurityModule).
Environment provider
The Excrypt library provides a custom environment provider that helps secure configuration values.Example
Incfg/default.yml:
YAML
example.config value, the system will decrypt value on the fly using the HSM.
The encrypted value is calculated using the ENCRYPT CLI command (see Validate and test)
If you would like to make the configuration values more secure, you can store the values in cfg/default.yml:
YAML
Note that sensitive configuration values have been obfuscated using jPOS’
obf CLI command. This practice is recommended and will help avoid leaking configuration values to occasional viewers.
For more information on the configuration sub-system and the obf environment provider, see the jPOS
Programmer’s Guide, section 3.3.20_excrypt.yml:
Xml

