GreenSQL Pro User Guide
GreenSQL Pro User Guide
GreenSQL Pro User Guide
0
User Guide
GreenSQL User Guide
Table of Contents
1. Introduction ...................................................................... 7
1.1 Overview................................................................................................. 7
1.2 Document Conventions .......................................................................... 8
2. Getting Started................................................................. 9
2.1 System Requirements ............................................................................. 9
2.2 Supported Database Servers ................................................................. 10
2.3 Login 10
2.4 Workflow .............................................................................................. 10
2.5 GreenSQL Common Functions .............................................................. 11
2.6 GreenSQL Top Toolbar .......................................................................... 12
2.7 Dashboard ............................................................................................ 13
2.8 Components ......................................................................................... 14
2.8.1 Services/Processes .......................................................................... 14
2.8.2 GreenSQL Directory ......................................................................... 15
3. Policies .......................................................................... 16
3.1 Overview............................................................................................... 16
3.2 Types of Policies ................................................................................... 17
3.3 Creating a Policy ................................................................................... 17
3.3.1 Creating a Learning Mode Policy ..................................................... 18
3.3.2 Creating a Database Firewall Policy ................................................. 22
3.3.3 Creating a Risk-Based IPS/IDS Policy ................................................ 27
3.4 Customizing the Policy Display.............................................................. 30
3.5 Reordering Policies ............................................................................... 30
3.6 Creating Policy Objects ......................................................................... 31
3.6.1 Creating IP Addresses ...................................................................... 31
3.6.2 Creating IP Address Ranges ............................................................. 33
3.6.3 Creating IP Groups........................................................................... 33
3.6.4 Creating Database Users ................................................................. 34
3.6.5 Creating Database User Groups....................................................... 36
3.6.6 Creating Application Names ............................................................ 36
3.6.7 Creating Application Name Groups ................................................. 37
3.6.8 Creating a Schedule ......................................................................... 38
3.6.9 Creating a Schedule Group .............................................................. 41
Page 2 of 111
GreenSQL User Guide
Page 3 of 111
GreenSQL User Guide
Page 4 of 111
GreenSQL User Guide
Important Notice
© Copyright GreenSQL Ltd 2007 – 2010. All rights reserved.
GreenSQL Ltd. (GreenSQL) reserves the right to make corrections, modifications, enhancements,
improvements, and other changes to its products and services at any time and to discontinue any
product or service without notice. Customers should obtain the latest relevant information before
placing orders and should verify that such information is current and complete. All products are sold
subject to GreenSQL's terms and conditions of sale supplied at the time of order acknowledgment.
GreenSQL warrants performance of its products to the specifications applicable at the time of sale in
accordance with GreenSQL's standard warranty. Testing and other quality control techniques are used
to the extent GreenSQL deems necessary to support this warranty. Except where mandated by
government requirements, testing of all parameters of each product is not necessarily performed.
GreenSQL assumes no liability for third-party applications assistance. Customers are responsible for their
products and applications using GreenSQL components. To minimize the risks associated with customer
products and applications, customers should provide adequate design and operating safeguards.
GreenSQL does not warrant or represent that any license, either express or implied, is granted under any
GreenSQL patent right, copyright or other GreenSQL intellectual property right relating to any
combination, machine, or process in which GreenSQL products or services are used. Information
published by GreenSQL regarding third-party products or services does not constitute a license from
GreenSQL to use such products or services or a warranty or endorsement thereof. Use of such
information may require a license from a third party under the patents or other intellectual property of
the third party, or a license from GreenSQL under the patents or other intellectual property of GreenSQL.
Resale of GreenSQL products or services with statements different from or beyond the parameters stated
by GreenSQL for that product or service voids all express and any implied warranties for the associated
GreenSQL product or service and is an unfair and deceptive business practice. GreenSQL is not
responsible or liable for any such statements.
All company and brand products and service names are trademarks or registered trademarks of their
respective holders.
All text and figures included in this publication are the exclusive property of GreenSQL Ltd (GreenSQL),
and may not be copied, reproduced, or used in any way without the express written permission of
GreenSQL. Information in this document is subject to change without notice and does not represent a
commitment on the part of GreenSQL. Although the information in this document has been carefully
reviewed, GreenSQL does not warrant it to be free of errors or omissions. GreenSQL reserves the right to
make corrections, updates, revisions or changes to the information in this document.
GreenSQL Ltd.
Page 5 of 111
GreenSQL User Guide
1 Harechev Street
Tel Aviv 67771
Israel
Tel: (+972)3-688-8090
Fax: (+972)3-760-1166
www.greensql.com
Page 6 of 111
GreenSQL User Guide
1
Introduction
1.1 Overview
GreenSQL is a Unified Database Security solution that is installed as a frontend to
databases, fully camouflaging and securing them.
GreenSQL works as a SQL reverse proxy and provides several database security and
acceleration features including automated learning mode, a database rule-based firewall,
database audit, database intrusion detection and prevention, database caching and
database virtual patching.
Page 7 of 111
GreenSQL User Guide
Text set off in this manner indicates that failure to follow directions
could result in damage to equipment or loss of information.
Text set off in this manner indicates that failure to follow directions
could result in loss of data.
Page 8 of 111
GreenSQL User Guide
2
Getting Started
This chapter provides all the required information for getting started with GreenSQL. The
following sections are covered to help you get familiar with the application:
Requirements
Database Servers
Common Buttons
Top Toolbar
2.1 Requirements
To ensure GreenSQL operates properly, the following minimum system requirements
must be met:
Operating Systems
Windows® Server 2003 (x86 and x64)
Windows® Server 2008 (x86 and x64)
Ubuntu 9.04 or above (x86 and x64)
CentOS 5.4 or above (x86 and x64)
Page 9 of 111
GreenSQL User Guide
2.3 Login
To login to the GreenSQL management console, browse to ://IP_Address:5000/
While IP_Address is the IP address of any of the server’s Network Interface Cards.
Default username: admin
Default password: pwd
2.4 Workflow
The following workflow is recommended when first starting to use GreenSQL:
Installation
Download the latest version of GreenSQL from ://portal.greensql.com/download
run it and follow the installation instructions located in the Installation Guide.
License Installation
See installation.
Create Proxy/Proxies
Set up new connections to your databases by enabling all database queries to
pass through the GreenSQL server. See and Managing Proxies.
Create Database(s) (Optional)
Declare databases. This step is useful for creating specific database policies.
See Databases.
Create Learning Mode Policy/Policies
Set up a learning mode policy, which will learn the behavior of queries sent to
the databases and will make the entire database firewall configuration much
easier. See a Learning Mode Policy.
Create Firewall and IPS/IDS Policies
Set up GreenSQL actions according to your database security policies. See .
Page 10 of 111
GreenSQL User Guide
Set up Caching
The Caching feature is enabled by default. Configure caching settings or disable
caching. See .
Configure GreenSQL User Permissions and Settings
Reset the Admin password and create new accounts if necessary. See and
Management Permissions.
Backup GreenSQL Configuration
Backup all policies, databases, proxies, users and additional GreenSQL settings.
See GreenSQL Settings.
Button Description
Toggle for hiding/displaying the Functions Bar
Cancels action
Page 11 of 111
GreenSQL User Guide
Button Description
Icon Description
Page 12 of 111
GreenSQL User Guide
Icon Description
2.7 Dashboard
The GreenSQL Dashboard includes the following data:
Databases – All databases declared in the Databases page
Proxies – All configured proxies
System Information – General configuration, logs and license information
Top Used Queries – A graph which displays the top used queries. Clicking each bar
displays the specific query.
Latest Attacks – A list of the last attacks.
Caching Performance – provides the top five used queries and its statistics regarding
average response time from the caching module and from the database
Database Caching Efficiency – sums up the caching efficiency per database
Page 13 of 111
GreenSQL User Guide
2.8 Components
20B
2.8.1 Services/Processes
75B
Page 14 of 111
GreenSQL User Guide
Page 15 of 111
GreenSQL User Guide
3
Policies
3.1
This chapter describes the policy feature, the core of GreenSQL’s ability to provide
constant protection to databases.
GreenSQL enables organizations to define their own security policy using the GreenSQL
Policy function. Should there be a breach of policy, you may elect to be immediately
alerted (See: ). The system will respond to a breach in the manner defined by the
relevant enacted policy.
GreenSQL Policy has an automated Learning Mode which learns and builds policies,
according to the specific usage of each database. You can accept or reject the rules
custom made for you. Learning Mode dramatically reduces the operational overhead
required to implement a secure and reliable policy for all access to your database.
Similarly, you can manually configure policies and create custom rules by creating Query
Groups which consist of patterns to be monitored, allowed or blocked. You can also
apply an Intrusion Prevention System (IPS) or Intrusion Detection System (IDS) policy
based on a risk profile, anomaly detection and preconfigured signature detection.
The Policy page is displayed by clicking the Policy tab on any of the GreenSQL
application’s pages.
Page 16 of 111
GreenSQL User Guide
Page 17 of 111
GreenSQL User Guide
Page 18 of 111
GreenSQL User Guide
Page 19 of 111
GreenSQL User Guide
(Optional) In Source IP, Database User and Application Name, select whether
to apply the policy only on queries originating from specific source IPs, database
users and applications. To create these objects, see Policy Objects.
(Optional) In the Schedule dropdown menu, select whether to apply the policy
only on queries sent in specific time schedules. To create a schedule, see a
Schedule.
In the Learning Group dropdown menu, either click the New button to create an
empty Query Group to be populated with the learned patterns, or select an
existing Query Group to be populated with additional learned patterns. Clicking
the New button will open the Create New Group window. Type a name for the
Query Group and pick a color for the appearance of this group, if desired.
In the Learning Duration dropdown menu, choose the duration for learning
database behavior.
Page 20 of 111
GreenSQL User Guide
Check the Turn To Firewall Rule checkbox to turn all learned patterns into
“Allow” rules. If this checkbox is not selected, the policy will be disabled when
Learning Duration expires. A Query Group will be created and can be used to
create Firewall Policies.
In the IPS/IDS dropdown menu, select one of the following tasks to be
performed simultaneously with the learning operation:
Active Protection – IPS - Applies an Intrusion Prevention System and
blocks queries which match a risk profile created previously (See:
Risk Profiles)
Monitoring – IDS - Applies an Intrusion Detection System and
monitors queries which match a risk profile created previously (See:
Risk Profiles).
No IPS/IDS – Does not apply an IPS or IDS to the queries.
If Monitoring – IDS is selected, the following fields should be completed:
Risk Profile – Selects a previously created Risk Profile that determines
which queries to monitor.
SQL Injection Detection – Enables detection of SQL injection
attempts. The detection of SQL injection attempts is based on
GreenSQL’s built-in detection system.
Caching Enabled – Enables caching of the returned data of accepted
queries.
If Active Protection – IPS is selected, the following fields should be completed:
Risk Profile – Selects a previously created risk profile, which
determines which queries to log in the Intrusion log.
SQL Injection Detection – Enables blocking of SQL injection
attempts. The detection of SQL injection attempts is based on
GreenSQL’s built-in detection system.
Block Action – Selects type of response when blocking a query.
Logging – Enables writing of blocked queries to the Traffic log.
Caching Enabled – Enables caching of accepted queries.
Click Create. The Policy page is displayed with the new policy rule displayed at
the bottom of the list.
Page 21 of 111
GreenSQL User Guide
The database firewall policy enables the creation of sets of custom rules based
on user defined parameters. For example: to allow all queries from a specific IP
address, block specific user-defined queries, allow queries based on query
groups generated by a learning policy, etc.
In the Filter Type dropdown menu, select one of the following type to be
performed:
Query Groups – Applies a policy according to the query group you
created or been created by a learning rule
Page 22 of 111
GreenSQL User Guide
In Source IP, Database User and Application Name, select whether to apply
the policy only on queries originating from specific source IPs, database users
and applications. To create these objects, see Policy Objects.
In the Schedule dropdown menu, select whether to apply the policy only on
queries sent in specific time schedules. To create a schedule, see a Schedule.
If Query Groups selected the following fields have to be filled:
In the Query Group dropdown menu, choose one of the following options:
Any Query – Apply the policy to any query. The values selected in the
left-hand-side parameters will be the conditions under which the policy
will apply.
Select a Query Group – Apply the policy to predefined queries. The
values selected in the left-hand-side parameters, in addition to the
Query Group, will be the conditions under which the policy will apply.
Page 23 of 111
GreenSQL User Guide
Click the New button – Create a new Query Group. The values selected in the
left- side parameters, in addition to the newly created Query Group, will be the
conditions under which the policy will apply.In the Action dropdown menu,
select an action. The available actions are:
Allow, Block or None. The None action is used to enable caching to specific
queries without applying any action to them.
Page 24 of 111
GreenSQL User Guide
In the Action dropdown menu, select an action. The available actions are:
Allow, Block or None. The None action is used to enable caching to specific
queries without applying any action to them.
Page 25 of 111
GreenSQL User Guide
In the Action dropdown menu, if Allow action selected. The available actions are:
View – Applies a policy of View type queries only
Modify – Applies a policy of Modify type queries only
Delete – Applies a policy of Delete type queries only
Administrative – Applies a policy of Administrative type queries only
(Any - select all of the above options ) select whether to apply the policy on View
type queries, Modify type queries, Delete type queries and Administrative type
queries.
Page 26 of 111
GreenSQL User Guide
In both types, Query Groups or Table Based. The following fields are optional:
Select the Caching Enabled checkbox to enable caching for matched queries.
In the Comment text box, a comment can be added.
Check the Disable Rule checkbox to disable the rule.
Click Create. The Policy page is displayed with the new policy rule displayed at
the bottom of the list.
The Risk-Based IPS/IDS policies are intended either for monitoring SQL injection
attempts and queries with risk potential (IDS) or for blocking them (IPS). The
process of selecting the queries to be monitored or blocked is explained in the
section Risk Profiles.
Once a Risk Profile is created, a risk-based policy can be created.
Page 27 of 111
GreenSQL User Guide
In Source IP, Database User and Application Name, select whether to apply
the policy only on queries originating from specific source IPs, database users
and applications. To create these objects, see: Policy Objects.
In the Schedule dropdown menu, select whether to apply the policy only on
queries sent in specific time schedules. To create a schedule, see a Schedule.
In the Mode dropdown menu, select Active Protection – IPS to block queries
according to a Risk Profile, or select Monitoring – IDS to monitor queries
Page 28 of 111
GreenSQL User Guide
according to a Risk Profile. SQL Injection Detection will detect SQL injection
attempts and block or monitor according to the IPS or IDS selection.
Check the option SQL Injection Detection, to detect SQL injection attempts.
Detection is based on GreenSQL predefined risk calculations.
The Action field will contain the action which will be applied in the policy. By
selecting the Active Protection – IPS option, the action will always be Block. By
selecting the Monitoring – IDS option, the action will always be Allow.
If the Active Protection – IPS mode is selected, the following fields will appear:
Block Action – Select the desired type of response when blocking a
query.
Logging – Enable the writing of blocked queries to the Traffic Log.
Check the Caching Enabled checkbox to cache queries that have not been
blocked.
In the Comment text box, a comment can be added to this rule.
Check the Disable Rule checkbox to disable the rule.
Click Create. The Policy page is displayed with the new policy rule displayed at
the bottom of the list.
Page 29 of 111
GreenSQL User Guide
Click the Customize button. A list of column names is displayed above the
Policy list.
To add or remove a column, check or remove the checkmark from the checkbox
in the list of column names and click the Done button.
You cannot change the order of the columns using the Customize
function.
To Reorder Policies:
1. In Global view, click the Reorder button. The Policy list area of the
Policy page is surrounded by a bold, dashed line and as you hover
over the policies, your cursor changes from an arrow to bi-directional
crossed arrows.
2. Using the new cursor, click, drag and drop a policy to the desired
location in the policy list.
Page 30 of 111
GreenSQL User Guide
The list of objects appears in the Policy tab Functions Bar under Objects.
3.6.1 IP Addresses
To apply a policy to a specific client IP address, an IP Address Object should be
created and selected in a policy.
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
2. Click the IP Addresses option. The IPS page is displayed.
Page 31 of 111
GreenSQL User Guide
3. Click the Create New button. The Create IP Address Object page is
displayed.
4. Manually enter the Name representing the object, the IP Address and a
Netmask. Use the dropdown menus to define the parameters of the
Page 32 of 111
GreenSQL User Guide
remaining fields. Selecting a value for each field will cause the object to
appear only in specific configuration groups. For example, selecting a
Database Type will cause the configured IP Address object to appear
only for this type of database.
An IP address can also be selected from the IP Addresses Extracted
from Logs frame below the Create IP Address Object frame by
clicking next to the IP address.
5. Click the Create button. The IPS page is displayed with the new IP
address on the list.
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
2. Click the IP Ranges option. The IP Addresses page is displayed.
3. Click the Create New button. The Create IP Range Object page is
displayed.
4. Manually enter the IP Address Start/End and Name in the relevant
fields. Use the dropdown menus to define the parameters of the
remaining fields.
5. Click the Create button. The IP Ranges page is displayed with the new
IP Range on the list.
To Create an IP Group:
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
Page 33 of 111
GreenSQL User Guide
3. Click the Create New button. The Create New Group page is
displayed.
4. Manually enter a Name in the relevant field. Use the dropdown menus
to define the parameters of the remaining fields. To transfer an
Available Member to a Current Member, double-click the Available
Member. The member will appear in the Current Members.
5. Click the Create button. The IP Groups page is displayed with the new
IP Group on the list.
Page 34 of 111
GreenSQL User Guide
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
2. Click the DB Users option followed by Users. The Database Users
page is displayed.
3. Click the Create New button. The Create DB User Object page is
displayed.
4. Manually enter the Name in the relevant field. Use the dropdown menus
to define the parameters of the other fields. You can also enter a user
name by clicking next to the user name in the Database Users
Extracted from Logs frame below the Create DB User Object frame.
5. Click the Create button. The Database Users page is displayed with the
new DB User on the list.
Page 35 of 111
GreenSQL User Guide
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
2. Click the DB Users option followed by Groups. The Groups page is
displayed.
3. Click the Create New button. The Create New Group page is displayed
4. Manually enter the Name in the relevant field. Use the dropdown menus
to define the parameters of the remaining fields. To transfer an
Available Member to a Current Member, double-click the Available
Member. The member will appear in the list of Current Members.
5. Click the Create button. The User Group Object is displayed in the
bottom of the Database User Group list.
Page 36 of 111
GreenSQL User Guide
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
2. Click the APP Name option followed by APP Name. The Application
Names page is displayed.
3. Click the Create New button. The Create APP Name Object page is
displayed.
4. Manually enter the Name in the relevant field. Use the dropdown menus
to define the parameters of the remaining fields. You can also enter an
Application Name by clicking next to the Application Name in the
Application Names extracted from logs frame below the Create APP
Name Object frame.
5. Click the Create button. The Application Names page is displayed with
the new Application Name on the list.
Page 37 of 111
GreenSQL User Guide
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
2. Click the APP Name option followed by APP Name Groups. The
Create New Group page is displayed.
3. Click the Create New button on the top right side of the page. The
Create New Group page is displayed.
Page 38 of 111
GreenSQL User Guide
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
2. Click the Scheduling option followed by One-Time Scheduling. The
One-Time Scheduling page is displayed.
3. Click the Create New button. The Create One-Time Scheduling
Object page is displayed.
Page 39 of 111
GreenSQL User Guide
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
2. Click the Scheduling option followed by Recurring Scheduling. The
Recurring Scheduling page is displayed.
3. Click the Create New button. The Create Recurring Scheduling
Object page is displayed.
Page 40 of 111
GreenSQL User Guide
To combine multiple schedules into one, you can create a schedule group.
1. Click the Objects option on the Policy Functions Bar. The Objects
option expands.
2. Click the Scheduling option followed by Scheduling Groups View. The
Create New Group page is displayed.
3. Manually enter the Name in the relevant field. Use the dropdown menus
to define the parameters of the remaining fields.
4. Click the Create button. The Groups page is displayed with the new
Schedule Group on the list.
To Create a Table:
Page 41 of 111
GreenSQL User Guide
Page 42 of 111
GreenSQL User Guide
7. Select a table.
8. Click the Update button.
9. Click the Create button. The Table page is displayed with
the new Table on the list.
To combine multiple tables into one, you can create a Tables Group.
1. Enter the Name in the relevant field.
2. (Optional) Add available members to the Current Members box,
otherwise, the new tables group can be populated when a Database
Firewall Policy is applied. To transfer an Available Member to a Current
Member, double-click the Available Member.
3. Available members are either Tables or Tables Groups previously
created.
4. Use the dropdown menus to define the parameters of the remaining
fields.
5. Click the Create button. The Table Groups page is displayed with the
new Tables Group on the list.
Page 43 of 111
GreenSQL User Guide
Page 44 of 111
GreenSQL User Guide
8. Manually enter the Profile Name and Description in the relevant fields.
9. Select one of the Database types.
10. Select one of the following Action behaviors for each group:
Page 45 of 111
GreenSQL User Guide
Default – Uses the default action configured in the IPS or IDS policy.
11. Select one of the following Logging Behaviors for each group:
Enable – Enable logging for all queries of this group.
Disable – Disable logging for all queries of this group.
Custom – Allows you to combine different logging behaviors for each
query in the group. To view each query in the group and specify its logging
behavior, click mysql/queries under the Group Name.
Default – Uses the default log behavior configured in the IPS or IDS
policy.
12. Click the Create button to save these settings. The newly created Risk
Profile will appear in the list of Risk Profiles.
Page 46 of 111
GreenSQL User Guide
Pattern Groups are the groups of queries which define Risk Profiles. When
creating a Risk Profile, all Pattern Groups appear in the profile and an action
can be configured for each Pattern Group.
GreenSQL includes a predefined set of Pattern Groups. New Pattern Groups
can be created and will automatically be added to each Risk Profile.
1. Click the Risk Profiles option on the Policy Functions Bar. The Risk
Profiles option expands.
2. Click the Pattern Groups option. The Pattern Groups page is
displayed.
3. Click the Create New button. The Create New Risk Patterns Group
page is displayed.
Page 47 of 111
GreenSQL User Guide
Page 48 of 111
GreenSQL User Guide
1. Click the Risk Profiles option on the Policy Functions Bar. The Risk
Profiles option expands.
2. Click the Risk Patterns option. The Risk Patterns page is displayed.
3. Click the Create New button. The Create New Risk Pattern page is
displayed.
Page 49 of 111
GreenSQL User Guide
8. In the Default Action field, select whether to Block, Allow or not apply
any action (None) when the pattern is identified.
9. Checkmark the Default Logging checkbox to log events for the risk
pattern by default.
10. Checkmark the Disabled checkbox to disable the usage of the risk
pattern.
11. Click the Create button to save these settings. The newly created Risk
Pattern will appear at the end of the list of Risk Patterns.
1. Click the Query Groups option on the Policy Functions Bar. The Query
Groups page is displayed.
2. Click the Create New button. The Create New Group page is
displayed.
Page 50 of 111
GreenSQL User Guide
1. Click the Query Groups option in the Policy Functions Bar. The Query
Groups page is displayed, showing all Query Groups.
Page 51 of 111
GreenSQL User Guide
2. Click the Edit icon next to the Query Group to be edited. The Edit
Group page appears.
Page 52 of 111
GreenSQL User Guide
1. In the Policy page, click the Query Groups option on the Policy
Functions Bar. The Query Groups option expands.
2. Click the Query Patterns option. The Query Patterns page is
displayed.
Page 53 of 111
GreenSQL User Guide
3. Click the Create New button. The Create New Query Pattern page is
displayed.
Page 54 of 111
GreenSQL User Guide
Page 55 of 111
GreenSQL User Guide
4
Databases and Proxies
This chapter contains the following sections:
Page Overview
and Managing Proxies
Databases
Databases
Databases
SSL Certificates
4.1
GreenSQL is used as a reverse proxy to any supported database. To define a new
connection to be used as the front end of each database server or instance, a proxy
should be created. Once proxies are created, all clients should be configured to connect
to the appropriate proxy, which relays the queries to their destinations. Policies can then
be configured to apply on each proxy or on each database assigned to a proxy.
Creating a database means that an object is created in GreenSQL to which the
administrator can apply specific policies on queries directed to that database. If a
database is not created, policies can be applied globally to all queries of a defined proxy
or to all queries regardless of their destination.
GreenSQL is compliant with the following database servers:
Microsoft® SQL Server® (2000/2005/2008/2008 R2)
MySQL Server (4.x/5.x)
PostgreSQL Server (7.x/8.x)
The following topics are described in the next sections:
How to create and manage proxies – Proxies are the foundation by which GreenSQL
is able to intercept and monitor all queries directed to databases. Each proxy opens a
new frontend port with an assigned connection to the backend databases.
Page 56 of 111
GreenSQL User Guide
The Databases page contains the following options in the left-hand functions bar:
Databases – Lists all configured databases and allows you to
enable/disable, create, edit and delete databases on the list
Create Database – Opens the Create Database wizard
Proxies – Lists all configured proxies and allows you to enable/disable,
create, edit and delete proxies on the list
Create Proxy – Opens the Create Proxy wizard
Certificates – Lists all installed certificates
Add Certificates – Opens the Add Certificates wizard
Page 57 of 111
GreenSQL User Guide
GreenSQL is preconfigured with a default policy which allows all queries, if this policy is
removed or disabled, all queries will be denied, due to the nature of GreenSQL to block
all traffic by default. Configuring a Proxy and a Database will not forward the traffic to
your backend Database without any policy.
To Create a Proxy:
1. In the Databases page, click the Create Proxy option on the Databases
functions bar. The Create Proxy page is displayed.
Page 58 of 111
GreenSQL User Guide
To edit a proxy:
Page 59 of 111
GreenSQL User Guide
To delete a proxy:
To Create a Database:
1. In the Databases page, click the Create New button or the Create Database
option on the Databases functions bar. The Create Database page is
displayed.
2. In the Create Database page, select the Proxy Listener. The Proxy details will
appear on the screen.
Page 60 of 111
GreenSQL User Guide
4. You can also enter a Database by clicking next to the Database name in
the Database Names Extracted from Logs frame below the Create
Database frame.
Page 61 of 111
GreenSQL User Guide
Page 62 of 111
GreenSQL User Guide
Page 63 of 111
GreenSQL User Guide
Auditing options:
Audit User Login – This option should be selected in order to audit
login attempts to databases.
1. Click the icon in the top toolbar. The list of databases appears.
2. Click the Delete icon next to the database name. The Database’s
Associated Rules table appears. If the table is empty, the database can be
deleted. Click Delete. If the selected database has been associated with any
rules, the rules appear in the table. The database cannot be deleted until these
associated rules are removed.
In the Databases page, click the Add Certificates option in the left-hand
functions bar. The Add Certificates window appears.
Page 64 of 111
GreenSQL User Guide
Click Browse next to the Certificate field, to locate the SSL certificate file.
Type a password in the Password field, if required.
Click Upload to upload the certificate.
To use the uploaded certificate, the certificate must be applied to a proxy. For
more information, see: and Managing Proxies.
Page 65 of 111
GreenSQL User Guide
5
Caching
5.1
The Caching module can greatly improve response time and performance by saving
database content (responses to queries) on the server where GreenSQL is installed.
When content is retrieved from the cache, a query to the Database is not performed,
saving system resources.
The cached information is saved into a defined memory space. Web Applications
connected to a database can get massive performance acceleration using the caching
feature.
To disable Caching for all databases, disable caching in the System Settings tab.
Global configurations
The Global Cache Settings are located in the System page.
Page 66 of 111
GreenSQL User Guide
Page 67 of 111
GreenSQL User Guide
4. Check the Do Not Cache This Query checkbox to disable caching for the
query. Leaving the checkbox empty will enable caching for this query, yet the
caching must be enabled per policy and globally as well. For more information
on caching, see: .
5. Click Update to save any changes.
5.3 Process
Caching is configured by the following parameters in each database’s Properties page:
Minimum cache time (secs) (Default: 5 seconds)
Maximum cache time (secs) (Default: 3600 seconds)
Page 68 of 111
GreenSQL User Guide
1. Each response to a unique query is retrieved from the database and cached on
the GreenSQL server for [Minimum cache time] and Cache Time (The amount
of time the query is to be cached) is set to [Minimum cache time].
2. As long as Cache Time is not reached, responses to queries are retrieved from
the cache.
3. Once Cache Time is reached:
3.1 The cached response is flushed.
3.2 Identification (MD5 signature) of the flushed response is stored for
comparison the next time the specific query is used.
3.3 The next time the specific query is used, the response is retrieved from the
database and an MD5 comparison is performed. If the response to the
query differs from the previous response, Cache time is reset to [Minimum
cache time]; otherwise Cache Time grows gradually until it reaches
[Maximum cache time].
4. When [Maximum cache time] is reached. Cache time will be retained until an
MD5 comparison test finds a modification change in the Database content.
Page 69 of 111
GreenSQL User Guide
6
Alerts
6.1
GreenSQL provides you the option to be alerted in response to specific, pre-configured
alert types. The Alerts function is designed to allow specified contacts to receive
periodic emails of selected event types, such as GreenSQL System changes, Audit
events, Firewall events, and Intrusion events.
The Alerts page is displayed by clicking the Alerts tab on any of the
GreenSQL application’s pages.
Page 70 of 111
GreenSQL User Guide
Click the Customize button above the Alerts table. The following box
appears.
Page 71 of 111
GreenSQL User Guide
Intrusion– All queries which were detected either by the IPS or the IDS
mechanism
Page 72 of 111
GreenSQL User Guide
Page 73 of 111
GreenSQL User Guide
Page 74 of 111
GreenSQL User Guide
7
Logs
This chapter contains the following sections:
Page Overview
Logs
Intrusion Logs
Logs
Syslog Settings
Log Settings
7.1
GreenSQL generates Traffic, intrusion and management logs.
The Traffic logs include a list of all queries that were blocked by custom firewall rules.
The Intrusion Logs logs include a list of all queries that were blocked by by an intrusion
attempt.
The management logs include a list of all GreenSQL configuration changes, update
activities, or management console activities.
All events are written into separate database files and can also be configured to be sent
to a configured syslog server.
The Logs page is displayed by clicking the Logs tab on any of the GreenSQL
application’s pages.
Page 75 of 111
GreenSQL User Guide
The Logs page contains the following options in the left-hand functions bar:
Traffic Logs – Lists events of allowed, blocked and monitored queries,
due to database firewall.
Intrusion Logs – Lists events of blocked and monitored queries due to
intrusion detection or prevention rules.
System Logs – Lists events of GreenSQL configuration changes,
updates or management console activities
Archives – List of Archived logs which can be views
Archives Rotation
Number of Log Files – Maximum number of log files to appear in
the log directory
Max File Size – The maximum size in MB of each log file
Events are written into log files in rotation. Once the [Max File Size] is
reached, a new file is created. If [Number of Log Files] is reached, the
oldest log file is overwritten.
Scheduled Rotation - In addition to the rotations above, it is
possible to configure a scheduled time to stop writing into an existing
log file and start writing into a new one. The following options are
available: Disabled, Daily, Weekly and Monthly.
Page 76 of 111
GreenSQL User Guide
Page 77 of 111
GreenSQL User Guide
Page 78 of 111
GreenSQL User Guide
1. Click the Filter button on top of the Traffic Logs table. The following box
appears:
Page 79 of 111
GreenSQL User Guide
To view all events, click the Filter button, reset all changes manually and click Done.
Page 80 of 111
GreenSQL User Guide
Page 81 of 111
GreenSQL User Guide
1. Click the Filter button on top of the Management Logs table. The following box
appears:
To view all events, click the Filter button, reset all changes manually and click Done.
1. Click the Customize button above the Management Logs table. The following
box appears.
Page 82 of 111
GreenSQL User Guide
2. Checkmark the fields to appear in the table or remove the checkmark from
fields to be removed from the table.
3. Click Done to save these settings.
1. In the Logs page, click Syslog Settings in the left functions menu. The Syslog
Configuration page appears.
Page 83 of 111
GreenSQL User Guide
Page 84 of 111
GreenSQL User Guide
8
Reports
8.1
The reports feature enables you to view statistics of database activity. These statistics
include the following:
1. Top highest average execution time queries
2. Top executed queries
3. Top running execution span queries
4. Top intruders IP addresses
5. Top blocked queries
6. Top blocked users
7. Top blocked applications
8. Top bad attempts source IP addresses
The Reports page is displayed by clicking the Reports tab on any of the
GreenSQL application’s pages.
To generate a report:
1. In the Reports page, select Generate Report in the left-hand functions bar.
Page 85 of 111
GreenSQL User Guide
2. Click the Edit icon to modify the number of items to appear in the report.
3. Click the Create button next to the report type of your choice. A report is
immediately generated.
1. In the Reports page, select Browse Reports in the left-hand functions bar.
2. Select the highest report on the list to view the most updated report or select any
other report to view reports generated previously.
3. The report is opened in a separate window and includes a summary as well as
detailed information on each item.
Page 86 of 111
GreenSQL User Guide
Page 87 of 111
GreenSQL User Guide
9
Auditing
This chapter contains the following sections:
Page Overview
the Audit Log
Audit Log Archives
Advanced Auditing
Audit Settings
9.1
The Audit feature is used to log transactions performed on the Database. This feature
assists in compliance with regulations and forensics, giving IT personnel and the
security officer information on queries which have reached the Database and have not
been blocked, such as extraction, modification and deletion of Database content or
Database configuration and system settings.
Using its Advanced Auditing option, GreenSQL will automatically provide a full audit of
all sensitive tables, which includes a “before and after” view for any change to
sensitive tables.
To view a detailed list of audited commands, see .
The Auditing page is displayed by clicking the Auditing tab on any of the
GreenSQL application’s pages.
Page 88 of 111
GreenSQL User Guide
The Auditing page contains the following options in the left-hand functions bar:
Reports – Lists all Audit events
Policy – Lists all Rules of Audit events
Archives – Lists all archived audit logs
Archives Rotation – Opens audit settings for log rotation
Settings – Opens the Auditing Configurations page. Enables you to
configure the audit logs directory path and status.
1. In the Audit page, click on Reports in the left-hand functions bar. The Audit
Log will appear.
2. Select an event to view additional information on the event.
Page 89 of 111
GreenSQL User Guide
Page 90 of 111
GreenSQL User Guide
The Auditing Policy page is displayed by clicking the Auditing tab on any of
the GreenSQL application’s pages. Click on the Policy in the left-hand functions bar. A
list of all rules will appear.
Types of Policies
In Source IP, Database User and Application Name, select whether to apply
the policy only on queries originating from specific source IPs, database
users and applications. To create these objects, see Policy Objects.
In the Schedule dropdown menu, select whether to apply the policy only on
queries sent in specific time schedules. To create a schedule, see a
Schedule.
Advanced Auditing – Enables audit that includes the previous data and the
current data, the modified values are colored in red.
Page 91 of 111
GreenSQL User Guide
- Schema Changes
- Functions And Procedures
- Privileges
- Data Types
- Jobs And Scheduling
- Servers Communication
- Data Security
- Backup And Restore
- Replication
- Profiling
- Service Broker
- Click Create to create the policy.
Page 92 of 111
GreenSQL User Guide
Page 93 of 111
GreenSQL User Guide
1. In the Audit page, click on Archives in the left-hand functions bar. A list of all
archived audit logs will appear.
2. Click on an archived log to view audit events.
Page 94 of 111
GreenSQL User Guide
In the Auditing page, click Audit Rotation in the left-hand functions bar. The
following settings can be modified:
Number of Log Files – Maximum number of log files to appear in the log
directory. When this number is reached, the oldest log file is overwritten.
Max File Size – Events are written into log files in rotation. Once the
[maximum file size] is reached, a new file is created, unless [Number of
Log Files] is reached and the oldest log is overwritten.
Scheduled Rotation Settings - In addition to the rotations above, it is
possible to configure a scheduled time to stop writing into a log file and
start writing into a new one. The following options are available: Disabled,
Daily, Weekly and Monthly.
In the Auditing page, click Auditing Settings in the left-hand functions bar. The
following settings can be modified:
Page 95 of 111
GreenSQL User Guide
Page 96 of 111
GreenSQL User Guide
10
System Settings
10.1
The System page includes global settings and maintenance options.
Caching
1. Global Caching options – To Enable/Disable caching globally, and cache
queries and/or procedures.
2. Caching Max Memory Size –
3. Caching Per Connection Size –
Page 97 of 111
GreenSQL User Guide
The System page is displayed by clicking the System tab on any of the
GreenSQL application’s pages.
Page 98 of 111
GreenSQL User Guide
Page 99 of 111
GreenSQL User Guide
To create a profile:
3. Click Create New. The Create New User Profile page appears.
4. Type a profile name and click Create. The new profile will appear in the
Profiles list.
5. To grant permissions to a user to access a page, check the checkbox located in
the profile’s column and the page’s row.
To create a user:
2. Click the Create New button on the right top side of the window. The
Create Administrator window appears.
3. From the top dropdown menu, select a Profile to apply to the user (For
more information on profiles, see: Profiles.
4. Complete the following fields:
User
Email
First Name
Last Name
Password
Verify Password
1. Click the System icon from any of the GreenSQL application’s pages.
2. Click on Backup&Restore in the left-hand functions bar. The Backup
page is displayed.
3. Click the Backup button.
4. A message appears, stating that backup has been successfully created.
5. Click on the XML.gz file path link to download the backup.
1. Click the System icon from any of the GreenSQL application’s pages.
1. Click the System icon from any of the GreenSQL application’s pages.
2. Click on License in the left-hand functions bar. The license installation page is
displayed.
3. Type (Or paste) into the text box, the serial number sent to you by e-mail.
4. Click the Update button to install the license. Within a couple of minutes, the
following screen will appear:
Click the System icon from any of the GreenSQL application’s pages.
Click on Factory Reset in the left-hand functions bar. The Factory Reset page is
displayed.
Click the Factory Reset button. You will be prompted to accept the deletion of your
custom settings.
Click OK.
11
Appendix
The following tables describe the objects and commands which are audited by the
Audit Module. The tables are sorted by database type.
MySQL Database
In additional to the above, sensitive tables also audit: INSERT, UPDATE, DELETE,
TRUNCATE and SELECT (SELECT is audited for sensitive tables only if configured in
the database settings in the GreenSQL management console).
PostgreSQL Database
In additional to the above, sensitive tables also audit: INSERT, UPDATE, DELETE,
TRUNCATE and SELECT (SELECT is audited for sensitive tables only if configured in
the database settings in the GreenSQL management console).
MS SQL
* Any Object
In additional to the above, sensitive tables also audit: INSERT, UPDATE, DELETE,
TRUNCATE and SELECT (SELECT is audited for sensitive tables only if configured in
the database settings in the GreenSQL management console).