Skip to content
psiinon edited this page Jun 4, 2015 · 4 revisions

Database

Introduction

ZAProxy uses HSQLDB to store its session data. For those who do not know HSQLDB - you can use it like SQLite. You just open an existing - or non-existing - database file and can start to create tables, insert data, etc. ZAP includes HSQLDB version 1.8.0. The current trunk by 20th of August already contains version 2.2.9.

Details

There is a template database under src/db, that is named zapdb. When ZAP is opened it creates a new database from this zapdb template e.g.: under ~/.ZAP/session/ for Linux and names it untitled1 or untitled2, etc. if it was already created during the current session.

In the org.parosproxy.paros.db.Database class, all Table* instances are added as database listener. The Table* classes itself have to extend AbstractTable and often create new columns or even tables when a new connection is set up.

Inspect Database

You can use SQL Workbench, which is free software, to open HSQLDB database files. This is not possible if it is currently in use by ZAProxy.

Set the hsqldb.jar under Manage Drivers first, before connecting:

View database structure & data and change it:

Upgrading

The upgrade to version 2.2.9 was done due to better transaction support, full support for the powerful MERGE command, real BLOB & CLOB support and many more features.

There is also an open Issue 321 to support more than one database.

Clone this wiki locally