Token Vault Structure for Databases
The token vault contains the tokens and their corresponding ciphertext. There can be multiple token vaults in one database.
Following section explains the token vault structure for supported databases:
Oracle Database
In an Oracle database, each token vault (sequential/non-sequential) has the following structure:
COLUMN_NAME | DATA_TYPE | DATA_LENGTH |
---|---|---|
CUSTOMDATA | NVARCHAR2 | 1000 |
MACVALUE | RAW | 32 |
TOKEN | NVARCHAR2 | * |
CIPHERTEXT | RAW | * |
CREATIONDATE | DATE | 7 |
KEYROTATIONDATE | DATE | 7 |
PROPAGATED | NVARCHAR2 | 20 |
LASTACCESSDATE | DATE | 7 |
TOKENPROPERTY | NVARCHAR2 | 16 |
CUSTOMTOKENPROPERTY | NVARCHAR2 | 255 |
Note
The character set of Oracle database should be UTF-16.
For Oracle database, you must specify the vault and key name in uppercase.
When the table is created to accept sequential tokens, a sequence named <token_vault_name>_seq
is also created.
MS SQL Database
In an MS SQL Server database, a non-sequential token vault has the following structure:
COLUMN_NAME | DATA_TYPE | DATA_LENGTH |
---|---|---|
id | bigint | |
token | nvarchar | * |
ciphertext | varbinary | 275 |
macvalue | binary | 32 |
creationdate | datetime | |
keyrotationdate | datetime | |
customdata | nvarchar | 256 |
propagated | nvarchar | 20 |
lastaccessdate | datetime | |
tokenproperty | nvarchar | 16 |
customtokenproperty | nvarchar | 255 |
When the table is created to accept sequential tokens, the table construction is slightly different (the column id is not there in sequential vault and data type of column token is BIGINT):
COLUMN_NAME | DATA_TYPE | DATA_LENGTH |
---|---|---|
id | bigint | |
token | nvarchar | * |
ciphertext | varbinary | 275 |
macvalue | binary | 32 |
creationdate | datetime | |
keyrotationdate | datetime | |
customdata | nvarchar | 256 |
propagated | nvarchar | 20 |
lastaccessdate | datetime | |
tokenproperty | nvarchar | 16 |
customtokenproperty | nvarchar | 255 |
MySQL Database
In a MySQL database, each non-sequential token vault has the following structure:
COLUMN_NAME | DATA_TYPE | DATA_LENGTH |
---|---|---|
id | bigint | |
macvalue | binary | 32 |
ciphertext | varbinary | 275 |
token | nvarchar | * |
creationdate | datetime | |
keyrotationdate | datetime | |
customdata | nvarchar | * |
propagated | nvarchar | 20 |
lastaccessdate | datetime | |
tokenproperty | nvarchar | 16 |
customtokenproperty | nvarchar | 255 |
When the table is created to accept sequential tokens, token vault has the following structure (the column id is not there in sequential vault and data type of column token is BIGINT):
COLUMN_NAME | DATA_TYPE | DATA_LENGTH |
---|---|---|
id | bigint | |
macvalue | binary | 32 |
ciphertext | varbinary | 275 |
token | nvarchar | * |
creationdate | datetime | |
keyrotationdate | datetime | |
customdata | nvarchar | * |
propagated | nvarchar | 20 |
lastaccessdate | datetime | |
tokenproperty | nvarchar | 16 |
customtokenproperty | nvarchar | 255 |
Informix Database
In Informix database, each non-sequential token vault has the following structure:
COLUMN_NAME | DATA_TYPE | DATA_LENGTH |
---|---|---|
id | BIGSERIAL | |
token | VARCHAR | * |
ciphertext | LVARCHAR | 275 |
macvalue | LVARCHAR | 64 |
creationDate | DATETIME YEAR TO FRACTION (3) | |
keyrotationdate | DATETIME YEAR TO FRACTION (3) | |
customdata | VARCHAR | 255 |
propogated | VARCHAR | 255 |
lastaccessdate | DATETIME YEAR TO FRACTION (3) | |
tokenproperty | VARCHAR | 16 |
customtokenproperty | VARCHAR | 255 |
When the table is created to accept sequential tokens, token vault has the following structure (the column id is not there in sequential vault and data type of column token is BIGSERIAL):
COLUMN_NAME | DATA_TYPE | DATA_LENGTH |
---|---|---|
token | BIGSERIAL | * |
ciphertext | LVARCHAR | 275 |
macvalue | LVARCHAR | 64 |
creationDate | DATETIME YEAR TO FRACTION (3) | |
keyrotationdate | DATETIME YEAR TO FRACTION (3) | |
customdata | VARCHAR | 255 |
propogated | VARCHAR | 255 |
lastaccessdate | DATETIME YEAR TO FRACTION (3) | |
tokenproperty | VARCHAR | 16 |
customtokenproperty | VARCHAR | 255 |