Skip to main content
Version: 2.2

Using a MariaDB Database as nevisFIDO Session Storage

nevisFIDO can be configured to store the session information in a MariaDB database.

This section describes the basic steps you need to perform to use MariaDB as a nevisFIDO session storage. It is assumed that MariaDB is already installed.


With the deployment of nevisIDM, a MariaDB server is installed as well. Reusing the same MariaDB installation can be convenient in many situations. It is strongly recommended, however, that you use separate databases for the nevisFIDO session storage and for nevisIDM.

  1. You only must create a database for nevisFIDO itself - nevisFIDO will then automatically generate the required schema and tables in the specified database. The following SQL statements allow you to create a database named "nevisfido" and a user named "me" with the password "secret":

    SQL Statements to Create nevisFIDO Session Repository Database
    -- setting up database:

USE nevisfido;

-- user: GRANT USAGE ON nevisfido.TO 'me'@'localhost'; DROP USER 'me'@'localhost'; CREATE USER 'me'@'localhost' IDENTIFIED BY 'secret'; GRANT ALL PRIVILEGES ON nevisfido. TO 'me'@'localhost'; FLUSH PRIVILEGES;

2. Store the above SQL statements in a file named `nevisfido-session-repository.sql`, and use the following command line
to create the database (the command line assumes that the MySQL user is "root"):

```bash title="Create database"
mysql -u root --password="" < nevisfido-session-repository.sql
  1. The following code snippet shows how to configure the nevisFIDO session store in the nevisfido.yml configuration file, to use the database above:

    nevisFIDO Session Repository Configuration
    type: sql
    jdbc-url: 'jdbc:mariadb://localhost:3306/nevisfido'
    user: me
    password: secret