Project

General

Profile

SQL configuration and credential plugin » History » Version 5

Martin Willi, 18.04.2008 14:44

1 1 Martin Willi
2 5 Martin Willi
h1. SQL configuration and credential plugin
3 1 Martin Willi
4 1 Martin Willi
5 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.
6 5 Martin Willi
7 5 Martin Willi
8 5 Martin Willi
h2. Status
9 5 Martin Willi
10 5 Martin Willi
The SQL plugin is still experimental and in [browser:trunk/src/charon/plugins/sql developement]. It currently works on top of [[MySQL]] or SQLite.
11 5 Martin Willi
There is no frontend yet to configure the database, but we'll extend [[Manager|the manager]] to allow such tasks.
12 5 Martin Willi
13 5 Martin Willi
14 5 Martin Willi
h2. Database setup
15 5 Martin Willi
16 1 Martin Willi
There are three SQL scripts to help you in the database setup:
17 5 Martin Willi
** [browser:trunk/src/charon/plugins/sql/mysql.sql [[MySQL]] tables]
18 5 Martin Willi
** [browser:trunk/src/charon/plugins/sql/sqlite.sql SQLite tables]
19 5 Martin Willi
** [browser:trunk/src/charon/plugins/sql/test.sql Test data]
20 1 Martin Willi
21 5 Martin Willi
22 5 Martin Willi
h2. Configuration
23 5 Martin Willi
24 1 Martin Willi
Make sure to build strongSwan with the appropriate modules:
25 5 Martin Willi
<pre>
26 4 Martin Willi
 ./configure --enable-sql --enable-mysql --enable-sqlite [...]
27 5 Martin Willi
</pre>
28 1 Martin Willi
29 5 Martin Willi
The plugin uses [[strongswanConf|strongswanconf]] for database configuration:
30 5 Martin Willi
<pre>
31 1 Martin Willi
charon {
32 1 Martin Willi
  plugins {
33 1 Martin Willi
    sql {
34 1 Martin Willi
      database = mysql://user:pass@localhost/database
35 1 Martin Willi
    }
36 1 Martin Willi
  }
37 1 Martin Willi
}
38 5 Martin Willi
</pre>