Database Table
Overview
The Database Table connector is designed to manage users stored in a single database table that uses any relational database with an SQL92 standard compliant JDBC driver.
Supported Resource Versions
- PostgreSQL
- MySQL
- Oracle 11g
Not Fully Tested Resource Versions
- DB2
- SQL Server
- H2
- Apache Derby
Installation
Follow these steps to run the stand-alone connector server:
- Download the connector server jar file and store it in the connector server directory (any directory).
- Download the Database Table connector jar file and store it in the bundles subdirectory.
- Add the resource-related third-party JDBC driver jar file to the lib directory.
- Start the connector server. For more information, check the page about this topic.
Supported operations
- Authenticate (Optional) Specify the password column configuration property.
- Create
- Delete
- Update
- Search
- Schema
- Test
- Sync (Optional) Specify the Change Log Column configuration property.
Configuration
You must include the mandatory driver name configuration parameter as part of the configuration. The connector uses the existence of a driver on the classpath to validate the configuration.
Configuration Methods
You can use one of the following methods to connect the JDBC driver to the resource:
- Provide the user, password, host, port, and database name configuration properties.
The mandatory URL Template can contain wild cards such as %h, %p, and %d|%h, %p, and %d. These wild cards will be replaced by provided values such as host, port, and database. If the URL Template contains any of these wild cards, the connector considers the host, port, and database name to be required configuration properties and they are used accordingly.
- Provide the user and password configuration properties and an exact URL Template with a JDBC connection URL (no wild-cards).
- Provide a datasource name and the optional JNDI properties.
While the datasource name with JNDI properties is sufficient to connect to the resource, the configuration properties mentioned in the previous two methods will not be considered.
See Supported Resource Versions to review the list of resource versions that have been tested with this connector.
The Database Table connector manages users that are located in a single, custom database table. The database table name is a part of the required configuration. The Database Table connector also uses a required keyColumn name configuration property to store the account's names within the custom table.
You can configure the optional passwordColumn name to activate the authentication capabilities. The adapter also supports Active Sync to poll for account changes. To allow Active Sync capabilities, specify the changeLogColumn.
See Configuration Properties for more information about additional optional connector capabilities.
Configuration Properties
The following table describes all of the properties that you can specify for the configuration:
Â
Configuration Property | Type | Required (Driver) | Required (Datasource) | Default Value | Definition |
---|---|---|---|---|---|
JDBC Driver | String | X | Â | The JDBC Driver class name.
| |
JDBC URL Template | String | X (%h,%p, and %d) |  |  | The JDBC connection URL Template with %h, %p, and %d wild-cards.
|
Host | String | when %h |  |  | Resource host. Used in place of the %h wild card in the URL Template. |
Port | String | when %p |  |  | Resource port. Used in place of the %p wild card in the URL Template. |
Database | String | when %d |  |  | Resource database. Used in place of the %d wild card in the URL template. |
User | String | X |  |  | Name of the resource admin user with rights to do SELECT, INSERT, UPDATE, or DELETE. |
Password | String | XÂ | Â | Â | Resource admin user's password. |
Datasource | String | Â | X | Â | Datasource name for datasource-managed connections. |
JNDI Properties | String | Â | Â | Â | Naming of datasource look-up properties. |
Table | String | XÂ | XÂ | Â | Name of the single table where the accounts are stored. |
Key Column | String | XÂ | XÂ | Â | Name of the column where the account's names are stored. |
Password Column | String | Â | Â | Â | Name of the password column where the account's passwords are stored. |
Status Column | String | Â | Â | Â | Name of the status column where the account's status (enabled/disabled/...) are stored. |
Disabled Status Value | String | Â | Â | false | Value of 'status column' indicating disabled users. |
Enabled Status Value | String | Â | Â | true | Value of 'status column' indicating enabled users. |
Default Status Value | String | Â | Â | true | Default value for 'status column' in case of value not provided. |
Change Log Column | String | Â | Â | Â | Name of the column where the last update-related, non-decreasing, value is stored. This value can be a number or a timestamp value. |
Quoting | String | Â | Â | Â | Select whether database column names for this resource should be quoted, and the quoting characters. By default, database column names are not quoted (None). For other selections (Single, Double, Back, or Brackets), column names will appear between single quotes, double quotes, back quotes, or brackets in the SQL generated to access the database. |
Enable Empty String | Boolean | Â | Â | false | Select to enable support for writing an empty string instead of a NULL value. By default empty strings are written as a NULL values. |
Rethrow All SQL Exceptions | Boolean |  |  | true | If false, the SQLExceptions with a 0 ErrorCode are considered a success, or not an error, and they are caught and suppressed by the connector. For example, some databases return an exception for an empty result set. Note: No other SQLExceptions are influenced by this property. |
Native Timestamps | Boolean |  |  | false | If false, timestamp data are read as Strings, which can cause the loss of time milliseconds. Select to retrieve the data as java.sql.Timestamp type, and have the connector perform the conversion. |
All Native | Boolean |  |  | false | If false, the attribute data are converted to Strings using the JDBC driver. Select to use the appropriate JDBC types and force the connector perform the conversion as needed. |
Valid Connection Query | String | Â | Â | Â | The new connection validation query. The query can be empty. Then the auto commit true/false command is applied by default. |
Password cipher algorithm | String | Â | Â | CLEARTEXT | Cipher algorithm used to encode password before to store it onto the database table. Specify one of the values among CLEARTEXT, AES, MD5, SHA1, SHA256 or a custom implementation identified by its class name. |
Password cipher key | String | Â | Â | Â | Specify key in case of reversible algorithm. |
Force password encoding to upper case | Boolean | Â | Â | false | Specify if encoded password must be converted to use uppercase letters. Please, consider that by using this feature password won't be reversible any more, neither using reversible algorithm. |
Force password encoding to lower case | Boolean | Â | Â | false | Specify if encoded password must be converted to use lowercase letters. Please, consider that by using this feature password won't be reversible any more, neither using reversible algorithm. |
Retrieve password | Boolean | Â | Â | false | Specify if password must be retrieved by default. |
Password Charset | String | Â | Â | UTF-8 | The password character set used by resource to encode clear password specified as required by java.nio.Charset |
Â
Schema
The Database Table connector only supports the ACCOUNT objectclass.
The following table describes the attributes that are explicitly supported in the schema. All of these attributes are single-valued, and unless specifically noted otherwise in this table, they can be created, updated, and read.
Â
Attribute Name | Description |
---|---|
"column name" | This attribute is required when "column" is NOT NULL. Blobs, clobs, and binaries are not returned by default. |
All columns ... | Â |
PASSWORD | This attribute is required for a Password Column and it is not readable or returned by default. |
NAME | This attribute is required. |