Platform Framework
R24 AMR | Min(s) read

Setting up Apache Ignite

This section shows how Ignite uses the encryption algorithm and a keystore to ensure data security.

Among the other parameters in the Ignite keystore, it also stores database parameters. These database parameters triggers the Ignite server to retrieve the encryption algorithm initialiser and its properties.

The following is the default initialiser and keystore password:

  • Initialiser for setting the encryption algorithm - Waz7G611E%+6291Tqz

    This initialiser encrypts the cache data. It is stored only in the database in the table TAFJ_CACHE_KS_INIT and is mandatory for Ignite.

  • The default keystore password - 3jyh?=%_baT

    If you want to use this keystore password on the Windows command line, then you must skip the % character (3jyh?=%%_baTO).

    You need to change the initialiser, keystore password and database parameters values based on the target database that exists in the keystore. For more information, see Manipulating the cachestore.keystore file.

Reading Properties from a Database

In production mode, you can get the properties from the database by default and the properties are created in the database automatically, if not available. The default configuration key is cache.configuration.

Start Ignite servers along with your application server with the following system property.

-Dcache.configuration=(my_config_id)

Reading Properties from a File

The Ignite configuration file is read from the classpath and is located in the TAFJCache.jar file. You can also specify the Ignite configuration file in the caching.properties file by using the temn.cache.ignite.conf.file.loc property. The caching.properties file is located in the $TAFJ_HOME/conf/cache directory.

The example below illustrates the Ignite configuration file in the caching.properties file.

temn.cache.ignite.conf.file.loc=<tafj.home>/conf/cache/ignite-cache.xml

For more information on Ignite caching, see the Apache Ignite documentation. Due to security policy, Ignite JARs are not shipped with TAFJ pack. Hence, you need to download the Ignite JARs from the Ignite distribution (note that version numbers changes with Ignite updates). For more information, see Required Ignite JARs.

Starting an Ignite Server Node

To start and Ignite server node,

  1. Open command line and run $TAFJ_HOME/bin/StartIgnite.
  2. Enter the keystore password. The default keystore password is 3jyh?=%_baT.

Setting the classpath

In order to use Ignite with JBoss and other application servers, you must correctly set the classpath to the Ignite libraries using the following procedure.

  1. For JBoss application server, download and copy the Ignite JARs specified in the Required Ignite JARs section.
  2. Reference the JARs in module.xml as shown below.

    <resource-root path="./ext/Ignite/ignite-core-2.0.0.jar"/>

    <resource-root path="./ext/Ignite/ignite-shmem-2.0.0.jar"/>

    <resource-root path="./ext/Ignite/ignite-log4j2-2.0.0.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/ignite-spring-2.0.0.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/commons-logging-1.1.1.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/spring-aop-4.3.7.RELEASE.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/spring-beans-4.3.7.RELEASE.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/spring-context-4.3.7.RELEASE.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/spring-core-4.3.7.RELEASE.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/spring-expression-4.3.7.RELEASE.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/spring-jdbc-4.3.7.RELEASE.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/spring-tx-4.3.7.RELEASE.jar"/>

    <resource-root path="./ext/Ignite/ignite-spring/spring-tx-4.3.7.RELEASE.jar"/>

To avoid any error, you can include the following entry under dependencies.

<dependencies>

<module name="sun.jdk" export="true" >

<imports>

<include path="sun/misc/Unsafe" />

</imports>

</module>

</dependencies>

Likewise, if you are using WebLogic or WebSphere application server, set the appropriate JARs to the classpath.

TAFJ Caching Security

The flowchart below describes the TAFJ Caching security. It shows how properties are loaded, how the keystore is accessed, and how user password must match. It does not describe the white-listing process.

Apache Ignite does not ship with security by default, so Temenos has added its own. Caching properties are read or written from a database or the caching.properties file.

The nodes that are joining the cluster must provide a keystore password. Once the keystore is securely accessed, the node is authenticated by

  1. IP address (independent of Apache Ignite’s IP checking)
  2. An unencrypted password stored in a java keystore. This unencrypted password is matched against an encrypted password, which is present in either the database or caching.properties file.

Database connection properties are stored in the java keystore.

Retrieving Ignite Logs

Ignite creates its own logging object. You can retrieve ignite logs using the following procedure.

  1. Copy the ignite-log4j2-(version).jar file to the $TAFJ_HOME/ext directory.
  2. Add the ignite-log4j2-(version).jar file in the classpath. This will help application servers to retrieve specific Ignite logs.
  3. Set up an Ignite appender in $TAFJ_HOME/conf/TAFJTrace.properties to control the log level.

JBOSS Specific Things to Do for Write-through Caching

As of now, TAFJ only supports non-transactional write-behind caching (only for Ignite) and read caching as there are issues with data consistency and querying the grid with synchronous write-through caching which are slated to be fixed in version 2.4. If you are using JBoss with write-through caches (which are always near caches in Ignite and exist in the same JVM as of this writing) and you want to use the datasource within the application server (necessary if you want your writes to exist in the same JTA transaction), then you must make the datasource global as Ignite threads need a reference to it.

<subsystem xmlns="urn:jboss:domain:naming:2.0">

<remote-naming/>

<bindings>

<lookup name="java:global/jdbc/t24DS" lookup="java:/jdbc/t24DS" />

</bindings>

</subsystem>

After you make the datasource global in standalone-full.xml, you need to set the below property in caching.properties so that Ignite threads within the JBoss JVM can use the appserver datasource.

temn.tafj.cache.datasource=java:global/jdbc/t24DS

Write-behind caches are never transactional in Ignite.

Also, Ignite JTA jars are necessary if you want to enlist Ignite with the appserver JTA processor. The following JARs are required in the module.xml file for TAFJ to run Ignite:

<resource-root path="/ext/Ignite/ignite-core-2.1.0.jar"/>

<resource-root path="/ext/Ignite/ignite-shmem-1.0.0.jar"/>

<resource-root path="/ext/Ignite/ignite-log4j2-2.1.0.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/ignite-spring-2.1.0.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/commons-logging-1.1.1.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/spring-aop-4.3.7.RELEASE.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/spring-beans-4.3.7.RELEASE.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/spring-context-4.3.7.RELEASE.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/spring-core-4.3.7.RELEASE.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/spring-expression-4.3.7.RELEASE.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/spring-jdbc-4.3.7.RELEASE.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/spring-tx-4.3.7.RELEASE.jar"/>

<resource-root path="/ext/Ignite/ignite-spring/spring-tx-4.3.7.RELEASE.jar"/>

<resource-root path="/ext/Ignite/ignite-jta/ignite-jta-2.1.0.jar"/>

Copyright © 2020- Temenos Headquarters SA

Published on :
Monday, May 27, 2024 5:03:09 PM IST