Data Privacy Toolkit Setup Preparations

WebSEAL

If a WebSEAL is in place, following junction must be configured:

GET|POST|PUT|DELETE|HEAD /dptk/

WebSphere cell

Add an additional Cluster including a Server JVM that operates the DataPrivacyToolkit application WAS DMGR new cluster Step1 WAS DMGR new cluster Step2 WAS DMGR new cluster Step3 WAS DMGR new cluster Step4 WAS DMGR new cluster Step4

Each DPTK JVM should have at least 1GB of maximum heap. You can verify this by navigating to Server Types > WebSphere application server. Then select your created server (do this step for all server, if you created multiple in your cluster),and navigate to Server Infrastructure > Java and Process Management > Process definition > Additional Properties > Java Virtual Machine. WAS JVM HeapSize

Navigate to System administration > Nodes. Select the Node where the DPTK cluster was created and do a full resynchronize. WAS Nodes full resynchronize

Database Configurations

DB2 - General Database Setup

  • Copy the scripts essapps-createDatabase_DB2.ddl and dptk-createTables_DB2.ddl that are located in the release archive’s db-setup folder to the Database server

  • Login on the database server

ssh user@dbserver
  • Change user to the DB2 instance user
[sudo] su - db2inst1
  • Verify if DB2CODEPAGE property is set to 1208
db2set
  • If not, set it
db2set DB2CODEPAGE=1208
  • Import the DDL by issuing following command
db2 -td@ -vf essapps-createDatabase_DB2.ddl

DB2 - DPTK Setup

  • Login on the database server
ssh user@dbserver
  • Import the DDL by issuing following command
db2 -td@ -vf dptk-createTables_DB2.ddl

Oracle - General Database Setup

  • Copy the scripts essapps-createDatabase_Oracle.ddl and dptk-createTables_Oracle.ddl that are located in the release archive’s db-setup folder to the Database server
scp /tmp/dptk.deployment-1.9.6-dist/essapps-createDatabase_Oracle.ddl user@dbserver:~/essapps-createDatabase_Oracle.ddl
scp /tmp/dptk.deployment-1.9.6-dist/dptk-createTables_Oracle.ddl user@dbserver:~/dptk-createTables_Oracle.ddl
  • Login on the database server
ssh user@dbserver
  • Import the DDL (as a user that has at least the SYSDBA role) by issuing following command:
sqlplus sysdba/password @essapps-createDatabase_Oracle.ddl

NOTE: The above command will create a user named ESSAPPS and will prompt for a password. If you prefer to specify the password right when calling the command, use the following syntax:

sqlplus sysdba/password @essapps-createDatabase_Oracle.ddl password

Oracle - DPTK Setup

  • Login on the database server
ssh user@dbserver
  • Import the DDL and use the ESSAPPS user that was created in the previous step:
sqlplus essapps/password @dptk-createTables_Oracle.ddl

Finalize the Database Setup

This setup must be finalized by creating a DataSource in the WebSphere Cell

  • Create a file essapps_was-setup.py
touch ~/essapps_was-setup.py
  • Fill it with following contents and check if the variables jdbcClassName, dbHost and dbPort fit
authAlias = 'profilesJAASAuth'
jdbcProvider = 'profilesJDBC'
dbType = 'DB2'
dbServerOrUrl = 'localhost'
dbPort = '50000'


def findJ2EEResProperty(name, dataSourcePropertySet):
  for property in AdminConfig.list("J2EEResourceProperty", dataSourcePropertySet).splitlines():
    if (AdminConfig.showAttribute(property, "name") == name):
      return property
  return None

def setJ2EEResProperty(name, propertyValue, dataSourcePropertySet):
  prop = findJ2EEResProperty(name, dataSourcePropertySet)
  if not prop:
    AdminConfig.create('J2EEResourceProperty', dataSourcePropertySet, property)
  else:
    AdminConfig.modify(prop, propertyValue)

def createEssAppsDatasource(jdbcProvider = 'profilesJDBC', authAlias = 'profilesJAASAuth'):
  cellName = AdminControl.getCell();

  jdbcProviderId = AdminConfig.getid('/Cell:'+cellName+'/JDBCProvider:'+jdbcProvider+'/')
  
  essAppsDataSource = None
  for dataSource in AdminConfig.list('DataSource', jdbcProviderId).splitlines():
    if AdminConfig.showAttribute(dataSource, 'jndiName') == 'jdbc/essapps':
      essAppsDataSource = dataSource

  if essAppsDataSource:
    print "DataSource '%s' already exists" % ('jdbc/essapps')
    #AdminConfig.modify(essAppsDataSource, dsProps)
  else:
    if dbType == 'DB2':
      dataSourceProps = '[-name essapps -jndiName jdbc/essapps -dataStoreHelperClassName com.ibm.websphere.rsadapter.DB2UniversalDataStoreHelper -containerManagedPersistence true -componentManagedAuthenticationAlias '+authAlias+' -configureResourceProperties [[databaseName java.lang.String ESSAPPS] [driverType java.lang.Integer 4] [serverName java.lang.String '+dbServerOrUrl+'] [portNumber java.lang.Integer '+dbPort+'] ]]'
    elif dbType == 'ORACLE':
      dataSourceProps = '[-name essapps -jndiName jdbc/essapps -dataStoreHelperClassName com.ibm.websphere.rsadapter.Oracle10gDataStoreHelper -containerManagedPersistence true -componentManagedAuthenticationAlias '+authAlias+']'
    elif dbType == 'MSSQL':
      dataSourceProps = '[-name essapps -jndiName jdbc/essapps -dataStoreHelperClassName com.ibm.websphere.rsadapter.MicrosoftSQLServerDataStoreHelper -containerManagedPersistence true -componentManagedAuthenticationAlias '+authAlias+' -configureResourceProperties [[databaseName java.lang.String ESSAPPS] [serverName java.lang.String '+dbServerOrUrl+'] [portNumber java.lang.Integer '+dbPort+'] ]]'

    essAppsDataSource = AdminTask.createDatasource(jdbcProviderId , dataSourceProps)
    dataSourcePropertySet = AdminConfig.showAttribute(essAppsDataSource ,"propertySet")
    
    if dbType == 'DB2':
      setJ2EEResProperty('currentSchema', '[[name "currentSchema"] [type "java.lang.String"] [value "ESSAPPS"] [required "false"]]', dataSourcePropertySet)
      setJ2EEResProperty('webSphereDefaultIsolationLevel', '[[name "webSphereDefaultIsolationLevel"] [type "java.lang.Integer"] [value "2"] [required "false"]]', dataSourcePropertySet)
    elif dbType == 'ORACLE':
      setJ2EEResProperty('URL', '[[name "URL"] [type "java.lang.String"] [value "' + dbServerOrUrl + '"] [required "false"]]', dataSourcePropertySet)
  
  AdminConfig.save()

  print ""

createEssAppsDatasource('profilesJDBC', 'profilesJAASAuth')
  • Execute the wsadmin.sh or wasadmin.bat script that is located in the <DMGR_PROFILE>/bin directory
<DMGR_PROFILE>/bin/wsadmin.sh -lang jython -f ~/essapps_was-setup.py -port <DMGR_SOAP_PORT> -user <WASADMIN_USER> -password <WASADMIN_PASSWORD>

Note: The placeholders DMGR_PROFILE, DMGR_SOAP_PORT, WASADMIN_USER and WASADMIN_PASSWORD must be replaced properly

PDF Export

The DataPrivacyToolkit requires the wkhtmltox binary package in order to render PDF documents. Download the latest stable version (Bleeding Edge with Qt 5.4.2 is not supported at the moment). Extract/install the tool on each node of your Connections cell:

sudo su - wasuser
cd /mnt/my_shared_fs
mkdir dptk/pdfexport
cd dptk/pdfexport
cp /tmp/wkhtmltox-<version>.tar.xz .
tar xfJ wkhtmltox-<version>.tar.xz

In order to have proper fonts, we recommend to install DejaVu fonts (https://dejavu-fonts.github.io/)