Project

General

Profile

SQL configuration and credential plugin » History » Version 6

Tobias Brunner, 05.05.2009 18:56
trac conversion errors fixed

1 5 Martin Willi
h1. SQL configuration and credential plugin
2 1 Martin Willi
3 1 Martin Willi
4 5 Martin Willi
The SQL plugin for [[charon]] allows to store the complete connection configuration in a relational database. Further, the daemon reads credentials, such as certificates, private keys or passwords from the database to do all kind of authentication. Logging to the database is also possible.
5 5 Martin Willi
6 5 Martin Willi
7 5 Martin Willi
h2. Status
8 1 Martin Willi
9 6 Tobias Brunner
The SQL plugin is still experimental and in developement (source:src/charon/plugins/sql). It currently works on top of MySQL or SQLite.
10 5 Martin Willi
There is no frontend yet to configure the database, but we'll extend [[Manager|the manager]] to allow such tasks.
11 5 Martin Willi
12 5 Martin Willi
13 5 Martin Willi
h2. Database setup
14 1 Martin Willi
15 1 Martin Willi
There are three SQL scripts to help you in the database setup:
16 6 Tobias Brunner
* MySQL tables source:src/charon/plugins/sql/mysql.sql
17 6 Tobias Brunner
* SQLite tables source:src/charon/plugins/sql/sqlite.sql
18 6 Tobias Brunner
* Test data source:src/charon/plugins/sql/test.sql
19 1 Martin Willi
20 5 Martin Willi
21 5 Martin Willi
h2. Configuration
22 5 Martin Willi
23 1 Martin Willi
Make sure to build strongSwan with the appropriate modules:
24 5 Martin Willi
<pre>
25 4 Martin Willi
 ./configure --enable-sql --enable-mysql --enable-sqlite [...]
26 5 Martin Willi
</pre>
27 1 Martin Willi
28 6 Tobias Brunner
The plugin uses [[strongswanConf|strongswan.conf]] for database configuration:
29 5 Martin Willi
<pre>
30 1 Martin Willi
charon {
31 1 Martin Willi
  plugins {
32 1 Martin Willi
    sql {
33 1 Martin Willi
      database = mysql://user:pass@localhost/database
34 1 Martin Willi
    }
35 1 Martin Willi
  }
36 1 Martin Willi
}
37 5 Martin Willi
</pre>