Server configuration file
A DB Sync server configuration file is used on the server-side by DB Sync configuration tools and the DB Sync service program.
The DB Sync server configuration file includes parameters to define the DB Sync database schema and establish the SQL connection to the central database engine.
The DB Sync server configuration file must be distributed with the program files of DB Sync server tools and service program.
When using GAS/GIP, the deployment of server files is done with the dbsync_tool deploy-dbsync command. The location of the server configuration file is predefined, as described in Set up the server configuration file.
When using the direct mode, install the server configuration file manually in the location of your choice.
A template for the DB Sync server configuration file is provided in
$DBSYNCDIR/etc/server_config.json
.
The server-side configuration file can be edited with the [dbsync_setup
server-config]
tool.
The database user login and password needs to be specified with the "uname"
and
"upswd"
properties. The password can be provided in clear. However, best practice
is to provide an encrypted password with RSA key specified in the "upswd_pem"
property.
For testing purpose, if the upswd_pem
property is not provided, the property
upswd
can be in clear text. Always use a database user authentication method that
does not expose the login/password in clear text. If you need to provide a DB login/password on
production sites, use the password encryption solution provided with the upswd_pem
property.
{
"schema_file": "./mystore.json",
"dbconn": {
"dbname": "mystore",
"owner": "public",
"source": "mystore@localhost:5432",
"driver": "dbmpgs_9",
"uname": "pgsuser",
"upswd": "okqLhhj2g9825BPzUmWn1jugXA...==",
"upswd_pem": "/var/myapp/mykey.pem"
}
}
schema_file
: Defines the path to the DB Sync database schema file.dbconn
: Defines central SQL database connection parameters:dbname
: The name of the database in programs.source
: The database source (like fglprofiledbi.database.dbname.source
)driver
: The database client ODI driver (like fglprofiledbi.database.dbname.driver
)uname
: The database user login.upswd
: The database user (encrypted) password.upswd_pem
: The file containing the RSA private key used to encrypt/decrypt the password provided in theupswd
property.
- Generate an RSA PEM private key, for ex with following command:Note that the RSA private key PEM file can be protected by passphrase, but then you need to set up fglpass agent on the server where DB Sync programs run. See GWS doc for more details.
openssl genpkey -algorithm RSA \ -pkeyopt rsa_keygen_bits:2048 \ -out mykey.pem
-
Start the server config file setup program:
dbsync_setup server-config -c myconfig.json
Encrypt the DB user password as follows:
-
Enter the full path to your your .pem file in the PEM field.
-
Click on the Password Input button.
-
Enter the DB user password in the prompt and accept the input with OK button: The encrypted password is written to the password field.
When the encrypted password is generated, click the OK button to check the DB connection and save the settings.
-