Difference between revisions of "PKI ACME Responder with PostgreSQL Database"

From Dogtag
Jump to: navigation, search
m
m (See Also)
Line 39: Line 39:
  
 
* [https://github.com/dogtagpki/pki/blob/master/base/acme/conf/database/postgresql/create.sql create.sql]
 
* [https://github.com/dogtagpki/pki/blob/master/base/acme/conf/database/postgresql/create.sql create.sql]
 +
* [https://github.com/dogtagpki/pki/blob/master/base/acme/conf/database/postgresql/database.json database.json]
 
* [[PKI ACME Responder]]
 
* [[PKI ACME Responder]]
 
* [[Configuring ACME Responder]]
 
* [[Configuring ACME Responder]]
 
* [[PostgreSQL]]
 
* [[PostgreSQL]]

Revision as of 18:54, 13 January 2020

Installing JDBC Driver

$ dnf install postgresql-jdbc
$ cd /usr/share/pki/server/common/lib
$ ln -s /usr/share/java/postgresql-jdbc/postgresql.jar

Initializing Database

To initialize a local database:

$ sudo -u postgres psql -f /usr/share/pki/acme/conf/database/postgresql/create.sql

To initialize a remote database:

$ psql <url> -f /usr/share/pki/acme/conf/database/postgresql/create.sql

Configuring ACME Responder

The configuration will be stored in /etc/pki/pki-tomcat/acme/database.json, for example:

{
    "class": "org.dogtagpki.acme.database.PostgreSQLDatabase",
    "parameters": {
        "url": "jdbc:postgresql://localhost:5432/acme",
        "user": "acme",
        "password": "Secret.123"
    }
}

See Also