Manage SQL Firewall

Managing your SQL Firewall policies and configurations helps ensure that your databases are protected from threats while also ensuring that intended SQL actions can be taken on your databases. See the below topics for information on how to update your SQL Firewall configurations and policies.

Delete Learned SQL Data for a User

Deleting will remove the learned SQL for the selected database user. You typically have to delete the learned SQL when you need to remove SQL Firewall protection for a database user who is no longer active or has changed responsibilities in the system.

  1. Log in to Oracle Database Security Central Console as an auditor.

  2. Select Policies.

  3. Expand the Firewall Policies tab on the left navigation menu.

  4. Select Oracle SQL Firewall.

  5. Select the database corresponding to the user(s) you wish to delete learned SQL for.

  6. Expand the SQL learning for users section.

  7. Select the user(s) you want to delete learning for.

  8. Select Delete.

  9. Select Ok in the confirmation.

    Deleting learned SQL will not have an impact on already created or enabled SQL Firewall policies.

Create a Session Context Only SQL Firewall Policy

You can only create and apply this policy to users that have no SQL Firewall learnings and SQL Firewall policies associated with them.

  1. Log in to Oracle Database Security Central Console as an auditor.

  2. Select Policies.

  3. Expand the Firewall Policies tab on the left navigation menu.

  4. Select Oracle SQL Firewall.

  5. Select the database you want to update SQL Firewall policies for.

  6. Expand the SQL Firewall policy for users section.

  7. Select Create.

  8. Select the Actions on violations option.

    • Allow and log - This option will observe and allow all SQL statements and connections to the database while logging any violations.

    • Block and log - This option will block any SQL statements and database connections not listed in the policy and log the violations. Consider this option when you want SQL Firewall to prevent unauthorized SQL traffic to the database.

  9. Decide if the policy will apply to top level SQL.

    During the learning phase, SQL Firewall records the SQL workload to build the allowlist. If Top Level SQL is selected, only the top-level SQL or PL/SQL statement is learned. If Top Level SQL is not selected, SQL Firewall also learns and records all SQL statements executed within the PL/SQL statement.

  10. Enter in the allowed values for client IP, client program, and OS users.

  11. Select Save.

Update SQL Firewall Policies

  1. Log in to Oracle Database Security Central Console as an auditor.

  2. Select Policies.

  3. Expand the Firewall Policies tab on the left navigation menu.

  4. Select Oracle SQL Firewall.

  5. Select the database you want to update SQL Firewall policies for.

  6. Expand the SQL Firewall policy for users section.

  7. Select a database user name.

    This will take you to the policy details page.

  8. (Optional) Update the Enforcement policy in the Enforcement option section.

    • SQL statements - This option enforces the checks only on the SQL statements.

    • Session contexts - This option enforces the checks only on the database connection paths.

    • SQL statements & session contexts - This options enforces both SQL statements and session context.

  9. (Optional) Update the Actions on violations in the Enforcement option section.

    • Allow and log - This option will observe and allow all SQL statements and connections to the database while logging any violations.

    • Block and log - This option will block any SQL statements and database connections not listed in the policy and log the violations. Consider this option when you want SQL Firewall to prevent unauthorized SQL traffic to the database.

  10. (Optional) Add or remove SQL statements to/from the SQL Firewall policy in the SQL statement section.

  11. Select Save.

Note: Ensure that:

Export and Import SQL Firewall Policies

SQL Firewall policies can be exported and imported as .json files into a secondary DBSecCentral system.

Note: The maximum supported file size for import and export operations is 1 GB.

Export

  1. Log in to Oracle Database Security Central Console as an auditor.

  2. Select Policies.

  3. Expand the Firewall Policies tab on the left navigation menu.

  4. Select Oracle SQL Firewall.

  5. Select the database you want to export policies for.

  6. Expand the SQL Firewall policy for users section.

  7. Select the user you want to export policies for.

    You can only export one database user's policies at a time.

  8. Select Export

  9. Create a password for the .json file.

  10. Select Save.

Import

  1. Log in to Oracle Database Security Central Console as an auditor.

  2. Select Policies.

  3. Expand the Firewall Policies tab on the left navigation menu.

  4. Select Oracle SQL Firewall.

  5. Select the database you want to export policies for.

  6. Expand the SQL Firewall policy for users section.

  7. Select Import

  8. Chose the location of the file

  9. Enter the password for the .json file.

  10. Select Save.

Disable or Enable SQL Firewall Policies

  1. Log in to Oracle Database Security Central Console as an auditor.

  2. Select Policies.

  3. Expand the Firewall Policies tab on the left navigation menu.

  4. Select Oracle SQL Firewall.

  5. Select the database you want to enable or disable policies for.

  6. Expand the SQL Firewall policy for users section.

  7. Select the user(s) you want to enable or disable policies for.

  8. Select Disable or Enable. Disabling will stop the SQL Firewall from evaluating any incoming SQL traffic against this SQL Firewall policy. However, this will not delete the policy and it can be enabled again later.

Delete SQL Firewall Policies

  1. Log in to Oracle Database Security Central Console as an auditor.

  2. Select Policies.

  3. Expand the Firewall Policies tab on the left navigation menu.

  4. Select Oracle SQL Firewall.

  5. Select the database you want to delete policies for.

  6. Expand the SQL Firewall policy for users section.

  7. Select the user(s) you want to delete policies for.

  8. Select Delete.

  9. Select Ok.

    This will delete the SQL Firewall policy and a SQL learning will have to be initiated again to re-create this policy.