Project

General

Profile

SQL configuration and credential plugin » History » Version 3

Martin Willi, 03.04.2008 08:58

1 1 Martin Willi
= SQL configuration and credential plugin =
2 1 Martin Willi
3 1 Martin Willi
The SQL plugin for [wiki: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.
4 1 Martin Willi
5 1 Martin Willi
== Status ==
6 2 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.
7 3 Martin Willi
There is no frontend yet to configure the database, but we'll extend [wiki:Manager the manager] to allow such tasks.
8 1 Martin Willi
9 1 Martin Willi
== Database setup ==
10 1 Martin Willi
There are three SQL scripts to help you in the database setup:
11 1 Martin Willi
  * [browser:trunk/src/charon/plugins/sql/mysql.sql MySQL tables]
12 1 Martin Willi
  * [browser:trunk/src/charon/plugins/sql/sqlite.sql SQLite tables]
13 1 Martin Willi
  * [browser:trunk/src/charon/plugins/sql/test.sql Test data]
14 1 Martin Willi
15 1 Martin Willi
== Configuration ==
16 1 Martin Willi
Make sure to build strongSwan with the appropriate modules:
17 1 Martin Willi
{{{
18 1 Martin Willi
 ./configure --enable-sql --enable-mysql --enable-sqlite [...]
19 1 Martin Willi
}}}
20 1 Martin Willi
21 1 Martin Willi
The plugin uses ''strongswan.conf'' from ''/usr/local/libexec/ipsec'' for database configuration:
22 1 Martin Willi
{{{
23 1 Martin Willi
charon {
24 1 Martin Willi
  plugins {
25 1 Martin Willi
    sql {
26 1 Martin Willi
      database = mysql://user:pass@localhost/database
27 1 Martin Willi
    }
28 1 Martin Willi
  }
29 1 Martin Willi
}
30 1 Martin Willi
}}}