summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-09-19 12:37:41 -0400
committerAde Lee <alee@redhat.com>2012-09-19 22:20:34 -0400
commite1666df57fb49b4c2c20563559cd2a7450a6f9f4 (patch)
tree8b372320ca55260d777c815dae104ef05ad7f240 /base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
parent9173b431751486018957428e67392a4a94a86baf (diff)
downloadpki-e1666df57fb49b4c2c20563559cd2a7450a6f9f4.tar.gz
pki-e1666df57fb49b4c2c20563559cd2a7450a6f9f4.tar.xz
pki-e1666df57fb49b4c2c20563559cd2a7450a6f9f4.zip
Changes to use standard dbuser
We create a user that can be used to connect to the database using the subsystem cert for client auth. We identified this user, using the seeAlso attribute and provided certmap rules to this effect. For this user, we used to reuse the uid = user CA-hostname-port, which is already created for inter-system communication. But this is problematic if more than one dbuser exists, as the directory server may bind as the incorrect user. In any replication topology, there must be only one dbuser using the subsystem cert. To simplify things, we create a new user specifically for this purpose (pkidbuser), and we remove the seeAlso attribute from the older dbusers. A script is needed to convert existing dogtag 9 istances to use the new user, and set the relevant acls. This will be done in a separate commit.
Diffstat (limited to 'base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java')
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java12
1 files changed, 1 insertions, 11 deletions
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java b/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
index e81afdd2f..197c16ad3 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/DonePanel.java
@@ -31,8 +31,6 @@ import com.netscape.certsrv.apps.CMS;
import com.netscape.certsrv.base.IConfigStore;
import com.netscape.certsrv.ocsp.IOCSPAuthority;
import com.netscape.certsrv.property.PropertySet;
-import com.netscape.certsrv.usrgrp.IUGSubsystem;
-import com.netscape.certsrv.usrgrp.IUser;
import com.netscape.cms.servlet.wizard.WizardServlet;
import com.netscape.cmsutil.util.Utils;
@@ -225,16 +223,8 @@ public class DonePanel extends WizardPanelBase {
e.printStackTrace();
}
- String dbuser = null;
try {
- dbuser = cs.getString("cs.type") + "-" + cs.getString("machineName") + "-"
- + cs.getString("service.securePort");
- if (!sdtype.equals("new")) {
- ConfigurationUtils.setupDBUser(dbuser);
- }
- IUGSubsystem system = (IUGSubsystem) (CMS.getSubsystem(IUGSubsystem.ID));
- IUser user = system.getUser(dbuser);
- system.addCertSubjectDN(user);
+ ConfigurationUtils.setupDBUser();
} catch (Exception e) {
e.printStackTrace();
CMS.debug("DonePanel - update(): Unable to create or update dbuser" + e);