-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Relocate SSNv2 range objects for new CA instances
pkispawn has been modified to create ou=ranges subtree for SSNv1 and optionally ou=ranges_v2 subtree for SSNv2 if it's enabled for new CA instances. The pki-server <subsystem>-db-init and <subsystem>-range-update commands have been updated to use the proper subtree to store the range objects. Hard-coded subtrees in the create.ldif have been removed. Similar changes are made to KRA as well, but since there are no tests for KRA with SSNv2 it's not officially supported yet.
- Loading branch information
Showing
13 changed files
with
287 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
base/ca/src/main/java/org/dogtagpki/server/ca/cli/CADBInitCLI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// Copyright Red Hat, Inc. | ||
// | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
// | ||
package org.dogtagpki.server.ca.cli; | ||
|
||
import org.dogtagpki.cli.CLI; | ||
import org.dogtagpki.server.cli.SubsystemDBInitCLI; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import com.netscape.cmscore.apps.DatabaseConfig; | ||
import com.netscape.cmscore.dbs.CertificateRepository; | ||
import com.netscape.cmscore.dbs.Repository.IDGenerator; | ||
|
||
/** | ||
* @author Endi S. Dewata | ||
*/ | ||
public class CADBInitCLI extends SubsystemDBInitCLI { | ||
|
||
public static Logger logger = LoggerFactory.getLogger(CADBInitCLI.class); | ||
|
||
public CADBInitCLI(CLI parent) { | ||
super("init", "Initialize CA database", parent); | ||
} | ||
|
||
@Override | ||
public void init(DatabaseConfig dbConfig) throws Exception { | ||
|
||
super.init(dbConfig); | ||
|
||
String value = dbConfig.getString( | ||
CertificateRepository.PROP_CERT_ID_GENERATOR, | ||
CertificateRepository.DEFAULT_CERT_ID_GENERATOR); | ||
serialIDGenerator = IDGenerator.fromString(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
base/kra/src/main/java/org/dogtagpki/server/kra/cli/KRADBCLI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// | ||
// Copyright Red Hat, Inc. | ||
// | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
// | ||
package org.dogtagpki.server.kra.cli; | ||
|
||
import org.dogtagpki.cli.CLI; | ||
import org.dogtagpki.server.cli.SubsystemDBAccessCLI; | ||
import org.dogtagpki.server.cli.SubsystemDBCreateCLI; | ||
import org.dogtagpki.server.cli.SubsystemDBEmptyCLI; | ||
import org.dogtagpki.server.cli.SubsystemDBIndexCLI; | ||
import org.dogtagpki.server.cli.SubsystemDBInfoCLI; | ||
import org.dogtagpki.server.cli.SubsystemDBRemoveCLI; | ||
import org.dogtagpki.server.cli.SubsystemDBReplicationCLI; | ||
import org.dogtagpki.server.cli.SubsystemDBUpgradeCLI; | ||
import org.dogtagpki.server.cli.SubsystemDBVLVCLI; | ||
|
||
/** | ||
* @author Endi S. Dewata | ||
*/ | ||
public class KRADBCLI extends CLI { | ||
|
||
public KRADBCLI(CLI parent) { | ||
super("db", "KRA database management commands", parent); | ||
|
||
addModule(new SubsystemDBInfoCLI(this)); | ||
addModule(new SubsystemDBCreateCLI(this)); | ||
addModule(new KRADBInitCLI(this)); | ||
addModule(new SubsystemDBEmptyCLI(this)); | ||
addModule(new SubsystemDBRemoveCLI(this)); | ||
addModule(new SubsystemDBUpgradeCLI(this)); | ||
|
||
addModule(new SubsystemDBAccessCLI(this)); | ||
addModule(new SubsystemDBIndexCLI(this)); | ||
addModule(new SubsystemDBReplicationCLI(this)); | ||
addModule(new SubsystemDBVLVCLI(this)); | ||
} | ||
} |
38 changes: 38 additions & 0 deletions
38
base/kra/src/main/java/org/dogtagpki/server/kra/cli/KRADBInitCLI.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
// | ||
// Copyright Red Hat, Inc. | ||
// | ||
// SPDX-License-Identifier: GPL-2.0-or-later | ||
// | ||
package org.dogtagpki.server.kra.cli; | ||
|
||
import org.dogtagpki.cli.CLI; | ||
import org.dogtagpki.server.cli.SubsystemDBInitCLI; | ||
import org.slf4j.Logger; | ||
import org.slf4j.LoggerFactory; | ||
|
||
import com.netscape.cmscore.apps.DatabaseConfig; | ||
import com.netscape.cmscore.dbs.KeyRepository; | ||
import com.netscape.cmscore.dbs.Repository.IDGenerator; | ||
|
||
/** | ||
* @author Endi S. Dewata | ||
*/ | ||
public class KRADBInitCLI extends SubsystemDBInitCLI { | ||
|
||
public static Logger logger = LoggerFactory.getLogger(KRADBInitCLI.class); | ||
|
||
public KRADBInitCLI(CLI parent) { | ||
super("init", "Initialize KRA database", parent); | ||
} | ||
|
||
@Override | ||
public void init(DatabaseConfig dbConfig) throws Exception { | ||
|
||
super.init(dbConfig); | ||
|
||
String value = dbConfig.getString( | ||
KeyRepository.PROP_KEY_ID_GENERATOR, | ||
KeyRepository.DEFAULT_KEY_ID_GENERATOR); | ||
serialIDGenerator = IDGenerator.fromString(value); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.