You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axis-cvs@ws.apache.org by ru...@apache.org on 2006/10/19 14:15:25 UTC
svn commit: r465600 - in /webservices/axis2/trunk/java/modules:
integration/test/org/apache/rahas/ rahas/ rahas/src/org/apache/rahas/
rahas/src/org/apache/rahas/types/ security/src/org/apache/rampart/builder/
Author: ruchithf
Date: Thu Oct 19 05:15:23 2006
New Revision: 465600
URL: http://svn.apache.org/viewvc?view=rev&rev=465600
Log:
- Got rid of the adb dependancy of Rahas
- Fixed a few typos
Removed:
webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/types/
Modified:
webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKV1205Test.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForBearerTest.java
webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java
webservices/axis2/trunk/java/modules/rahas/project.xml
webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/Token.java
webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/builder/SymmetricBindingBuilder.java
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKTest.java?view=diff&rev=465600&r1=465599&r2=465600
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKTest.java Thu Oct 19 05:15:23 2006
@@ -19,15 +19,10 @@
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axis2.databinding.types.URI;
import org.apache.axis2.security.sc.PWCallback;
-import org.apache.axis2.util.StreamWrapper;
import org.apache.neethi.Policy;
-import org.apache.rahas.types.RequestSecurityTokenType;
import org.apache.rampart.handler.config.InflowConfiguration;
import org.apache.rampart.handler.config.OutflowConfiguration;
-import org.apache.rampart.util.Axis2Util;
import org.apache.ws.secpolicy.Constants;
import org.opensaml.XML;
@@ -66,35 +61,30 @@
}
public OMElement getRequest() {
-
- RequestSecurityTokenType rst = new RequestSecurityTokenType();
try {
- rst.setRequestType(new URI(RahasConstants.WST_NS_05_02 + RahasConstants.REQ_TYPE_ISSUE));
- rst.setTokenType(new URI(RahasConstants.TOK_TYPE_SAML_10));
- rst.setContext(new URI("http://get.optional.attrs.working"));
+ OMElement rstElem =
+ TrustUtil.createRequestSecurityTokenElement(RahasConstants.VERSION_05_02);
- Axis2Util.useDOOM(false);
- StAXOMBuilder builder = new StAXOMBuilder(new StreamWrapper(rst
- .getPullParser(new QName(RahasConstants.WST_NS_05_02,
- RahasConstants.LocalNames.REQUEST_SECURITY_TOKEN))));
-
- OMElement rstElem = builder.getDocumentElement();
-
- rstElem.build();
-
- //KeySize
+ TrustUtil.createRequestTypeElement(RahasConstants.VERSION_05_02,
+ rstElem,
+ RahasConstants.REQ_TYPE_ISSUE);
+ OMElement tokenTypeElem =
+ TrustUtil.createTokenTypeElement(RahasConstants.VERSION_05_02,
+ rstElem);
+ tokenTypeElem.setText(RahasConstants.TOK_TYPE_SAML_10);
+
+ TrustUtil.createAppliesToElement(rstElem,
+// "http://207.200.37.116/Ping/Scenario4", this.getWSANamespace());
+"http://localhost:5555/axis2/services/SecureService", this.getWSANamespace());
+ TrustUtil.createKeyTypeElement(RahasConstants.VERSION_05_02,
+ rstElem, RahasConstants.KEY_TYPE_PUBLIC_KEY);
TrustUtil.createKeySizeElement(RahasConstants.VERSION_05_02, rstElem, 256);
- //KeyType
- TrustUtil.createKeyTypeElement(RahasConstants.VERSION_05_02, rstElem, RahasConstants.KEY_TYPE_PUBLIC_KEY);
-
- TrustUtil.createAppliesToElement(rstElem, "http://localhost:5555/axis2/services/SecureService", this.getWSANamespace());
-
- rstElem = (OMElement)rstElem.detach();
+
return rstElem;
-
+
} catch (Exception e) {
- throw new RuntimeException(e);
+ throw new RuntimeException(e);
}
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKV1205Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKV1205Test.java?view=diff&rev=465600&r1=465599&r2=465600
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKV1205Test.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenCertForHoKV1205Test.java Thu Oct 19 05:15:23 2006
@@ -40,8 +40,7 @@
try {
OMElement rstElem =
TrustUtil.createRequestSecurityTokenElement(RahasConstants.VERSION_05_12);
- OMElement reqTypeElem =
- TrustUtil.createRequestTypeElement(RahasConstants.VERSION_05_12,
+ TrustUtil.createRequestTypeElement(RahasConstants.VERSION_05_12,
rstElem,
RahasConstants.REQ_TYPE_ISSUE);
OMElement tokenTypeElem =
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenTest.java?view=diff&rev=465600&r1=465599&r2=465600
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenTest.java Thu Oct 19 05:15:23 2006
@@ -19,15 +19,10 @@
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axis2.databinding.types.URI;
import org.apache.axis2.security.sc.PWCallback;
-import org.apache.axis2.util.StreamWrapper;
import org.apache.neethi.Policy;
-import org.apache.rahas.types.RequestSecurityTokenType;
import org.apache.rampart.handler.config.InflowConfiguration;
import org.apache.rampart.handler.config.OutflowConfiguration;
-import org.apache.rampart.util.Axis2Util;
import org.apache.ws.secpolicy.Constants;
import org.opensaml.XML;
@@ -69,35 +64,21 @@
}
public OMElement getRequest() {
-
- RequestSecurityTokenType rst = new RequestSecurityTokenType();
try {
- rst.setRequestType(new URI(RahasConstants.WST_NS_05_02 + RahasConstants.REQ_TYPE_ISSUE));
- rst.setTokenType(new URI(RahasConstants.TOK_TYPE_SAML_10));
- rst.setContext(new URI("http://get.optional.attrs.working"));
-
- Axis2Util.useDOOM(false);
- StAXOMBuilder builder = new StAXOMBuilder(new StreamWrapper(rst
- .getPullParser(new QName(RahasConstants.WST_NS_05_02,
- RahasConstants.LocalNames.REQUEST_SECURITY_TOKEN))));
-
- OMElement rstElem = builder.getDocumentElement();
-
- rstElem.build();
-
- //KeySize
- TrustUtil.createKeySizeElement(RahasConstants.VERSION_05_02, rstElem, 256);
-
- //KeyType
- TrustUtil.createKeyTypeElement(RahasConstants.VERSION_05_02, rstElem, RahasConstants.KEY_TYPE_SYMM_KEY);
+ OMElement rstElem = TrustUtil.createRequestSecurityTokenElement(RahasConstants.VERSION_05_02);
+ TrustUtil.createRequestTypeElement(RahasConstants.VERSION_05_02, rstElem, RahasConstants.REQ_TYPE_ISSUE);
+ OMElement tokenTypeElem = TrustUtil.createTokenTypeElement(RahasConstants.VERSION_05_02, rstElem);
+ tokenTypeElem.setText(RahasConstants.TOK_TYPE_SAML_10);
TrustUtil.createAppliesToElement(rstElem, "http://localhost:5555/axis2/services/SecureService", this.getWSANamespace());
+ TrustUtil.createKeyTypeElement(RahasConstants.VERSION_05_02,
+ rstElem, RahasConstants.KEY_TYPE_SYMM_KEY);
+ TrustUtil.createKeySizeElement(RahasConstants.VERSION_05_02, rstElem, 256);
- rstElem = (OMElement)rstElem.detach();
return rstElem;
} catch (Exception e) {
- throw new RuntimeException(e);
+ throw new RuntimeException(e);
}
}
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForBearerTest.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForBearerTest.java?view=diff&rev=465600&r1=465599&r2=465600
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForBearerTest.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForBearerTest.java Thu Oct 19 05:15:23 2006
@@ -40,7 +40,7 @@
public OMElement getRequest() {
try {
OMElement rstElem = TrustUtil.createRequestSecurityTokenElement(RahasConstants.VERSION_05_02);
- OMElement reqTypeElem = TrustUtil.createRequestTypeElement(RahasConstants.VERSION_05_02, rstElem, RahasConstants.REQ_TYPE_ISSUE);
+ TrustUtil.createRequestTypeElement(RahasConstants.VERSION_05_02, rstElem, RahasConstants.REQ_TYPE_ISSUE);
OMElement tokenTypeElem = TrustUtil.createTokenTypeElement(RahasConstants.VERSION_05_02, rstElem);
tokenTypeElem.setText(RahasConstants.TOK_TYPE_SAML_10);
Modified: webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java?view=diff&rev=465600&r1=465599&r2=465600
==============================================================================
--- webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java (original)
+++ webservices/axis2/trunk/java/modules/integration/test/org/apache/rahas/RahasSAMLTokenUTForHoKV1205Test.java Thu Oct 19 05:15:23 2006
@@ -44,7 +44,7 @@
public OMElement getRequest() {
try {
OMElement rstElem = TrustUtil.createRequestSecurityTokenElement(RahasConstants.VERSION_05_12);
- OMElement reqTypeElem = TrustUtil.createRequestTypeElement(RahasConstants.VERSION_05_12, rstElem, RahasConstants.REQ_TYPE_ISSUE);
+ TrustUtil.createRequestTypeElement(RahasConstants.VERSION_05_12, rstElem, RahasConstants.REQ_TYPE_ISSUE);
OMElement tokenTypeElem = TrustUtil.createTokenTypeElement(RahasConstants.VERSION_05_12, rstElem);
tokenTypeElem.setText(RahasConstants.TOK_TYPE_SAML_10);
Modified: webservices/axis2/trunk/java/modules/rahas/project.xml
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rahas/project.xml?view=diff&rev=465600&r1=465599&r2=465600
==============================================================================
--- webservices/axis2/trunk/java/modules/rahas/project.xml (original)
+++ webservices/axis2/trunk/java/modules/rahas/project.xml Thu Oct 19 05:15:23 2006
@@ -53,11 +53,6 @@
<version>${pom.currentVersion}</version>
</dependency>
<dependency>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-adb</artifactId>
- <version>${pom.currentVersion}</version>
- </dependency>
- <dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>${commons.logging.version}</version>
Modified: webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/Token.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/Token.java?view=diff&rev=465600&r1=465599&r2=465600
==============================================================================
--- webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/Token.java (original)
+++ webservices/axis2/trunk/java/modules/rahas/src/org/apache/rahas/Token.java Thu Oct 19 05:15:23 2006
@@ -75,9 +75,9 @@
/**
* The RequestedAttachedReference element
* NOTE : The oasis-200401-wss-soap-message-security-1.0 spec allows
- * an extensibility mechanism for wsse:SecurityTokenRefence and
- * wsse:Refernce. Hence we cannot limit to the
- * wsse:SecurityTokenRefence\wsse:Refernce case and only hold the URI and
+ * an extensibility mechanism for wsse:SecurityTokenReference and
+ * wsse:Reference. Hence we cannot limit to the
+ * wsse:SecurityTokenReference\wsse:Reference case and only hold the URI and
* the ValueType values.
*/
private OMElement attachedReference;
@@ -86,8 +86,8 @@
* The RequestedUnattachedReference element
* NOTE : The oasis-200401-wss-soap-message-security-1.0 spec allows
* an extensibility mechanism for wsse:SecurityTokenRefence and
- * wsse:Refernce. Hence we cannot limit to the
- * wsse:SecurityTokenRefence\wsse:Refernce case and only hold the URI and
+ * wsse:Reference. Hence we cannot limit to the
+ * wsse:SecurityTokenReference\wsse:Reference case and only hold the URI and
* the ValueType values.
*/
private OMElement unattachedReference;
Modified: webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/builder/SymmetricBindingBuilder.java
URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/builder/SymmetricBindingBuilder.java?view=diff&rev=465600&r1=465599&r2=465600
==============================================================================
--- webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/builder/SymmetricBindingBuilder.java (original)
+++ webservices/axis2/trunk/java/modules/security/src/org/apache/rampart/builder/SymmetricBindingBuilder.java Thu Oct 19 05:15:23 2006
@@ -105,7 +105,7 @@
log.debug("SCT Id : " + tokenId);
} else if (encryptionToken instanceof X509Token) {
tokenId = setupEncryptedKey(rmd, encryptionToken);
- }
+ } //TODO SAMLToken
if(tokenId == null || tokenId.length() == 0) {
throw new RampartException("noSecurityToken");
---------------------------------------------------------------------
To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-cvs-help@ws.apache.org