Thursday 21 January 2021

Connect a local database to Oracle Data Safe with the on-premise adapter

The configuration of the Data Safe on-premise adapter requires just a few easy steps. First login into the OCI console.
Open the hamburger menu and click on Data Safe.
As you can see from the message on the top right, Data Safe is already activated for my tenant. If this is not the case for your tenant, activate Data Safe first. 
Then click on On Premises Connectors on the left pane.
Click on Create On-Premises Connector.
Give it a name, optionally a description, and click the create button.
The page already tells you, what to do next. Click the button to download the install bundle to your target machine.
Without this password, the next steps won't work. For now, we are done in the OCI console.

Unpack the install bundle zip to your destination location, in my case /u01/DS-on-prem-connector/ 
According to the README, we have the following requirements:

   2a. Software Prerequisites
       1. Oracle Linux 7 or higher
       2. Python 3.5 or higher
          -- with following dependent modules
             -- configparser
             -- zlib
       3. Valid JDK Home(JAVA_HOME)
          -- Version 7 or higher

So if any of these are missing in your environment, this is the time to fix them. Then run the setup-script as documented in the README.

python3 setup.py install --connector-port=1560

This should result in the following
Don't care too much abouit the 'not reachable' message, that might just be a timing issue.

Before a database can be registered with Data Safe, a user with specific rights is needed. Follow the official documentation to create such user and grant the rights that you need.
Go back to your OCI console. If the icon became green and it reads active, everything went fine. Go up one level in the OCI console and click on Service Console. Then under Targets click on Register.
For Target Type choose Oracle On-Premises Database and for Connectivity Option choose On-Premises-Connector, then below select the connector you have just created. If your target machine has several IP addresses, make sure to choose the one that the Listener is listening on (check with lsnrctl stat). Enter the user credentials from the previous steps. Then click Test Connection and after the message 'Test connection is successfull' click on Register Target.
In the Data Safe Service Console under Targets, you should find your newly registered database.
For a simple test run, go to Home/Security Assessement and pick your database. Click on Assess Now, wait for the report to finish and click View Report.
Oh dear, my database has 2 high risk issues. Don't tell anyone ...