Table of Contents

CONNECTIONS

Note

In this section, outgoing LDAP and JDBC (database) connections for the system are being configured.

Properties

Property name Description Allowed/default values Mandatory
type The type of connection ldap, jdbc Yes

Example

{
    "type": "ldap"
}

LDAP

Properties

Property name Description Allowed/default values Mandatory
host The server address(s). Comma separated. An explicit port can be specified for each address by separating the address and the port with a colon. Example: foo-bar.com:1234,example.com String Yes
port The server port. Can be overriden for each address in the host property Integer Yes
bind_dn DN of the user for bind-operations String Yes
password Password for the bind_dn user. In general, this is encrypted String Yes
use_ssl Whether to use TLS (SSL) or not Default: false No
ssl_trust_all Whether to trust all certificates if use_sslis enabled Default: false No
follow_referrals Whether to follow LDAP referrals Default: false No
auto_reconnect Whan an LDAP connection in the pool dies, this controls whether to reconnect the connection automatically. For backwards compatibility, it's enabled for existing connections, but it's discouraged Default: true No
use_keep_alive Enables the TCP keep alive feature, which will help avoiding idling LDAP connections from being terminated by ex. a firewall in the path between the system and the LDAP server Default: true No
response_timeout_ms The response timeout for each LDAP query Default: 9000 No
pool_initial_size The initial connection pool size Default: 1 No
pool_max_size The maximal number of connections in the pool. This is not a connection limit, however, if more connections are opened, they will be closed instead of being returned to the pool when they aren't needed anymore. Default: 2 No
pool_max_age The maximal lifetime in milliseconds of a connection before it will be terminated and replaced with a new connection. 0 disables this feature. Default: 0 No
load_balance In case multiple addresses has been configured in host, this determines if load balancing will be attempted between all configured addresses (true) or if only fail-over-mode will be used, where earlier entries will have precende over later entries (false). In case of load balancing, servers that not responding will temporarily be quarantined automatically for redundancy. Default: true No

Example:

  {
    "description" : "",
    "type" : "ldap",
    "name" : "ldap",
    "created" : "2024-02-13T13:22:03.280Z",
    "id" : "91ad9b34-ee26-484e-bd2c-7b957392f17e",
    "config" : {
      "host" : "10.0.5.27",
      "port" : "389",
      "bind_dn" : "CN=Administrator,CN=Users,DC=forest,DC=phenixid,DC=local",
      "password" : "{enc}lorkpGlAz6PJrgjMtHM3Iu3Rnfg8a+Iw9VYGXio7u5U=",
      "use_ssl" : "false",
      "ssl_trust_all" : "false",
      "follow_referrals" : "false",
      "auto_reconnect" : "true",
      "use_keep_alive" : "true",
      "response_timeout_ms" : "9000",
      "pool_initial_size" : "1",
      "pool_max_size" : "2",
      "pool_max_age" : "300000"
    }

JDBC

Properties

Property name Description Allowed/default values Mandatory
driver The JDBC driver to use for the connection, for example org.postgresql.Driver for PostgreSQL String Yes
url The connection URL, for example jdbc:postgresql://10.0.5.25:5432/template1 String Yes
username The username for the server Default: Empty string No
password The password for the server Default: Empty string No
auto_commit Whether to enable JDBC auto commit or not Default: true No
read_only If the connection should be read only or not Default: false No
pool_initial_size The initial size of the connection pool Default: 1 No
pool_max_size The maximal size of the connection pool. Additional connections can still be created if required, however, those connections will be closed instead of being returned to the pool when they aren't needed anymore. Default: 1 No
validation_query If this is configured, this validation query will be executed periodically on the database connection in order verify that it is still functional. A timeout of 5 seconds is applied when running the validation query. The query will be executed every 60 seconds on idling connections. Default: SELECT 1 No

Example

  {
    "type" : "jdbc",
    "name" : "postgresql-test",
    "guide_ref" : "acb0fe6b-ae13-4f06-9a3c-80a382e8b9cd",
    "guide_id" : "guides.connections.jdbc",
    "config" : {
      "driver" : "org.postgresql.Driver",
      "url" : "jdbc:postgresql://10.0.5.25:5432/template1",
      "username" : "postgres",
      "password" : "{enc}C8b/APIMgo92dxV3CcdRNErKoGEvosN903t1LeVZdhM=",
      "auto_commit" : "true",
      "read_only" : "false",
      "pool_initial_size" : "1",
      "pool_max_size" : "4"
    },
    "created" : "2024-03-26T19:00:07.980Z",
    "id" : "ccb794ba-d5e7-4b57-b584-dad9e1700652"
  }