summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-10-09 15:56:05 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-10-22 17:13:03 -0500
commit2d3d5611143ea3c75823a156ff4ebd331a305253 (patch)
tree23aca22a289ef06323bde5950628e356d072f74b
parentc1f9b3999a3dc5020b08fa4106c6c3a632183de9 (diff)
downloadpki-2d3d5611143ea3c75823a156ff4ebd331a305253.tar.gz
pki-2d3d5611143ea3c75823a156ff4ebd331a305253.tar.xz
pki-2d3d5611143ea3c75823a156ff4ebd331a305253.zip
Fixed KRA test.
The security configuration, JAXB mappings, and test script for KRA have been updated to run properly.
-rw-r--r--base/common/src/com/netscape/certsrv/key/KeyData.java4
-rw-r--r--base/common/src/com/netscape/certsrv/key/KeyDataInfo.java4
-rw-r--r--base/common/src/com/netscape/certsrv/key/KeyDataInfos.java2
-rw-r--r--base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java2
-rw-r--r--base/common/src/com/netscape/certsrv/key/KeyRequestInfos.java2
-rw-r--r--base/kra/functional/drmclient.py14
-rw-r--r--base/kra/shared/webapps/kra/WEB-INF/web.xml4
7 files changed, 16 insertions, 16 deletions
diff --git a/base/common/src/com/netscape/certsrv/key/KeyData.java b/base/common/src/com/netscape/certsrv/key/KeyData.java
index 63c0591c2..2ee7d1b92 100644
--- a/base/common/src/com/netscape/certsrv/key/KeyData.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyData.java
@@ -22,15 +22,15 @@
package com.netscape.certsrv.key;
import javax.xml.bind.annotation.XmlAccessType;
-import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
/**
* @author alee
*
*/
-@XmlRootElement(name="SecurityData")
+@XmlRootElement(name="KeyData")
@XmlAccessorType(XmlAccessType.FIELD)
public class KeyData {
@XmlElement
diff --git a/base/common/src/com/netscape/certsrv/key/KeyDataInfo.java b/base/common/src/com/netscape/certsrv/key/KeyDataInfo.java
index 6f4751dcc..3af348ef3 100644
--- a/base/common/src/com/netscape/certsrv/key/KeyDataInfo.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyDataInfo.java
@@ -22,9 +22,9 @@ package com.netscape.certsrv.key;
import javax.xml.bind.annotation.XmlAccessType;
+import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlAccessorType;
import com.netscape.certsrv.dbs.keydb.KeyId;
@@ -32,7 +32,7 @@ import com.netscape.certsrv.dbs.keydb.KeyId;
* @author alee
*
*/
-@XmlRootElement(name="SecurityDataInfo")
+@XmlRootElement(name="KeyDataInfo")
@XmlAccessorType(XmlAccessType.FIELD)
public class KeyDataInfo {
diff --git a/base/common/src/com/netscape/certsrv/key/KeyDataInfos.java b/base/common/src/com/netscape/certsrv/key/KeyDataInfos.java
index c04820299..4e82f27b5 100644
--- a/base/common/src/com/netscape/certsrv/key/KeyDataInfos.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyDataInfos.java
@@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlTransient;
import com.netscape.certsrv.base.Link;
-@XmlRootElement(name = "SecurityDataInfos")
+@XmlRootElement(name = "KeyDataInfos")
public class KeyDataInfos {
protected Collection<KeyDataInfo> keyInfos;
diff --git a/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java b/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java
index 2a0e062e5..f18e60e64 100644
--- a/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyRequestInfo.java
@@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlRootElement;
import com.netscape.certsrv.dbs.keydb.KeyId;
import com.netscape.certsrv.request.CMSRequestInfo;
-@XmlRootElement(name = "SecurityDataRequestInfo")
+@XmlRootElement(name = "KeyRequestInfo")
@XmlAccessorType(XmlAccessType.FIELD)
public class KeyRequestInfo extends CMSRequestInfo {
diff --git a/base/common/src/com/netscape/certsrv/key/KeyRequestInfos.java b/base/common/src/com/netscape/certsrv/key/KeyRequestInfos.java
index 67e6fdf5c..1fbd363d3 100644
--- a/base/common/src/com/netscape/certsrv/key/KeyRequestInfos.java
+++ b/base/common/src/com/netscape/certsrv/key/KeyRequestInfos.java
@@ -26,7 +26,7 @@ import javax.xml.bind.annotation.XmlTransient;
import com.netscape.certsrv.base.Link;
-@XmlRootElement(name = "SecurityDataRequestInfos")
+@XmlRootElement(name = "KeyRequestInfos")
public class KeyRequestInfos {
protected Collection<KeyRequestInfo> requests;
protected List<Link> links;
diff --git a/base/kra/functional/drmclient.py b/base/kra/functional/drmclient.py
index 3c7c12e30..ea9514dce 100644
--- a/base/kra/functional/drmclient.py
+++ b/base/kra/functional/drmclient.py
@@ -117,7 +117,7 @@ def parse_key_request_infos_xml(doc):
+----------------------+------------------------+-----------------------+---------------+
|prev |Link |prev_id |unicode [1] |
+----------------------+------------------------+-----------------------+---------------+
- |info for each request |SecurityDataRequestInfo |request_id [2] |dict |
+ |info for each request |KeyRequestInfo |request_id [2] |dict |
+----------------------+------------------------+-----------------------+---------------+
[1] prev_id and next_id are the starting ids for the previous and next pages
@@ -142,7 +142,7 @@ def parse_key_request_infos_xml(doc):
prev_link = prev_link.rsplit('/', 1)[1]
response['prev_id'] = prev_link
- key_request_infos = doc.xpath('//SecurityDataRequestInfo')
+ key_request_infos = doc.xpath('//KeyRequestInfo')
for key_request in key_request_infos:
node = parse_key_request_info_xml(key_request)
response[node['request_id']] = node
@@ -181,7 +181,7 @@ def parse_key_data_info_xml(doc):
key_url = etree.tostring(key_url[0], method='text',
encoding=unicode).strip()
response['key_url'] = key_url
-
+
return response
def parse_key_data_infos_xml(doc):
@@ -202,7 +202,7 @@ def parse_key_data_infos_xml(doc):
+----------------------+-----------------+-----------------------+---------------+
|prev |Link |prev_id |unicode [1] |
+----------------------+-----------------+-----------------------+---------------+
- |info for each key |SecurityDataInfo |key_id [2] |dict |
+ |info for each key |KeyDataInfo |key_id [2] |dict |
+----------------------+-----------------+-----------------------+---------------+
[1] prev_id and next_id are the starting ids for the previous and next pages
@@ -228,7 +228,7 @@ def parse_key_data_infos_xml(doc):
prev_link = prev_link.rsplit('/', 1)[1]
response['prev_id'] = prev_link
- key_data_infos = doc.xpath('//SecurityDataInfo')
+ key_data_infos = doc.xpath('//KeyDataInfo')
for key_data in key_data_infos:
node = parse_key_data_info_xml(key_data)
response[node['key_url'].rsplit('/',1)[1]] = node
@@ -551,7 +551,7 @@ class kra:
:return doc: xml doc with archival request
"""
self.debug('%s.create_archival_request()', self.fullname)
- root = etree.Element("SecurityDataArchivalRequest")
+ root = etree.Element("KeyArchivalRequest")
client_id_element = etree.SubElement(root, "clientId")
client_id_element.text = client_id
wrapped_private_data_element = etree.SubElement(root, "wrappedPrivateData")
@@ -570,7 +570,7 @@ class kra:
"""
self.debug('%s.create_recovery_request()', self.fullname)
- root = etree.Element("SecurityDataRecoveryRequest")
+ root = etree.Element("KeyRecoveryRequest")
if key_id != None:
key_id_element = etree.SubElement(root, "keyId")
key_id_element.text = key_id
diff --git a/base/kra/shared/webapps/kra/WEB-INF/web.xml b/base/kra/shared/webapps/kra/WEB-INF/web.xml
index 03def86c7..ce90b62e6 100644
--- a/base/kra/shared/webapps/kra/WEB-INF/web.xml
+++ b/base/kra/shared/webapps/kra/WEB-INF/web.xml
@@ -967,7 +967,6 @@
</user-data-constraint>
</security-constraint>
- <!--
<security-constraint>
<web-resource-collection>
<web-resource-name>Admin Services</web-resource-name>
@@ -981,6 +980,7 @@
</user-data-constraint>
</security-constraint>
+ <!--
<security-constraint>
<web-resource-collection>
<web-resource-name>Agent Services</web-resource-name>
@@ -993,6 +993,7 @@
<transport-guarantee>CONFIDENTIAL</transport-guarantee>
</user-data-constraint>
</security-constraint>
+ -->
<login-config>
<realm-name>Key Recovery Authority</realm-name>
@@ -1001,6 +1002,5 @@
<security-role>
<role-name>*</role-name>
</security-role>
- -->
</web-app>