Security best practices¶
How to keep SQDR and the databases it reaches protected from unauthorized use, with the security of Windows, your databases and your network. Most of it is ordinary server hygiene applied to the Stelo VM; the rest is about the accounts and passwords SQDR use.
Dedicate the server, and restrict access to it¶
Do: run SQDR on their own server, the Stelo VM (see The Stelo
VM), and let only the people who administer replication sign in to it. Keep
the program and data folders (C:\Program Files\StarQuest, C:\ProgramData\StarQuest, the Db2 folders and the drives
with the Db2 databases and logs) accessible to administrators and the service accounts only.
Why: the server holds the configuration, the stored credentials and the staged data of every replicated table. A server that runs nothing else has fewer people and programs with access to it, and is easier to back up and to lock down.
Keep in mind: Windows' default permissions let every local user read parts of C:\ProgramData. If you tighten them,
keep full control for the accounts the services run as (see Programs, services and
files), and test that the services still start.
Keep Windows and the databases up to date¶
Do: install the Windows updates on the Stelo VM, and keep the systems that host the source and destination databases updated too.
Before you update a component that Stelo Capture or SQDR includes (for example Db2 for LUW, Java, Jetty or an ODBC driver; see Third-party components), ask Stelo Support whether the new version is certified: a version released recently may not be yet. Each vendor has its own security recommendations for its component.
Give each account only what it needs¶
Do:
- Source databases: let the Capture Agent wizard create the agent's users where it can: it gives them the authorities they need and no more. When you create them yourself, grant only what the source's Prepare the database section lists (see Databases).
- Destinations: give the Replicator Service's user the rights each destination's page lists, on the schemas it writes to.
- The services on the Stelo VM run as the Local System account by default, and Db2 for LUW as its own service
account. The Db2 user of Stelo Capture (for example
sqdr) needs no administrator rights (see Why the Db2 user needs no authority). Use a domain account for a service only when it must reach other servers with Windows authentication, and give that account only those rights (see Run SQDR as a domain user). - People: with several administrators, turn on Role Based Access Control for the Replicator Service, so each person gets only the actions their role needs, and the audit journal records who changed what.
Protect the control database¶
Do: keep the control database where only the Replicator Service's account and the administrators can reach it. On
the Stelo VM, it's SQDRC in the local Db2 for LUW. For a SQL Server control database, a separate SQL Server instance
for it, with Windows authentication and access only for the service's account, keeps it apart from your application
databases (see Control database).
Why: the control database holds the definitions of every source and destination, with their stored credentials (encrypted), and the users and roles of access control.
Manage the passwords¶
Do:
- Exempt the users created for SQDR from password expiration, on the sources, destinations and the Stelo VM, so replication doesn't stop when a password expires. Where your rules require periodic changes, follow Change the passwords Stelo Capture uses for Stelo Capture, and update the sources' and destinations' Password in the Data Replicator Manager.
- Keep keys, tokens and passphrases in connection strings as secrets.
- Restrict access to scripts and files that hold passwords in plain text, such as the JSON and PowerShell files of
Capture Agent PowerShell and the SQDR Control Center's keystore password
in
ssl.ini(see Your own certificate for the SQDR Control Center).
Exclude the SQDR folders from antivirus scanning¶
Do: if antivirus software runs on the Stelo VM, exclude C:\Program Files\StarQuest, C:\Program Files\IBM,
C:\ProgramData\StarQuest, C:\ProgramData\IBM and the folders of the Db2 databases and logs (for example S:\DB2
and L:\DB2). See Server sizing.
Why: antivirus software is known to interfere with SQDR and Db2 when it scans their files as they're written.
Open only the ports you use¶
Do: use a firewall, and allow only the ports listed in Ports, from the computers that need them. Decide which remote management you need: if nobody opens the SQDR Control Center from another computer, don't open its ports (8080 and 8443) at all. The Replicator Service's PowerShell port (7738) listens on the server itself only, unless you change it (see Ports).
Encrypt what leaves the server¶
Do: look at the paths your data takes, and encrypt the connections that leave the server or cross networks you don't control. Connections inside the Stelo VM, between the Replicator Service and the staging databases, don't need it. See SSL/TLS.
Why: encryption costs performance and setup on every connection; it pays where the data could be read on the way.