Enable and Configure an External Database for Enrollments
Instant ID as a Service supports using records on an external Oracle, SQL Server, MySQL, or PostgreSQL database to issue credentials. Instant ID as a Service accesses the database(s) with Entrust Identity as a Service Gateway, allowing administrators to connect the fields of an enrollment design to a table in an external database and assuring secure communication between Instant ID as a Service and the database.
Note: Entrust does not support applications or databases that are no longer supported by their vendor.
Note: Microsoft Azure SQL Cloud Database connectivity is not supported as an Instant ID as a Service Issuance External Database.
For more information on configuring external databases, refer to the How to use an External Database - Instant IDaaS video tutorial.
Note: Connecting two external database sources to one Enrollment Design field can have unexpected results and is not recommended.
The external database feature is only available with the Professional version of Instant ID as a Service.
Note: Using an external database requires installing Entrust Identity as a Service Gateway. For more information, refer to Manage Gateways
Allowable image-file sizes depend on the limits of the external database in use. Instant ID as a Service can read and store images as BINARY, BLOB, BYTEA, LONGBLOB, LONGVARBINARY, MEDIUMBLOB, TINYBLOB, or VARBINARY data types, depending on the external database in use. Refer to Supported Data Types to see which types Instant ID as a Service supports for each database.
Instant ID as a Service supports connecting Smart Card Profiles to Enrollment Designs configured for use with an external database. Refer to Enable and Configure Smart Card Profiles and to Connect an External Database to a Smart Card Profile for more information.
Instant ID as a Service supports connecting Mobile Flash Pass Designs to Enrollment Designs configured for use with an external database. Refer to Design Mobile Flash Passes and to Configure an Enrollment Design for Both Mobile Flash Pass and External Database for more information.
Instant ID as a Service supports writing to an external database with an Issuance API with permissions to create, read, update, and/or delete enrollments. Refer to Add an Issuance API and to the Entrust Instant ID as a Service Issuance API Administration Guide for more information.
Instant ID as a Service does not support exporting records from an external database.
Support for Reading and Writing Images as Files on a File System
Instant ID as a Service allows you to read and write images as files in your file system instead of storing them as BLOBs (Binary Large Objects). If you have images stored in an existing shared drive, you can mount the shared drive to an external database from the Identity as a Service Gateway via Linux. Refer to Install Identity as a Service Gateway to install the Gateway.
Instant ID as a Service supports images reading and writing images as files if the shared drive containing the image files is mounted to an external database. Refer to Mount a Shared Drive Connection to an External Database after the Identity as a Service Gateway is installed.
Install Identity as a Service Gateway
Note: Only administrators with Enterprise Gateway and Agents Management permission to administer Gateways. For Enterprise Service Gateways that connect to Instant ID as a Service, you must configure your firewall to allow connections to your Instant ID as a Service account over HTTPS on port 443. If you whitelist outbound connections, you need to whitelist entrust.net, entrust.us.trustedauth.com, and the URL for your Identity as a Service account for the Gateway to function refer to Manage Gateways for more information.
- Click Main Menu
> Administration > Resources > Gateways. The Gateways List page opens.
- Click the Identity as a Service Gateway
button. The Identity as a Service Gateway Download URL dialog box appears.
- Click either the VMWARE VSPHERE button or the MICROSOFT HYPER-V button to download an image file on either platform.
- Install the image file.
Note: Consult the VMWare vSphere or Microsoft Hyper-V documentation for more information.
Add a Gateway to Instant ID as a Service
- Click Main Menu
> Administration > Resources > Gateways. The Gateways List page opens.
- Click Add on the Gateways List page in Instant ID as a Service. The Add Gateway dialog box appears.
- Enter a Gateway Name.
- Click Add to add the gateway. The Add Gateway dialog box displays the Registration Code.
- Click the Copy to Clipboard
to copy the Registration Code.
- Open the Identity as a Service Gateway web interface or application to configure the gateway. For more information on creating and adding and managing gateways, refer to Manage Gateways.
- Paste the Registration Code into the registration parameters for the gateway.
- Save the configuration and register the gateway.
Add an External Database
- Click Main Menu
> External Databases. The External Databases page opens.
- Click the Add icon
. The Add External Database dialog box appears.
- Enter a Name to identify the database in Instant ID as a Service.
- Select a Type from the list of supported database engines.
- Enter the URL of the database, or select the checkbox beside Configure individual properties?.
- If the checkbox beside Configure individual properties? has been selected:
- Enter the Server name or IP address. For SQL Server databases, use the instance port number instead of the instance name.
- Enter the Port.
- Enter the Database for a MySQL, PostgreSQL, or SQL Server database, or the Service for Oracle databases.
Note: Set the portNumber when connecting to a named instance.
- If the checkbox beside Configure individual properties? has been selected:
- Enter the Schema of the database. (The field does not appear for MySQL databases.)
- Enter your Username.
- Enter your Password.
- (Optional) Select the checkbox beside Use SSL? to secure communication between the gateway and database.
- Upload the required certificates for the database type. For more information, refer to Secure an External Database Connection.
- Click Add.
Mount a Shared Drive Connection to an External Database
Instant ID as a Service allows the option to read and write images to a file system by mounting a shared drive connection to an external database via previously installed Gateway. Refer to Install Identity as a Service Gateway to install a Gateway. Refer to Add a Gateway to Instant ID as a Service to add the Gateway to Instant ID as a Service.
- Log into the Gateway via web browser and select Terminal from the left hand navigation menu. If this puts you in the Configuration Tool, type "exit" to exit to a shell.
- Create a mount point:
- sudo mkdir /mnt/share
- Create a credentials file for Samba with user credentials that have read/write access to the share:
tee /home/entrust/.smbcredentials<<EOF
username=<shareuser>
password=<sharepassword>
domain=<domain or workgroupname>
EOF
-
Replace the placeholder values (e.g, <shareuser>, <sharepassword>, <domain>, and <workgroupname>) with those of an authorized account. To use a local user of the server with the share, set domain=<fully distinguished server name>.
-
Change the access permissions and special mode flags of file system objects.
chmod 0600 /home/entrust/.smbcredentials
Note: Follow the steps in this note to further edit .smbcredentials:
vi /home/entrust/.smbcredentials
-
To save and exit, press Esc + w + q.
or
-
To exit without making changes, press Esc + q + !.
- Add a network share mount point to the file system table. The first example (6a.) is for Windows, the second example (6b.) is for Linux/Unix. Note: The "//<server>/<path> /mnt/share cifs credentials=/home/entrust/.smbcredentials,uid=acsservice,gid=acsservice 0 0" command in step (6a.) must be written on one line.
sudo tee -a /etc/fstab <<EOF
//<server>/<path> /mnt/share cifs credentials=/home/entrust/.smbcredentials,uid=acsservice,gid=acsservice 0 0
EOF
sudo tee -a /etc/fstab <<EOF
<server>:/<path> /mnt/share nf nosuid,rw,sync,hard,intr 0 0
EOF
Note: Do not forget to enter "-a" as referenced in the Windows and Linux examples above. Replace the placeholder value <server> with the fully distinguished server name or IP address. Replace the placeholder value <path> with the path on the server to the images, not including a drive letter.
Note: Above commands are to add entry in /etc/fstab file. To update (add/remove entries) /etc/fstab, use standard Linux commands, for example:
-
sudo su
-
Enter password
-
vi /etc/fstab
To save and exit, press Esc + w + q.
or
To exit without making changes, press Esc + q + !.
-
Reload the daemon to apply the changes made to the file.
-
sudo systemctl daemon-reload
-
- Mount the network share. This will mount the entries added in /etc/fstab:
- sudo mount -av
If the credentials are wrong, or Enterprise Service Gateway cannot access the path, there will be errors while mounting. Verify the credentials in .smbcredentials or verify the server path.
- Verify the contents of the network share. The following command should return the file names of all the files on the actual shared drive:
- ls -al /mnt/share
Note: Mount multiple folders by repeating step 2. Next, follow step 6 (a.) or 6 (b.), step 7 to mount the network share, and then step 8 to verify the contents. Of course, use a different mount name than /mnt/share (e.g, /mnt/share2).
Note: Instant ID as a Service users cannot upgrade from versions 5.32 to 5.33. After installing the new 5.33 gateway, users must complete the entire file mount operation.
Configure an Enrollment Design
- Click Main Menu
> Enrollment Designs. The Enrollment Designs page opens.
- Select the Enrollment Design to link with an external database.
- Click Settings
.
- Select Use External Database?
.
- Choose an External Database from the drop-down list. A confirmation dialog box appears.
- Click Save.
- Remove any Quick start primary key column in the Enrollment Design previously connected to the cloud database.
- Open the Enrollment Design.
- Click on the Quick Start primary key field.
- Press the Delete key on your keyboard.
- Click Save
.
Note: Changing an enrollment design to use an external database will result in the loss of any enrollment data in the cloud.
Note: Bulk operations (import and export) are not supported for enrollment designs configured to use an external database.
Configure Field Connections
- Open the Field Connections page for the Enrollment Design linked to an external database.
- Ensure the Source has been set to External Database.
- Click the Table drop-down menu to choose a table from the database. The Connect fields from the source to the Enrollment Design panel displays the table's columns.
- Connect the Table Columns to the desired fields of the Enrollment Design.
- Click Save.
Note: Fields connected to an Identity primary key column should be set to read-only.
Note: Connecting two external database sources to one Enrollment Design field can have unexpected results and is not recommended.
For more information, refer to Field Connections.
Connect an External Database to a Smart Card Profile
- Click Main Menu
>Enrollment Designs. The Enrollment Designs page opens.
- Select the Enrollment Design with fields connected to a Smart Card Profile to link with an external database.
- Click Settings
.
- Select Use External Database?
.
- Choose an External Database from the drop-down list. A confirmation dialog box appears.
- Click Save.
- Return to the Enrollment Designs page.
- Select Field Connections
to edit the field connections for that enrollment design. The Field Connections page opens.
- Verify the source field connections from the Enrollment Design column display the tables from the external database.
- Click the Table drop-down menu to choose a table from the database.
- Verify the fields from the chosen table appear in the Table column. The Connect fields from the source to the Enrollment Design panel displays the table's columns.
- Connect the Table Columns to the desired fields of the Enrollment Design connected to the Smart Card Profile.
For more information, refer to Enable and Configure Smart Card Profiles.
Configure an Enrollment Design for Both Mobile Flash Pass and External Database
- Click Main Menu
>Enrollment Designs. The Enrollment Designs page opens.
- Select the Enrollment Design with fields connected to a Mobile Flash Pass Design to link with an external database. For more information, refer to Map Mobile Flash Pass Fields.
- Click Settings
.
- In the Database Settings section:
- Select Use External Database?
.
- Choose an External Database from the drop-down list. A confirmation dialog box appears.
Note: For more information on how to further customize the permissions Instant ID as a Service has with enrollment data, refer to Configure Enrollment Design Settings.
- Select Use External Database?
- Click Save
. A confirmation dialog box appears.
- Return to the Enrollment Designs page.
- Select Field Connections
to edit the field connections for that enrollment design. The Field Connections page opens.
- Set the Source to External Database.
- Follow the steps in Configure Field Connections to link the enrollment design to the external database selected in Step 6.
Note: If the Table that was selected does not have a primary key, designate one of the columns to be the primary key.
- Click Save
.
- Set the Source to Mobile Flash Pass Design.
- Select the desired Mobile Flash Pass Design from the drop-down menu.
- Connect the Mobile Flash Pass Fields to the desired fields of the Enrollment Design connected to the external database.
- Click Save
.
Note: The Managed Mobile Flash Pass feature will not work for External Database enrollment records if the primary key value of the enrollment record is changed after sending the Mobile Flash Pass.
Troubleshooting
Instant ID as a Service may return an error "The requested operation could not be performed" when attempting to write data to an external database. This occurs when the external database rejects the incoming data due to a discrepancy such as a duplicate primary key.
- Log into Entrust Identity as a Service Gateway.
- Navigate to Logs.
- Select Recent, Everything, and agent-database-proxy. This will show the most recent log entries in reverse-chronological order.
- Search the logs for the term "Database error".
- Interpret the SQL error.
SQL errors are usually caused by a configuration error in the Enrollment Design setup. The most common errors and their causes include:
-
Conversion failed: Typically caused by data entered that didn’t comply with the field type connected to a given database column (e.g., alphabetic characters entered in a column connected to a date field)
-
Incorrect Syntax near the keyword ‘null’: Typically caused by an incorrect Schema name in external database configuration.
-
Cannot insert explicit value for identity column in table: Typically caused by not setting as "Ready Only" a field connected to a column containing the database table's auto-generated primary keys for the database table is auto-generated by database
Supported Data Types
Oracle | MySQL | SQL Server | PostgreSQL |
BLOB | BIGINT | BINARY | BIGINT |
CHAR |
BLOB | BIGINT | BYTEA |
CLOB | CHAR | CHAR | CHARACTER VARYING |
DATE | DATE | DATE | DATE |
LONG | DATETIME | DATETIME | DECIMAL |
NCHAR | DECIMAL | DATETIME2 | INTEGER |
NCLOB | DOUBLE | DATETIMEOFFSET | NUMERIC |
NVARCHAR2 | FLOAT | DECIMAL | REAL |
VARCHAR2 | INTEGER | FLOAT | SMALLINT |
LONGBLOB | INT | TEXT | |
LONGTEXT | NUMERIC | TIME | |
MEDIUMBLOB | NVARCHAR(MAX) | TIMESTAMP | |
MEDIUMINT | REAL | ||
MEDIUMTEXT | SMALLDATETIME | ||
SMALLINT | SMALLINT | ||
TEXT | TINYINT | ||
TIME | VARBINARY(MAX) | ||
TIMESTAMP | VARBINARY | ||
TINYINT | VARCHAR | ||
VARCHAR | VARCHAR(MAX) |
|
IMPORTANT: When connected to a SQL Server database, Instant ID as a Service does not support columns of NTEXT, TEXT, or IMAGE data types because they will be removed in a future version of SQL Server. Use NVARCHAR(MAX), VARCHAR(MAX), and VARBINARY(MAX) instead.
Note: Instant ID as a Service supports Oracle Database 19c, PostgreSQL 16.1, MySQL 8.0.27, and SQL Server versions 2019, 2017, and 2016.
Note: Entrust does not support applications or databases that are no longer supported by their vendor.
Note: Microsoft Azure SQL Cloud Database connectivity is not supported as an Instant ID as a Service Issuance External Database.
Note:Instant ID as a Service restricts using MySQL 8 keywords and reserved words as field names for credentials. Vendor-specific MySQL 8 keywords and reserved words used in table names and schemas in external databases will also cause errors. Refer to the list of MySQL 8 keywords and reserved words.