summaryrefslogtreecommitdiffstats
path: root/base/tps/src/org/dogtagpki/server/tps/cms/KRARemoteRequestHandler.java
diff options
context:
space:
mode:
authorChristina Fu <cfu@redhat.com>2016-04-05 11:44:00 -0700
committerChristina Fu <cfu@redhat.com>2016-04-13 14:51:54 -0700
commite832349f8846ab398b17b98ebe9862bc700d1b7f (patch)
treee9d6da783634e9cc9ad81794d7178c8126710a13 /base/tps/src/org/dogtagpki/server/tps/cms/KRARemoteRequestHandler.java
parent8e291fba835f6640a262e01333aa58cf9bd5220f (diff)
downloadpki-e832349f8846ab398b17b98ebe9862bc700d1b7f.tar.gz
pki-e832349f8846ab398b17b98ebe9862bc700d1b7f.tar.xz
pki-e832349f8846ab398b17b98ebe9862bc700d1b7f.zip
Ticket #2271 TMS- clean up key archival request records in ldap
This patch does the following: * it adds in the kra request an extra field called "delayLDAPCommit" * when the request comes in to be processed, it sets this field to "false" * by default, if this field does not exist, the updateRequest() method will just write to ldap, just like before; however, if this field exists and it contains "true" then it will delay the write * once the request is processed and all unwanted fields are cleared from the request record, it will set "delayLDAPCommit" to "false", and call updateRequest(), which will then do the actual write to ldap * In addition, I also screened through both KRA and TPS code and removed debug messages that contain those fields.
Diffstat (limited to 'base/tps/src/org/dogtagpki/server/tps/cms/KRARemoteRequestHandler.java')
-rw-r--r--base/tps/src/org/dogtagpki/server/tps/cms/KRARemoteRequestHandler.java21
1 files changed, 9 insertions, 12 deletions
diff --git a/base/tps/src/org/dogtagpki/server/tps/cms/KRARemoteRequestHandler.java b/base/tps/src/org/dogtagpki/server/tps/cms/KRARemoteRequestHandler.java
index 1f7347ddd..0f3de3351 100644
--- a/base/tps/src/org/dogtagpki/server/tps/cms/KRARemoteRequestHandler.java
+++ b/base/tps/src/org/dogtagpki/server/tps/cms/KRARemoteRequestHandler.java
@@ -107,7 +107,7 @@ public class KRARemoteRequestHandler extends RemoteRequestHandler
"&" + IRemoteRequest.KRA_Trans_DesKey + "=" +
sDesKey;
- CMS.debug("KRARemoteRequestHandler: outgoing request for ECC: " + request);
+ //CMS.debug("KRARemoteRequestHandler: outgoing request for ECC: " + request);
resp =
conn.send("GenerateKeyPair",
@@ -127,7 +127,7 @@ public class KRARemoteRequestHandler extends RemoteRequestHandler
"&" + IRemoteRequest.KRA_Trans_DesKey + "=" +
sDesKey;
- CMS.debug("KRARemoteRequestHandler: outgoing request for RSA: " + request);
+ //CMS.debug("KRARemoteRequestHandler: outgoing request for RSA: " + request);
resp =
conn.send("GenerateKeyPair",
@@ -144,8 +144,8 @@ public class KRARemoteRequestHandler extends RemoteRequestHandler
String content = resp.getContent();
- CMS.debug("KRARemoteRequestHandler: serverSideKeyGen(): got content = " + content);
if (content != null && !content.equals("")) {
+ CMS.debug("KRARemoteRequestHandler: serverSideKeyGen(): got content");
Hashtable<String, Object> response =
parseResponse(content);
@@ -192,8 +192,7 @@ public class KRARemoteRequestHandler extends RemoteRequestHandler
CMS.debug("KRARemoteRequestHandler: serverSideKeyGen(): response missing name-value pair for: " +
IRemoteRequest.KRA_RESPONSE_Wrapped_PrivKey);
} else {
- CMS.debug("KRARemoteRequestHandler:serverSideKeyGen(): got IRemoteRequest.KRA_RESPONSE_Wrapped_PrivKey= "
- + value);
+ CMS.debug("KRARemoteRequestHandler:serverSideKeyGen(): got IRemoteRequest.KRA_RESPONSE_Wrapped_PrivKey");
response.put(IRemoteRequest.KRA_RESPONSE_Wrapped_PrivKey, value);
}
@@ -202,8 +201,7 @@ public class KRARemoteRequestHandler extends RemoteRequestHandler
CMS.debug("KRARemoteRequestHandler: serverSideKeyGen(): response missing name-value pair for: " +
IRemoteRequest.KRA_RESPONSE_IV_Param);
} else {
- CMS.debug("KRARemoteRequestHandler:serverSideKeyGen(): got IRemoteRequest.KRA_RESPONSE_IV_Param= "
- + value);
+ CMS.debug("KRARemoteRequestHandler:serverSideKeyGen(): got IRemoteRequest.KRA_RESPONSE_IV_Param");
response.put(IRemoteRequest.KRA_RESPONSE_IV_Param, value);
}
@@ -283,7 +281,7 @@ public class KRARemoteRequestHandler extends RemoteRequestHandler
"&" + IRemoteRequest.KRA_Trans_DesKey + "=" +
sDesKey;
}
- CMS.debug("KRARemoteRequestHandler: recoverKey(): sendMsg =" + sendMsg);
+ //CMS.debug("KRARemoteRequestHandler: recoverKey(): sendMsg =" + sendMsg);
HttpResponse resp =
conn.send("TokenKeyRecovery",
sendMsg);
@@ -294,8 +292,8 @@ public class KRARemoteRequestHandler extends RemoteRequestHandler
String content = resp.getContent();
- CMS.debug("KRARemoteRequestHandler: recoverKey(): got content = " + content);
if (content != null && !content.equals("")) {
+ CMS.debug("KRARemoteRequestHandler: recoverKey(): got content");
Hashtable<String, Object> response =
parseResponse(content);
@@ -337,8 +335,7 @@ public class KRARemoteRequestHandler extends RemoteRequestHandler
CMS.debug("KRARemoteRequestHandler: recoverKey(): response missing name-value pair for: " +
IRemoteRequest.KRA_RESPONSE_Wrapped_PrivKey);
} else {
- CMS.debug("KRARemoteRequestHandler:recoverKey(): got IRemoteRequest.KRA_RESPONSE_Wrapped_PrivKey= "
- + value);
+ CMS.debug("KRARemoteRequestHandler:recoverKey(): got IRemoteRequest.KRA_RESPONSE_Wrapped_PrivKey");
response.put(IRemoteRequest.KRA_RESPONSE_Wrapped_PrivKey, value);
}
@@ -347,7 +344,7 @@ public class KRARemoteRequestHandler extends RemoteRequestHandler
CMS.debug("KRARemoteRequestHandler: recoverKey(): response missing name-value pair for: " +
IRemoteRequest.KRA_RESPONSE_IV_Param);
} else {
- CMS.debug("KRARemoteRequestHandler:recoverKey(): got IRemoteRequest.KRA_RESPONSE_IV_Param= " + value);
+ CMS.debug("KRARemoteRequestHandler:recoverKey(): got IRemoteRequest.KRA_RESPONSE_IV_Param");
response.put(IRemoteRequest.KRA_RESPONSE_IV_Param, value);
}