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

From Dogtag
Jump to: navigation, search
m (Initializing Database)
m (Removing Database)
Line 40: Line 40:
  
 
= Removing Database =
 
= Removing Database =
 +
 +
To remove a local database:
 +
 +
<pre>
 +
$ cqlsh -u cassandra -p cassandra -k acme -f /usr/share/pki/acme/database/cassandra/drop.sql
 +
</pre>
 +
 +
To remove a remote database:
  
 
<pre>
 
<pre>

Revision as of 03:34, 29 July 2020

Installing JDBC Driver

$ dnf install cassandra-java-driver
$ cd /usr/share/pki/server/common/lib
$ ln -s /usr/share/java/cassandra-java-driver/cassandra-driver-core.jar
$ wget https://github.com/adejanovski/cassandra-jdbc-wrapper/releases/download/3.1.0/cassandra-jdbc-wrapper-3.1.0.jar

Initializing Database

To initialize a local database:

$ cqlsh -u cassandra -p cassandra -k acme -f /usr/share/pki/acme/database/cassandra/create.sql

To initialize a remote database:

$ cqlsh --cqlshrc=cqlshrc -u pki -p Secret.123 -k acme -f /usr/share/pki/acme/database/cassandra/create.sql

Configuring ACME Responder

To configure PKI ACME responder with a Cassandra database:

$ cp /usr/share/pki/acme/database/cassandra/database.conf /etc/pki/pki-tomcat/acme/database.conf

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

class=org.dogtagpki.acme.database.CassandraDatabase
url=jdbc:cassandra://localhost.localdomain:9042/acme
user=cassandra
password=cassandra

Removing Database

To remove a local database:

$ cqlsh -u cassandra -p cassandra -k acme -f /usr/share/pki/acme/database/cassandra/drop.sql

To remove a remote database:

$ cqlsh --cqlshrc=cqlshrc -u pki -p Secret.123 -k acme -f /usr/share/pki/acme/database/cassandra/drop.sql

See Also