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

From Dogtag
Jump to: navigation, search
m (Initializing Database)
m (See Also)
 
Line 62: Line 62:
 
= See Also =
 
= See Also =
  
 +
* [[Configuring PKI ACME Responder]]
 
* [[Cassandra]]
 
* [[Cassandra]]
 
* [https://github.com/adejanovski/cassandra-jdbc-wrapper adejanovski/cassandra-jdbc-wrapper]
 
* [https://github.com/adejanovski/cassandra-jdbc-wrapper adejanovski/cassandra-jdbc-wrapper]

Latest revision as of 03:53, 31 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 create a local database:

$ cqlsh -u cassandra -p cassandra
cqlsh> CREATE KEYSPACE acme WITH REPLICATION = { 'class' : 'SimpleStrategy', 'replication_factor' : 1 };

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