summaryrefslogtreecommitdiffstats
path: root/base/common/src/com
diff options
context:
space:
mode:
authorEndi S. Dewata <edewata@redhat.com>2013-09-25 23:54:39 -0400
committerEndi S. Dewata <edewata@redhat.com>2013-10-01 19:26:38 -0400
commita4a492ef370053764b7dacbbf2f9f36069ea46b2 (patch)
tree6ba47cbd79602db1f323e232f31cb72f1a31dabc /base/common/src/com
parent7c0fb95b77f0f91c572e0242c09a88605497a455 (diff)
downloadpki-a4a492ef370053764b7dacbbf2f9f36069ea46b2.tar.gz
pki-a4a492ef370053764b7dacbbf2f9f36069ea46b2.tar.xz
pki-a4a492ef370053764b7dacbbf2f9f36069ea46b2.zip
Fixed CLI authentication issue.
Previously the CLI authentication could fail because it's using a fixed default subsystem which may not match the command it's trying to execute. The CLI has now been modified to use the appropriate default subsystem depending on the command to be executed.
Diffstat (limited to 'base/common/src/com')
-rw-r--r--base/common/src/com/netscape/certsrv/account/AccountClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/cert/CertClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/group/GroupClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/key/KeyClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/logging/ActivityClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/profile/ProfileClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/system/KRAConnectorClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/system/SecurityDomainClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/system/SystemConfigClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/system/TPSConnectorClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/tps/cert/TPSCertClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/tps/connection/ConnectionClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/tps/token/TokenClient.java4
-rw-r--r--base/common/src/com/netscape/certsrv/user/UserClient.java4
-rw-r--r--base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java12
18 files changed, 6 insertions, 74 deletions
diff --git a/base/common/src/com/netscape/certsrv/account/AccountClient.java b/base/common/src/com/netscape/certsrv/account/AccountClient.java
index 333f65679..dcf8975b5 100644
--- a/base/common/src/com/netscape/certsrv/account/AccountClient.java
+++ b/base/common/src/com/netscape/certsrv/account/AccountClient.java
@@ -30,10 +30,6 @@ public class AccountClient extends Client {
public AccountResource resource;
public boolean loggedIn;
- public AccountClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public AccountClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "account");
init();
diff --git a/base/common/src/com/netscape/certsrv/cert/CertClient.java b/base/common/src/com/netscape/certsrv/cert/CertClient.java
index 7ff6af397..b0ebc04bf 100644
--- a/base/common/src/com/netscape/certsrv/cert/CertClient.java
+++ b/base/common/src/com/netscape/certsrv/cert/CertClient.java
@@ -33,10 +33,6 @@ public class CertClient extends Client {
public CertResource certClient;
public CertRequestResource certRequestResource;
- public CertClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public CertClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "cert");
init();
diff --git a/base/common/src/com/netscape/certsrv/group/GroupClient.java b/base/common/src/com/netscape/certsrv/group/GroupClient.java
index 33be6e772..2f11e21b4 100644
--- a/base/common/src/com/netscape/certsrv/group/GroupClient.java
+++ b/base/common/src/com/netscape/certsrv/group/GroupClient.java
@@ -32,10 +32,6 @@ public class GroupClient extends Client {
public GroupResource groupClient;
public GroupMemberResource groupMemberClient;
- public GroupClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public GroupClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "group");
init();
diff --git a/base/common/src/com/netscape/certsrv/key/KeyClient.java b/base/common/src/com/netscape/certsrv/key/KeyClient.java
index be4e5ed58..385996eed 100644
--- a/base/common/src/com/netscape/certsrv/key/KeyClient.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyClient.java
@@ -31,10 +31,6 @@ public class KeyClient extends Client {
public KeyResource keyClient;
public KeyRequestResource keyRequestClient;
- public KeyClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public KeyClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "key");
init();
diff --git a/base/common/src/com/netscape/certsrv/logging/ActivityClient.java b/base/common/src/com/netscape/certsrv/logging/ActivityClient.java
index 251183ec5..48ecdd5c4 100644
--- a/base/common/src/com/netscape/certsrv/logging/ActivityClient.java
+++ b/base/common/src/com/netscape/certsrv/logging/ActivityClient.java
@@ -29,10 +29,6 @@ public class ActivityClient extends Client {
public ActivityResource resource;
- public ActivityClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public ActivityClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "activity");
init();
diff --git a/base/common/src/com/netscape/certsrv/profile/ProfileClient.java b/base/common/src/com/netscape/certsrv/profile/ProfileClient.java
index c4ecf6bec..64a53b209 100644
--- a/base/common/src/com/netscape/certsrv/profile/ProfileClient.java
+++ b/base/common/src/com/netscape/certsrv/profile/ProfileClient.java
@@ -29,10 +29,6 @@ public class ProfileClient extends Client {
public ProfileResource profileClient;
- public ProfileClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public ProfileClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "profile");
init();
diff --git a/base/common/src/com/netscape/certsrv/system/KRAConnectorClient.java b/base/common/src/com/netscape/certsrv/system/KRAConnectorClient.java
index 514390eae..4a29ca154 100644
--- a/base/common/src/com/netscape/certsrv/system/KRAConnectorClient.java
+++ b/base/common/src/com/netscape/certsrv/system/KRAConnectorClient.java
@@ -29,10 +29,6 @@ public class KRAConnectorClient extends Client {
public KRAConnectorResource kraConnectorClient;
- public KRAConnectorClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public KRAConnectorClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "kraconnector");
init();
diff --git a/base/common/src/com/netscape/certsrv/system/SecurityDomainClient.java b/base/common/src/com/netscape/certsrv/system/SecurityDomainClient.java
index 3eb21cfce..6c6a5d3d5 100644
--- a/base/common/src/com/netscape/certsrv/system/SecurityDomainClient.java
+++ b/base/common/src/com/netscape/certsrv/system/SecurityDomainClient.java
@@ -30,10 +30,6 @@ public class SecurityDomainClient extends Client {
private SecurityDomainResource securityDomainClient;
- public SecurityDomainClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public SecurityDomainClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "securitydomain");
init();
diff --git a/base/common/src/com/netscape/certsrv/system/SystemConfigClient.java b/base/common/src/com/netscape/certsrv/system/SystemConfigClient.java
index 07d728896..242f00531 100644
--- a/base/common/src/com/netscape/certsrv/system/SystemConfigClient.java
+++ b/base/common/src/com/netscape/certsrv/system/SystemConfigClient.java
@@ -31,10 +31,6 @@ public class SystemConfigClient extends Client {
private SystemConfigResource configClient;
- public SystemConfigClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public SystemConfigClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "systemconfig");
init();
diff --git a/base/common/src/com/netscape/certsrv/system/TPSConnectorClient.java b/base/common/src/com/netscape/certsrv/system/TPSConnectorClient.java
index d2009d6cf..b247db907 100644
--- a/base/common/src/com/netscape/certsrv/system/TPSConnectorClient.java
+++ b/base/common/src/com/netscape/certsrv/system/TPSConnectorClient.java
@@ -12,10 +12,6 @@ public class TPSConnectorClient extends Client {
private TPSConnectorResource tpsConnectorClient;
- public TPSConnectorClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public TPSConnectorClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "tpsconnector");
init();
diff --git a/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorClient.java b/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorClient.java
index 8f4d4fe2b..893d98e7c 100644
--- a/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorClient.java
+++ b/base/common/src/com/netscape/certsrv/tps/authenticator/AuthenticatorClient.java
@@ -31,10 +31,6 @@ public class AuthenticatorClient extends Client {
public AuthenticatorResource resource;
- public AuthenticatorClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public AuthenticatorClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "authenticator");
init();
diff --git a/base/common/src/com/netscape/certsrv/tps/cert/TPSCertClient.java b/base/common/src/com/netscape/certsrv/tps/cert/TPSCertClient.java
index 003ec7b9b..810c64758 100644
--- a/base/common/src/com/netscape/certsrv/tps/cert/TPSCertClient.java
+++ b/base/common/src/com/netscape/certsrv/tps/cert/TPSCertClient.java
@@ -29,10 +29,6 @@ public class TPSCertClient extends Client {
public TPSCertResource resource;
- public TPSCertClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public TPSCertClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "cert");
init();
diff --git a/base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java b/base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java
index 9c707e494..98699035a 100644
--- a/base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java
+++ b/base/common/src/com/netscape/certsrv/tps/config/ConfigClient.java
@@ -31,10 +31,6 @@ public class ConfigClient extends Client {
public ConfigResource resource;
- public ConfigClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public ConfigClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "config");
init();
diff --git a/base/common/src/com/netscape/certsrv/tps/connection/ConnectionClient.java b/base/common/src/com/netscape/certsrv/tps/connection/ConnectionClient.java
index 08f71b32a..6c67e6b2a 100644
--- a/base/common/src/com/netscape/certsrv/tps/connection/ConnectionClient.java
+++ b/base/common/src/com/netscape/certsrv/tps/connection/ConnectionClient.java
@@ -31,10 +31,6 @@ public class ConnectionClient extends Client {
public ConnectionResource resource;
- public ConnectionClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public ConnectionClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "connection");
init();
diff --git a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingClient.java b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingClient.java
index dd02825c8..58f4e2673 100644
--- a/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingClient.java
+++ b/base/common/src/com/netscape/certsrv/tps/profile/ProfileMappingClient.java
@@ -31,10 +31,6 @@ public class ProfileMappingClient extends Client {
public ProfileMappingResource resource;
- public ProfileMappingClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public ProfileMappingClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "profile-mapping");
init();
diff --git a/base/common/src/com/netscape/certsrv/tps/token/TokenClient.java b/base/common/src/com/netscape/certsrv/tps/token/TokenClient.java
index 48bddded6..602e8f966 100644
--- a/base/common/src/com/netscape/certsrv/tps/token/TokenClient.java
+++ b/base/common/src/com/netscape/certsrv/tps/token/TokenClient.java
@@ -31,10 +31,6 @@ public class TokenClient extends Client {
public TokenResource resource;
- public TokenClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public TokenClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "token");
init();
diff --git a/base/common/src/com/netscape/certsrv/user/UserClient.java b/base/common/src/com/netscape/certsrv/user/UserClient.java
index 0c51821fe..85b7f0592 100644
--- a/base/common/src/com/netscape/certsrv/user/UserClient.java
+++ b/base/common/src/com/netscape/certsrv/user/UserClient.java
@@ -33,10 +33,6 @@ public class UserClient extends Client {
public UserCertResource userCertClient;
public UserMembershipResource userMembershipClient;
- public UserClient(PKIClient client) throws URISyntaxException {
- this(client, client.getSubsystem());
- }
-
public UserClient(PKIClient client, String subsystem) throws URISyntaxException {
super(client, subsystem, "user");
init();
diff --git a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
index d86aa0770..3c409690a 100644
--- a/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
+++ b/base/common/src/com/netscape/cms/servlet/csadmin/ConfigurationUtils.java
@@ -333,7 +333,7 @@ public class ConfigurationUtils {
String csType = cs.getString("cs.type");
ClientConfig config = new ClientConfig();
- config.setServerURI("https://" + sdhost + ":" + sdport + "/ca");
+ config.setServerURI("https://" + sdhost + ":" + sdport);
config.setUsername(user);
config.setPassword(passwd);
@@ -350,8 +350,8 @@ public class ConfigurationUtils {
// utilizing an untrusted temporary CA cert.
connection.addIgnoredCertStatus(SSLCertificateApprovalCallback.ValidityStatus.CA_CERT_INVALID);
- AccountClient accountClient = new AccountClient(client);
- SecurityDomainClient sdClient = new SecurityDomainClient(client);
+ AccountClient accountClient = new AccountClient(client, "ca");
+ SecurityDomainClient sdClient = new SecurityDomainClient(client, "ca");
try {
accountClient.login();
@@ -3585,7 +3585,7 @@ public class ConfigurationUtils {
String dbPass = psStore.getString("internal");
ClientConfig config = new ClientConfig();
- config.setServerURI("https://" + tksHost + ":" + tksPort + "/tks");
+ config.setServerURI("https://" + tksHost + ":" + tksPort);
config.setCertDatabase(dbDir);
config.setCertNickname(dbNick);
config.setCertPassword(dbPass);
@@ -3598,8 +3598,8 @@ public class ConfigurationUtils {
connection.addIgnoredCertStatus(SSLCertificateApprovalCallback.ValidityStatus.UNTRUSTED_ISSUER);
connection.addIgnoredCertStatus(SSLCertificateApprovalCallback.ValidityStatus.CA_CERT_INVALID);
- AccountClient accountClient = new AccountClient(client);
- TPSConnectorClient tpsConnectorClient = new TPSConnectorClient(client);
+ AccountClient accountClient = new AccountClient(client, "tks");
+ TPSConnectorClient tpsConnectorClient = new TPSConnectorClient(client, "tks");
accountClient.login();
TPSConnectorData data = null;