Configure Vault using Java Utilities
Creating Token Vault
The token vault can also be created using command line interface (SetupDB utility).
Note
This utility works for the CipherTrust Manager.
Note
Ensure to assign the keys to the token vault, after it is created using the command line interface.
To create a non-sequential vault with default token length of 20, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.SetupDB -tn TestToken -dbu MyDbUsername -dbp MyDbPassword
To create a sequential vault with default token length of 20, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.SetupDB -tn TestToken_SEQ -dbu david -dbp david -sequential -dlen 20
Note
To create a non-sequential token vault having different token length use -tokenSize
parameter in the command.
To provide database properties while creating a non-sequential vault, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.SetupDB -tn TestToken -dbu MyDbUsername -dbp MyDbPassword [-dbh <dbHostName] [-dbpo <dbPort>] [-dbn<dbName>]
To provide database properties while creating a sequential vault, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.SetupDB -tn TestToken_SEQ -dbu david -dbp david -sequential -dlen 20 [-dbh <dbHostName] [-dbpo<dbPort>] [-dbn <dbName>]
Here, following parameters are optional, and should be used to configure database properties.
[-dbh (dbHostName)]
[-dbpo (dbPort)]
[-dbn (dbName)]
If these parameters are configured, these values are given precedence over the values specified in the SafeNetToken.properties
file and these parameters are supported for MySQL database only.
To configure the size of customdata column while creating a non-sequential token vault, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.SetupDB -tn TestToken -dbu MyDbUsername -dbp MyDbPassword -customDataSize 14000
To configure the size of customdata column while creating a sequential token vault, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.SetupDB -tn TestToken_SEQ -dbu david -dbp david -sequential -dlen 20 -customDataSize 14000
Here, -customDataSize
is an optional parameter that determines the size of the customdata column. This parameter is configurable and supported for the MySQL database only. If you don't specify this parameter, then the default value (255) is used. This parameter is not supported for Oracle and SQL Server.
Note
For MySQL, the maximum permissible length for the customdata column is 21000.
Note
The user may use the obfuscated password or credential. Refer to Creating Obfuscated Data Using Obfuscation Utility for details.
Note
If the following error message is displayed when creating token vault in MySQL:
This function has none of DETERMINISTIC, NO SQL, or READS SQL DATA in its binary
Then execute the SET GLOBAL log_bin_trust_function_creators = 1
command.
Assigning Keys to Token Vault
Keys can be assigned to token vault using command line interface.
Note
This utility works for the CipherTrust Manager.
To assign keys to sequential/non-sequential vault, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.SetKey AESKey_name HmacKey_name Vault_name NAEUsername NAEPassword DbUsername DbPassword
To provide database properties while assigning keys to a sequential/non-sequential vault, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.SetKey encKey hmacKey dbtable naeUser naePswd dbUser dbPswd [dbOwner] [HostName=<DB HostName>] [Port=<DB Port>] [DBName=<DB Name>]
Here, following parameters are optional, and are used to configure database properties.
[HostName= (DB HostName)]
[Port= (DB Port)]
[DBName= (DB Name)]
Note
If these parameters are configured, these values are given precedence over the values specified in the SafeNetToken.properties
file and these parameters are supported for MySQL database only.
Note
The user may use the obfuscated NAE and database password. Refer to Creating Obfuscated Data Using Obfuscation Utility for details.
Deleting Token Vault
Token Vault can also be deleted using command line interface.
Note
This utility works for the CipherTrust Manager.
To delete a sequential/non-sequential vault, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.DeleteTable TestToken MyDbUsername MyDbPassword
To provide database properties while deleting a sequential/non-sequential vault, use the following command:
java -cp SafeNetTokenService-8.12.4.000.jar com.safenet.token.DeleteTable dbtable dbUser dbPswd [dbOwner] [HostName=<DB HostName>] [Port=<DB Port>] [DBName=<DB Name>]
Here, following parameters are optional, and are used to configure database properties.
[HostName= (DB HostName)]
[Port= (DB Port)]
[DBName=(DB Name)]
Note
If these parameters are configured, these values are given precedence over the values specified in the SafeNetToken.properties
file and these parameters are supported for MySQL database only.
Note
The user may use the obfuscated password or credential. Refer to Creating Obfuscated Data Using Obfuscation Utility for details.