You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by ve...@apache.org on 2017/01/30 17:29:59 UTC
svn commit: r1780951 [8/10] - in
/axis/axis2/java/rampart/branches/RAMPART-289: ./ legal/
modules/distribution/ modules/documentation/
modules/documentation/src/site/resources/download/
modules/documentation/src/site/xdoc/ modules/documentation/src/sit...
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/rampart/TransportBindingBuilderTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/rampart/TransportBindingBuilderTest.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/rampart/TransportBindingBuilderTest.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/rampart/TransportBindingBuilderTest.java Mon Jan 30 17:29:58 2017
@@ -27,101 +27,79 @@ import java.util.List;
public class TransportBindingBuilderTest extends MessageBuilderTestBase {
- public void testTransportBinding() {
- try {
- MessageContext ctx = getMsgCtx();
-
- String policyXml = "test-resources/policy/rampart-transport-binding.xml";
- Policy policy = this.loadPolicy(policyXml);
-
- ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
-
- MessageBuilder builder = new MessageBuilder();
- builder.build(ctx);
-
- List list = new ArrayList();
- list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
- list.add(new QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN));
- list.add(new QName(WSConstants.WSSE_NS, WSConstants.BINARY_TOKEN_LN));
- list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
- this.verifySecHeader(list.iterator(), ctx.getEnvelope());
-
- } catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
+ public void testTransportBinding() throws Exception {
+ MessageContext ctx = getMsgCtx();
+
+ String policyXml = "test-resources/policy/rampart-transport-binding.xml";
+ Policy policy = this.loadPolicy(policyXml);
+
+ ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
+
+ MessageBuilder builder = new MessageBuilder();
+ builder.build(ctx);
+
+ List list = new ArrayList();
+ list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
+ list.add(new QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN));
+ list.add(new QName(WSConstants.WSSE_NS, WSConstants.BINARY_TOKEN_LN));
+ list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
+ this.verifySecHeader(list.iterator(), ctx.getEnvelope());
}
- public void testTransportBindingNoBST() {
- try {
- MessageContext ctx = getMsgCtx();
-
- String policyXml = "test-resources/policy/rampart-transport-binding-no-bst.xml";
- Policy policy = this.loadPolicy(policyXml);
-
- ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
-
- MessageBuilder builder = new MessageBuilder();
- builder.build(ctx);
-
- List list = new ArrayList();
- list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
- list.add(new QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN));
- list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
- this.verifySecHeader(list.iterator(), ctx.getEnvelope());
-
- } catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
+ public void testTransportBindingNoBST() throws Exception {
+ MessageContext ctx = getMsgCtx();
+
+ String policyXml = "test-resources/policy/rampart-transport-binding-no-bst.xml";
+ Policy policy = this.loadPolicy(policyXml);
+
+ ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
+
+ MessageBuilder builder = new MessageBuilder();
+ builder.build(ctx);
+
+ List list = new ArrayList();
+ list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
+ list.add(new QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN));
+ list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
+ this.verifySecHeader(list.iterator(), ctx.getEnvelope());
}
- public void testTransportBindingWithDK() {
- try {
- MessageContext ctx = getMsgCtx();
-
- String policyXml = "test-resources/policy/rampart-transport-binding-dk.xml";
- Policy policy = this.loadPolicy(policyXml);
-
- ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
-
- MessageBuilder builder = new MessageBuilder();
- builder.build(ctx);
-
- List list = new ArrayList();
- list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
- list.add(new QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN));
- list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
- list.add(new QName(ConversationConstants.WSC_NS_05_02,
- ConversationConstants.DERIVED_KEY_TOKEN_LN));
- list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
- this.verifySecHeader(list.iterator(), ctx.getEnvelope());
- } catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
+ public void testTransportBindingWithDK() throws Exception {
+ MessageContext ctx = getMsgCtx();
+
+ String policyXml = "test-resources/policy/rampart-transport-binding-dk.xml";
+ Policy policy = this.loadPolicy(policyXml);
+
+ ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
+
+ MessageBuilder builder = new MessageBuilder();
+ builder.build(ctx);
+
+ List list = new ArrayList();
+ list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
+ list.add(new QName(WSConstants.WSSE_NS, WSConstants.USERNAME_TOKEN_LN));
+ list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
+ list.add(new QName(ConversationConstants.WSC_NS_05_02,
+ ConversationConstants.DERIVED_KEY_TOKEN_LN));
+ list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
+ this.verifySecHeader(list.iterator(), ctx.getEnvelope());
}
- public void testTransportBindingWithDKServerSide() {
- try {
- MessageContext ctx = getMsgCtx();
- ctx.setServerSide(true);
-
- String policyXml = "test-resources/policy/rampart-transport-binding-dk.xml";
- Policy policy = this.loadPolicy(policyXml);
-
- ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
-
- MessageBuilder builder = new MessageBuilder();
- builder.build(ctx);
-
- List list = new ArrayList();
- list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
- this.verifySecHeader(list.iterator(), ctx.getEnvelope());
- } catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
+ public void testTransportBindingWithDKServerSide() throws Exception {
+ MessageContext ctx = getMsgCtx();
+ ctx.setServerSide(true);
+
+ String policyXml = "test-resources/policy/rampart-transport-binding-dk.xml";
+ Policy policy = this.loadPolicy(policyXml);
+
+ ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
+
+ MessageBuilder builder = new MessageBuilder();
+ builder.build(ctx);
+
+ List list = new ArrayList();
+ list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
+ this.verifySecHeader(list.iterator(), ctx.getEnvelope());
}
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/rampart/policy/model/RampartPolicyTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/rampart/policy/model/RampartPolicyTest.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/rampart/policy/model/RampartPolicyTest.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/rampart/policy/model/RampartPolicyTest.java Mon Jan 30 17:29:58 2017
@@ -17,13 +17,15 @@
package org.apache.rampart.policy.model;
import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.OMXMLBuilderFactory;
+import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.neethi.Assertion;
import org.apache.neethi.Policy;
import org.apache.neethi.PolicyEngine;
import javax.xml.namespace.QName;
+import java.io.FileInputStream;
import java.util.Properties;
import junit.framework.TestCase;
@@ -33,55 +35,48 @@ public class RampartPolicyTest extends T
public final static QName RAMPART_CONFIG_NAME = new QName(RampartConfig.NS,RampartConfig.RAMPART_CONFIG_LN);
public final static QName CRYPTO_CONFIG_NAME = new QName(RampartConfig.NS,CryptoConfig.CRYPTO_LN);
- public void testLoadPolicy() {
- try {
- String xmlPath = "test-resources/policy/rampart-policy-1.xml";
- StAXOMBuilder builder = new StAXOMBuilder(xmlPath);
-
- OMElement elem = builder.getDocumentElement();
-
- Policy policy = PolicyEngine.getPolicy(elem);
-
- Assertion assertion = (Assertion)policy.getAssertions().get(0);
-
- assertEquals("Incorrect namespace in RampartConfig",
- RAMPART_CONFIG_NAME.getNamespaceURI(), assertion.getName()
- .getNamespaceURI());
- assertEquals("Incorrect localname in RampartConfig",
- RAMPART_CONFIG_NAME.getLocalPart(), assertion.getName()
- .getLocalPart());
-
- RampartConfig config = (RampartConfig) assertion;
- CryptoConfig sigCryptoConfig = config.getSigCryptoConfig();
-
- assertNotNull("Signature Crypto missing", sigCryptoConfig);
-
- assertEquals("Incorrect namespace in SignatureCrypto",
- CRYPTO_CONFIG_NAME.getNamespaceURI(), sigCryptoConfig
- .getName().getNamespaceURI());
- assertEquals("Incorrect localname in SignatureCrypto",
- CRYPTO_CONFIG_NAME.getLocalPart(), sigCryptoConfig.getName()
- .getLocalPart());
-
- assertEquals("Incorrect provider value",
- "org.apache.ws.security.components.crypto.Merlin",
- sigCryptoConfig.getProvider());
-
- Properties prop = sigCryptoConfig.getProp();
- assertEquals("Incorrect number of properties", 3, prop.size());
-
- assertEquals("Incorrect property value", "JKS", prop
- .getProperty("keystoreType"));
- assertEquals("Incorrect property value", "/path/to/file.jks", prop
- .getProperty("keystoreFile"));
- assertEquals("Incorrect property value", "password", prop
- .getProperty("keystorePassword"));
-
- } catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
+ public void testLoadPolicy() throws Exception {
+ String xmlPath = "test-resources/policy/rampart-policy-1.xml";
+ OMXMLParserWrapper builder = OMXMLBuilderFactory.createOMBuilder(new FileInputStream(xmlPath));
+ OMElement elem = builder.getDocumentElement();
+
+ Policy policy = PolicyEngine.getPolicy(elem);
+
+ Assertion assertion = (Assertion)policy.getAssertions().get(0);
+
+ assertEquals("Incorrect namespace in RampartConfig",
+ RAMPART_CONFIG_NAME.getNamespaceURI(), assertion.getName()
+ .getNamespaceURI());
+ assertEquals("Incorrect localname in RampartConfig",
+ RAMPART_CONFIG_NAME.getLocalPart(), assertion.getName()
+ .getLocalPart());
+
+ RampartConfig config = (RampartConfig) assertion;
+ CryptoConfig sigCryptoConfig = config.getSigCryptoConfig();
+
+ assertNotNull("Signature Crypto missing", sigCryptoConfig);
+
+ assertEquals("Incorrect namespace in SignatureCrypto",
+ CRYPTO_CONFIG_NAME.getNamespaceURI(), sigCryptoConfig
+ .getName().getNamespaceURI());
+ assertEquals("Incorrect localname in SignatureCrypto",
+ CRYPTO_CONFIG_NAME.getLocalPart(), sigCryptoConfig.getName()
+ .getLocalPart());
+
+ assertEquals("Incorrect provider value",
+ "org.apache.ws.security.components.crypto.Merlin",
+ sigCryptoConfig.getProvider());
+
+ Properties prop = sigCryptoConfig.getProp();
+ assertEquals("Incorrect number of properties", 3, prop.size());
+
+ assertEquals("Incorrect property value", "JKS", prop
+ .getProperty("keystoreType"));
+ assertEquals("Incorrect property value", "/path/to/file.jks", prop
+ .getProperty("keystoreFile"));
+ assertEquals("Incorrect property value", "password", prop
+ .getProperty("keystorePassword"));
}
}
\ No newline at end of file
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/ws/secpolicy/model/SecpolicyModelTest.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/ws/secpolicy/model/SecpolicyModelTest.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/ws/secpolicy/model/SecpolicyModelTest.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-tests/src/test/java/org/apache/ws/secpolicy/model/SecpolicyModelTest.java Mon Jan 30 17:29:58 2017
@@ -17,12 +17,14 @@
package org.apache.ws.secpolicy.model;
import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.axiom.om.OMXMLBuilderFactory;
+import org.apache.axiom.om.OMXMLParserWrapper;
import org.apache.neethi.Assertion;
import org.apache.neethi.Policy;
import org.apache.neethi.PolicyEngine;
import org.apache.ws.secpolicy.SPConstants;
+import java.io.FileInputStream;
import java.util.Iterator;
import java.util.List;
@@ -31,63 +33,47 @@ import junit.framework.TestCase;
public class SecpolicyModelTest extends TestCase {
- public void testSymmBinding() {
- try {
- Policy p = this.getPolicy("test-resources/policy-symm-binding.xml");
- List assertions = (List)p.getAlternatives().next();
-
- boolean symmBindingFound = false;
-
- for (Iterator iter = assertions.iterator(); iter.hasNext();) {
- Assertion assertion = (Assertion) iter.next();
- if(assertion instanceof SymmetricBinding) {
- symmBindingFound = true;
- SymmetricBinding binding = (SymmetricBinding)assertion;
- assertEquals("IncludeTimestamp assertion not processed", true, binding.isIncludeTimestamp());
-
- ProtectionToken protectionToken = binding.getProtectionToken();
- assertNotNull("ProtectionToken missing", protectionToken);
-
- Token token = protectionToken.getProtectionToken();
- if(token instanceof X509Token) {
- assertEquals("incorrect X509 token versin and type",
- SPConstants.WSS_X509_V3_TOKEN10,
- ((X509Token) token).getTokenVersionAndType());
- } else {
- fail("ProtectionToken must contain a X509Token assertion");
- }
-
+ public void testSymmBinding() throws Exception {
+ Policy p = this.getPolicy("test-resources/policy-symm-binding.xml");
+ List assertions = (List)p.getAlternatives().next();
+
+ boolean symmBindingFound = false;
+
+ for (Iterator iter = assertions.iterator(); iter.hasNext();) {
+ Assertion assertion = (Assertion) iter.next();
+ if(assertion instanceof SymmetricBinding) {
+ symmBindingFound = true;
+ SymmetricBinding binding = (SymmetricBinding)assertion;
+ assertEquals("IncludeTimestamp assertion not processed", true, binding.isIncludeTimestamp());
+
+ ProtectionToken protectionToken = binding.getProtectionToken();
+ assertNotNull("ProtectionToken missing", protectionToken);
+
+ Token token = protectionToken.getProtectionToken();
+ if(token instanceof X509Token) {
+ assertEquals("incorrect X509 token versin and type",
+ SPConstants.WSS_X509_V3_TOKEN10,
+ ((X509Token) token).getTokenVersionAndType());
+ } else {
+ fail("ProtectionToken must contain a X509Token assertion");
}
+
}
- //The Asymm binding mean is not built in the policy processing :-(
- assertTrue("SymmetricBinding not porcessed", symmBindingFound);
-
- } catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
}
+ //The Asymm binding mean is not built in the policy processing :-(
+ assertTrue("SymmetricBinding not porcessed", symmBindingFound);
}
- public void testAsymmBinding() {
- try {
- this.getPolicy("test-resources/policy-asymm-binding.xml");
- } catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
+ public void testAsymmBinding() throws Exception {
+ this.getPolicy("test-resources/policy-asymm-binding.xml");
}
- public void testTransportBinding() {
- try {
- this.getPolicy("test-resources/policy-transport-binding.xml");
- } catch (Exception e) {
- e.printStackTrace();
- fail(e.getMessage());
- }
+ public void testTransportBinding() throws Exception {
+ this.getPolicy("test-resources/policy-transport-binding.xml");
}
private Policy getPolicy(String filePath) throws Exception {
- StAXOMBuilder builder = new StAXOMBuilder(filePath);
+ OMXMLParserWrapper builder = OMXMLBuilderFactory.createOMBuilder(new FileInputStream(filePath));
OMElement elem = builder.getDocumentElement();
return PolicyEngine.getPolicy(elem);
}
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust-mar/module.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust-mar/module.xml?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust-mar/module.xml (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust-mar/module.xml Mon Jan 30 17:29:58 2017
@@ -1,13 +1,14 @@
-<module name="rahas">
+<module name="rahas" class="org.apache.rahas.Rahas">
<Description>This module is used to STS enable a service where it adds
the RequestSecurityToken operation to a service that the module is engaged to</Description>
- <supported-policy-namespaces namespaces="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy"/>
+ <supported-policy-namespaces namespaces="http://schemas.xmlsoap.org/ws/2005/07/securitypolicy, http://docs.oasis-open.org/ws-sx/ws-securitypolicy/200702
+"/>
<operation name="RequestSecurityToken" mep="http://www.w3.org/2006/01/wsdl/in-out">
<messageReceiver class="org.apache.rahas.STSMessageReceiver"/>
- <!-- Action mapping to accept SCT requests -->
+ <!-- Action mapping to accept SCT requests. For submissive version. -->
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT</actionMapping>
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue</actionMapping>
@@ -16,12 +17,22 @@
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/SCT/Cancel</actionMapping>
<actionMapping>http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Validate</actionMapping>
+ <!-- Action mapping to accept SCT requests. For standard secure conversation version -->
+ <actionMapping>http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/SCT</actionMapping>
+
+ <actionMapping>http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Issue</actionMapping>
+ <actionMapping>http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Renew</actionMapping>
+ <actionMapping>http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Cancel</actionMapping>
+ <actionMapping>http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/SCT/Cancel</actionMapping>
+ <actionMapping>http://docs.oasis-open.org/ws-sx/ws-trust/200512/RST/Validate</actionMapping>
+
<parameter name="token-dispatcher-configuration">
<token-dispatcher-configuration>
<!-- Issuers. You may have many issuers. -->
<issuer class="org.apache.rahas.impl.SCTIssuer" default="true">
<configuration type="parameter">sct-issuer-config</configuration>
<tokenType>http://schemas.xmlsoap.org/ws/2005/02/sc/sct</tokenType>
+ <tokenType>http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512/sct</tokenType>
</issuer>
<issuer class="org.apache.rahas.impl.SAMLTokenIssuer">
<configuration type="parameter">saml-issuer-config</configuration>
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust-mar/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust-mar/pom.xml?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust-mar/pom.xml (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust-mar/pom.xml Mon Jan 30 17:29:58 2017
@@ -1,11 +1,31 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.rampart</groupId>
<artifactId>rampart-project</artifactId>
- <version>SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -13,14 +33,13 @@
<groupId>org.apache.rampart</groupId>
<artifactId>rahas</artifactId>
<packaging>mar</packaging>
- <version>${rahas.mar.version}</version><!-- TODO need to remove this-->
<name>Rampart - Trust-Mar</name>
<scm>
- <connection>scm:svn:https://svn.apache.org/repos/asf/webservices/rampart/trunk/java</connection>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/axis/axis2/java/rampart/trunk</connection>
<developerConnection>
- scm:svn:https://svn.apache.org/repos/asf/webservices/rampart/trunk/java</developerConnection>
- <url>https://svn.apache.org/repos/asf/webservices/rampart/trunk/java</url>
+ scm:svn:https://svn.apache.org/repos/asf/axis/axis2/java/rampart/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk</url>
</scm>
<build>
@@ -39,73 +58,28 @@
<target>1.5</target>
</configuration>
</plugin>
- <plugin>
- <groupId>org.apache.axis2</groupId>
- <artifactId>axis2-mar-maven-plugin</artifactId>
- <version>1.2</version>
- <extensions>true</extensions>
- <configuration>
- <includeDependencies>false</includeDependencies>
- <moduleXmlFile>module.xml</moduleXmlFile>
- </configuration>
- </plugin>
- </plugins>
+ <plugin>
+ <groupId>org.apache.axis2</groupId>
+ <artifactId>axis2-mar-maven-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <includeDependencies>false</includeDependencies>
+ <moduleXmlFile>module.xml</moduleXmlFile>
+ </configuration>
+ </plugin>
+ </plugins>
</build>
<dependencies>
- <dependency>
+ <dependency>
<groupId>org.apache.rampart</groupId>
<artifactId>rampart-policy</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
- <dependency>
+ <dependency>
<groupId>org.apache.rampart</groupId>
<artifactId>rampart-trust</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
</dependency>
</dependencies>
-
- <pluginRepositories>
- <pluginRepository>
- <id>apache-m2</id>
- <name>Apache M2 Repository</name>
- <url>http://people.apache.org/repo/m2-ibiblio-rsync-repository</url>
- <layout>default</layout>
- <snapshots>
- <enabled>false</enabled>
- <updatePolicy>daily</updatePolicy>
- <checksumPolicy>ignore</checksumPolicy>
- </snapshots>
- <releases>
- <enabled>true</enabled>
- </releases>
- </pluginRepository>
- <pluginRepository>
- <id>apache-snapshots</id>
- <name>Apache Snapshots Repository</name>
- <url>http://people.apache.org/repo/m2-snapshot-repository</url>
- <layout>default</layout>
- <snapshots>
- <enabled>true</enabled>
- <updatePolicy>daily</updatePolicy>
- <checksumPolicy>ignore</checksumPolicy>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </pluginRepository>
- </pluginRepositories>
- <distributionManagement>
- <repository>
- <id>apache-repo</id>
- <name>Maven Central Repository</name>
- <url>scpexe://people.apache.org//www/people.apache.org/repo/m2-ibiblio-rsync-repository</url>
- </repository>
- <snapshotRepository>
- <id>apache-snapshots</id>
- <name>Apache Development Repository</name>
- <url>scpexe://people.apache.org//www/people.apache.org/repo/m2-snapshot-repository</url>
- <uniqueVersion>false</uniqueVersion>
- </snapshotRepository>
- </distributionManagement>
</project>
Propchange: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust-mar/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/pom.xml
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/pom.xml?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/pom.xml (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/pom.xml Mon Jan 30 17:29:58 2017
@@ -1,11 +1,31 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ ~ Licensed to the Apache Software Foundation (ASF) under one
+ ~ or more contributor license agreements. See the NOTICE file
+ ~ distributed with this work for additional information
+ ~ regarding copyright ownership. The ASF licenses this file
+ ~ to you under the Apache License, Version 2.0 (the
+ ~ "License"); you may not use this file except in compliance
+ ~ with the License. You may obtain a copy of the License at
+ ~
+ ~ http://www.apache.org/licenses/LICENSE-2.0
+ ~
+ ~ Unless required by applicable law or agreed to in writing,
+ ~ software distributed under the License is distributed on an
+ ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ ~ KIND, either express or implied. See the License for the
+ ~ specific language governing permissions and limitations
+ ~ under the License.
+ -->
+
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
<groupId>org.apache.rampart</groupId>
<artifactId>rampart-project</artifactId>
- <version>SNAPSHOT</version>
+ <version>1.7.0-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -24,6 +44,12 @@
</excludes>
</resource>
</resources>
+ <testResources>
+ <testResource>
+ <directory>${project.basedir}/src/test/resources</directory>
+ </testResource>
+ </testResources>
+
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -33,6 +59,14 @@
<target>1.5</target>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <!--configuration>
+ <includes>
+ <include>**/*Test.java</include>
+ </includes>
+ </configuration-->
+ </plugin>
</plugins>
</build>
@@ -40,7 +74,11 @@
<dependency>
<groupId>org.apache.rampart</groupId>
<artifactId>rampart-policy</artifactId>
- <version>${pom.version}</version>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ws.commons.axiom</groupId>
+ <artifactId>axiom-dom</artifactId>
</dependency>
</dependencies>
@@ -49,9 +87,10 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
+ <version>2.0-beta-5</version>
<configuration>
<templateDirectory>${basedir}</templateDirectory>
- <menu ref="parent"/>
+ <menu ref="parent" />
</configuration>
</plugin>
</plugins>
Propchange: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/EncryptedKeyToken.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/EncryptedKeyToken.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/EncryptedKeyToken.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/EncryptedKeyToken.java Mon Jan 30 17:29:58 2017
@@ -33,7 +33,7 @@ import org.apache.axiom.om.OMElement;
*
*/
public class EncryptedKeyToken extends Token {
-
+
/**
* SHA1 value of the encrypted key
*/
@@ -42,29 +42,29 @@ public class EncryptedKeyToken extends T
public EncryptedKeyToken(){
super();
}
-
- public EncryptedKeyToken (String id,Date created, Date expires) {
- super(id,created,expires);
- }
-
- public EncryptedKeyToken (String id, OMElement tokenElem,
- Date created, Date expires)throws TrustException{
- super(id,tokenElem,created,expires);
- }
-
- /**
- * @param sha SHA1 of the encrypted key
- */
- public void setSHA1(String sha) {
- this.sha = sha;
- }
-
- /**
- * @return SHA1 value of the encrypted key
- */
- public String getSHA1() {
- return sha;
- }
+
+ public EncryptedKeyToken (String id,Date created, Date expires) {
+ super(id,created,expires);
+ }
+
+ public EncryptedKeyToken (String id, OMElement tokenElem,
+ Date created, Date expires)throws TrustException{
+ super(id,tokenElem,created,expires);
+ }
+
+ /**
+ * @param sha SHA1 of the encrypted key
+ */
+ public void setSHA1(String sha) {
+ this.sha = sha;
+ }
+
+ /**
+ * @return SHA1 value of the encrypted key
+ */
+ public String getSHA1() {
+ return sha;
+ }
public void writeExternal(ObjectOutput out)
throws IOException {
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/RahasConstants.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/RahasConstants.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/RahasConstants.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/RahasConstants.java Mon Jan 30 17:29:58 2017
@@ -126,10 +126,21 @@ public class RahasConstants {
public static final String TOK_TYPE_SAML_20 = "http://docs.oasis-open.org/wss/" +
"oasis-wss-saml-token-profile-1.1#SAMLV2.0";
//Attrs
- public static final String ATTR_TYPE = "Type";
- public static final String ATTR_CLAIMS_DIALECT = "Dialect";
+ public static final String ATTR_TYPE = "Type";
+ public static final String ATTR_CLAIMS_DIALECT = "Dialect";
//Constants required for SAML2 assertion generation
public final static String X509_CERT ="X509Certificate";
public final static String USERNAME = "username";
+
+ //Constants required for SubjectConfirmation methods
+ public static final String SAML11_SUBJECT_CONFIRMATION_HOK = "urn:oasis:names:tc:SAML:1.0:cm:" +
+ "holder-of-key";
+ public static final String SAML11_SUBJECT_CONFIRMATION_BEARER = "urn:oasis:names:tc:SAML:1.0:cm:bearer";
+
+ public static final String SAML20_SUBJECT_CONFIRMATION_HOK = "urn:oasis:names:tc:SAML:2.0:cm:holder-of-key";
+
+ public static final String SAML20_SUBJECT_CONFIRMATION_BEARER = "urn:oasis:names:tc:SAML:2.0:cm:bearer";
+
+ public static final String SAML_NS = "urn:oasis:names:tc:SAML:1.0:assertion";
}
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/RahasData.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/RahasData.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/RahasData.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/RahasData.java Mon Jan 30 17:29:58 2017
@@ -28,7 +28,7 @@ import org.apache.ws.security.WSSecurity
import org.apache.ws.security.handler.WSHandlerConstants;
import org.apache.ws.security.handler.WSHandlerResult;
import org.apache.ws.security.message.token.SecurityTokenReference;
-import org.opensaml.SAMLAssertion;
+import org.opensaml.saml1.core.Assertion;
import org.w3c.dom.Element;
import javax.xml.namespace.QName;
@@ -84,7 +84,7 @@ public class RahasData {
private String claimDialect;
- private SAMLAssertion assertion;
+ private Assertion assertion;
/**
* Create a new RahasData instance and populate it with the information from
* the request.
@@ -182,7 +182,7 @@ public class RahasData {
this.clientCert = certificates[0];
this.principal = this.clientCert.getSubjectDN();
} else if (act == WSConstants.ST_UNSIGNED) {
- this.assertion = (SAMLAssertion) wser
+ this.assertion = (Assertion) wser
.get(WSSecurityEngineResult.TAG_SAML_ASSERTION);
}
@@ -305,15 +305,15 @@ public class RahasData {
*
*/
private void processClaims() throws TrustException{
- claimElem = this.rstElement
- .getFirstChildWithName(new QName(this.wstNs,
- RahasConstants.IssuanceBindingLocalNames.CLAIMS));
-
- if(claimElem != null){
- claimDialect = claimElem.getAttributeValue(new QName(this.wstNs,
- RahasConstants.ATTR_CLAIMS_DIALECT));
- }
-
+ claimElem = this.rstElement
+ .getFirstChildWithName(new QName(this.wstNs,
+ RahasConstants.IssuanceBindingLocalNames.CLAIMS));
+
+ if(claimElem != null){
+ claimDialect = claimElem.getAttributeValue(new QName(this.wstNs,
+ RahasConstants.ATTR_CLAIMS_DIALECT));
+ }
+
}
private void processValidateTarget()throws TrustException{
@@ -335,7 +335,7 @@ public class RahasData {
if (str.containsReference()) {
tokenId = str.getReference().getURI();
} else if(str.containsKeyIdentifier()){
- tokenId = str.getKeyIdentifierValue();
+ tokenId = str.getKeyIdentifierValue();
}
} catch (WSSecurityException e) {
throw new TrustException("errorExtractingTokenId",e);
@@ -361,7 +361,7 @@ public class RahasData {
if (str.containsReference()) {
tokenId = str.getReference().getURI();
} else if(str.containsKeyIdentifier()){
- tokenId = str.getKeyIdentifierValue();
+ tokenId = str.getKeyIdentifierValue();
}
if(tokenId == null){
if(str.containsKeyIdentifier()){
@@ -535,13 +535,13 @@ public class RahasData {
this.ephmeralKey = ephmeralKey;
}
- public String getClaimDialect() {
- return claimDialect;
- }
-
- public OMElement getClaimElem() {
- return claimElem;
- }
+ public String getClaimDialect() {
+ return claimDialect;
+ }
+
+ public OMElement getClaimElem() {
+ return claimElem;
+ }
public OMElement getAppliesToEpr() {
return appliesToEpr;
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/STSMessageReceiver.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/STSMessageReceiver.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/STSMessageReceiver.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/STSMessageReceiver.java Mon Jan 30 17:29:58 2017
@@ -29,7 +29,7 @@ import javax.xml.namespace.QName;
public class STSMessageReceiver extends AbstractInOutMessageReceiver {
- private static final Log log = LogFactory.getLog(STSMessageReceiver.class);
+ private static final Log log = LogFactory.getLog(STSMessageReceiver.class);
public void invokeBusinessLogic(MessageContext inMessage,
MessageContext outMessage) throws AxisFault {
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/SimpleTokenStore.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/SimpleTokenStore.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/SimpleTokenStore.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/SimpleTokenStore.java Mon Jan 30 17:29:58 2017
@@ -191,6 +191,17 @@ public class SimpleTokenStore implements
return token;
}
+ public void removeToken(String id){
+
+ writeLock.lock();
+
+ try {
+ this.tokens.remove(id);
+ } finally {
+ writeLock.unlock();
+ }
+ }
+
protected void processTokenExpiry() throws TrustException {
readLock.lock();
@@ -220,7 +231,7 @@ public class SimpleTokenStore implements
} else if(child.getQName().equals(Reference.TOKEN)) {
String uri = child.getAttributeValue(new QName("URI"));
if (uri.charAt(0) == '#') {
- uri = uri.substring(1);
+ uri = uri.substring(1);
}
return uri;
} else {
@@ -228,6 +239,4 @@ public class SimpleTokenStore implements
}
}
-
-
}
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/Token.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/Token.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/Token.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/Token.java Mon Jan 30 17:29:58 2017
@@ -16,35 +16,33 @@
package org.apache.rahas;
-import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMException;
-import org.apache.axiom.om.OMFactory;
-import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.impl.dom.DOOMAbstractFactory;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.ws.security.WSConstants;
-import org.apache.ws.security.util.XmlSchemaDateFormat;
-
-import javax.xml.namespace.QName;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLStreamException;
-import javax.xml.stream.XMLStreamReader;
-
-import java.io.ByteArrayInputStream;
import java.io.Externalizable;
import java.io.IOException;
-import java.io.InputStream;
import java.io.ObjectInput;
import java.io.ObjectOutput;
import java.io.Reader;
import java.io.StringReader;
-import java.io.UnsupportedEncodingException;
import java.text.DateFormat;
import java.text.ParseException;
import java.util.Date;
import java.util.Properties;
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLInputFactory;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.axiom.om.OMAbstractFactory;
+import org.apache.axiom.om.OMElement;
+import org.apache.axiom.om.OMException;
+import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMMetaFactory;
+import org.apache.axiom.om.impl.builder.StAXOMBuilder;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.apache.ws.security.WSConstants;
+import org.apache.ws.security.util.XmlSchemaDateFormat;
+
/**
* This represents a security token which can have either one of 4 states. <ul> <li>ISSUED</li> <li>EXPIRED</li>
* <li>CACELLED</li> <li>RENEWED</li> </ul> Also this holds the <code>OMElement</code>s representing the token in its
@@ -144,8 +142,9 @@ public class Token implements Externaliz
public Token(String id, OMElement tokenElem, Date created, Date expires)
throws TrustException {
this.id = id;
- StAXOMBuilder stAXOMBuilder =
- new StAXOMBuilder(DOOMAbstractFactory.getOMFactory(), tokenElem.getXMLStreamReader());
+ OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
+ StAXOMBuilder stAXOMBuilder =
+ new StAXOMBuilder(metaFactory.getOMFactory(), tokenElem.getXMLStreamReader());
stAXOMBuilder.setNamespaceURIInterning(true);
this.token = stAXOMBuilder.getDocumentElement();
this.created = created;
@@ -155,8 +154,9 @@ public class Token implements Externaliz
public Token(String id, OMElement tokenElem, OMElement lifetimeElem)
throws TrustException {
this.id = id;
+ OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
StAXOMBuilder stAXOMBuilder =
- new StAXOMBuilder(DOOMAbstractFactory.getOMFactory(), tokenElem.getXMLStreamReader());
+ new StAXOMBuilder(metaFactory.getOMFactory(), tokenElem.getXMLStreamReader());
stAXOMBuilder.setNamespaceURIInterning(true);
this.token = stAXOMBuilder.getDocumentElement();
this.processLifeTime(lifetimeElem);
@@ -258,7 +258,8 @@ public class Token implements Externaliz
* @param presivousToken The presivousToken to set.
*/
public void setPreviousToken(OMElement presivousToken) {
- this.previousToken = new StAXOMBuilder(DOOMAbstractFactory.getOMFactory(), presivousToken.getXMLStreamReader())
+ OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
+ this.previousToken = new StAXOMBuilder(metaFactory.getOMFactory(), presivousToken.getXMLStreamReader())
.getDocumentElement();
}
@@ -288,8 +289,9 @@ public class Token implements Externaliz
*/
public void setAttachedReference(OMElement attachedReference) {
if (attachedReference != null) {
+ OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
this.attachedReference =
- new StAXOMBuilder(DOOMAbstractFactory.getOMFactory(), attachedReference.getXMLStreamReader())
+ new StAXOMBuilder(metaFactory.getOMFactory(), attachedReference.getXMLStreamReader())
.getDocumentElement();
}
}
@@ -306,8 +308,9 @@ public class Token implements Externaliz
*/
public void setUnattachedReference(OMElement unattachedReference) {
if (unattachedReference != null) {
+ OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
this.unattachedReference =
- new StAXOMBuilder(DOOMAbstractFactory.getOMFactory(), unattachedReference.getXMLStreamReader())
+ new StAXOMBuilder(metaFactory.getOMFactory(), unattachedReference.getXMLStreamReader())
.getDocumentElement();
}
}
@@ -474,7 +477,8 @@ public class Token implements Externaliz
OMElement documentElement = builder.getDocumentElement();
XMLStreamReader llomReader = documentElement.getXMLStreamReader();
- OMFactory doomFactory = DOOMAbstractFactory.getOMFactory();
+ OMMetaFactory metaFactory = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
+ OMFactory doomFactory = metaFactory.getOMFactory();
StAXOMBuilder doomBuilder = new StAXOMBuilder(doomFactory, llomReader);
return doomBuilder.getDocumentElement();
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TokenRequestDispatcher.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TokenRequestDispatcher.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TokenRequestDispatcher.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TokenRequestDispatcher.java Mon Jan 30 17:29:58 2017
@@ -20,7 +20,6 @@ import org.apache.axiom.soap.SOAPEnvelop
import org.apache.axis2.context.MessageContext;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.apache.rahas.impl.SAMLTokenValidator;
public class TokenRequestDispatcher {
@@ -50,16 +49,16 @@ public class TokenRequestDispatcher {
public SOAPEnvelope handle(MessageContext inMsgCtx,
MessageContext outMsgCtx) throws TrustException {
- if(mlog.isDebugEnabled()){
- mlog.debug("*********************** TokenRequestDispatcher received \n"+inMsgCtx.getEnvelope());
- }
+ if(mlog.isDebugEnabled()){
+ mlog.debug("*********************** TokenRequestDispatcher received \n"+inMsgCtx.getEnvelope());
+ }
RahasData data = new RahasData(inMsgCtx);
String reqType = data.getRequestType();
String tokenType = data.getTokenType();
if ((RahasConstants.WST_NS_05_02 + RahasConstants.REQ_TYPE_ISSUE).equals(reqType) ||
(RahasConstants.WST_NS_05_12 + RahasConstants.REQ_TYPE_ISSUE).equals(reqType)) {
- log.debug("issue");
+ log.debug("issue");
TokenIssuer issuer;
if (tokenType == null || tokenType.trim().length() == 0) {
issuer = config.getDefaultIssuerInstace();
@@ -73,15 +72,15 @@ public class TokenRequestDispatcher {
outMsgCtx.getOptions().setAction(issuer.getResponseAction(data));
if(mlog.isDebugEnabled()){
- mlog.debug("*********************** TokenRequestDispatcher sent out \n"+response);
- }
+ mlog.debug("*********************** TokenRequestDispatcher sent out \n"+response);
+ }
return response;
} else if((RahasConstants.WST_NS_05_02 + RahasConstants.REQ_TYPE_VALIDATE).equals(reqType) ||
(RahasConstants.WST_NS_05_12 + RahasConstants.REQ_TYPE_VALIDATE).equals(reqType)) {
- log.debug("validate");
-
- TokenValidator validator;
+ log.debug("validate");
+
+ TokenValidator validator;
if (tokenType == null || tokenType.trim().length() == 0) {
validator = config.getDefaultValidatorInstance();
} else {
@@ -95,14 +94,14 @@ public class TokenRequestDispatcher {
RahasConstants.RSTR_ACTION_VALIDATE));
return response;
-
-
-
+
+
+
} else if((RahasConstants.WST_NS_05_02 + RahasConstants.REQ_TYPE_RENEW).equals(reqType) ||
(RahasConstants.WST_NS_05_12 + RahasConstants.REQ_TYPE_RENEW).equals(reqType)) {
- log.debug("renew");
-
- TokenRenewer renewer;
+ log.debug("renew");
+
+ TokenRenewer renewer;
if (tokenType == null || tokenType.trim().length() == 0) {
renewer = config.getDefaultRenewerInstance();
} else {
@@ -115,11 +114,11 @@ public class TokenRequestDispatcher {
TrustUtil.getActionValue(data.getVersion(),
RahasConstants.RSTR_ACTION_RENEW));
- return response;
-
+ return response;
+
} else if((RahasConstants.WST_NS_05_02 + RahasConstants.REQ_TYPE_CANCEL).equals(reqType) ||
(RahasConstants.WST_NS_05_12 + RahasConstants.REQ_TYPE_CANCEL).equals(reqType)) {
- log.debug("cancel");
+ log.debug("cancel");
TokenCanceler canceler = config.getDefaultCancelerInstance();
SOAPEnvelope response = canceler.cancel(data);
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TokenStorage.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TokenStorage.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TokenStorage.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TokenStorage.java Mon Jan 30 17:29:58 2017
@@ -83,5 +83,11 @@ public interface TokenStorage {
* @throws TrustException
*/
Token getToken(String id) throws TrustException;
-
+
+ /**
+ * Removes the given token from token storage.
+ * @param id Token id to remove.
+ */
+ void removeToken(String id);
+
}
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TrustUtil.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TrustUtil.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TrustUtil.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/TrustUtil.java Mon Jan 30 17:29:58 2017
@@ -16,16 +16,24 @@
package org.apache.rahas;
+import java.security.SecureRandom;
+import java.text.DateFormat;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.Properties;
+
+import javax.xml.namespace.QName;
+
import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
import org.apache.axiom.om.OMFactory;
+import org.apache.axiom.om.OMMetaFactory;
import org.apache.axiom.om.OMNamespace;
-import org.apache.axiom.om.impl.dom.DOOMAbstractFactory;
import org.apache.axiom.soap.SOAP11Constants;
import org.apache.axiom.soap.SOAPEnvelope;
import org.apache.axis2.addressing.AddressingConstants;
-import org.apache.axis2.context.MessageContext;
import org.apache.axis2.context.ConfigurationContext;
+import org.apache.axis2.context.MessageContext;
import org.apache.rahas.impl.AbstractIssuerConfig;
import org.apache.ws.security.WSConstants;
import org.apache.ws.security.message.token.Reference;
@@ -34,14 +42,6 @@ import org.apache.ws.security.util.XmlSc
import org.w3c.dom.Document;
import org.w3c.dom.Element;
-import javax.xml.namespace.QName;
-
-import java.security.SecureRandom;
-import java.text.DateFormat;
-import java.util.Date;
-import java.util.Properties;
-import java.util.Iterator;
-
public class TrustUtil {
private static final QName NAME = new QName("name");
@@ -241,63 +241,63 @@ public class TrustUtil {
}
/**
- * Create and add wst:AttachedReference element
- *
- * @param rstrElem
- * wst:RequestSecurityToken element
- * @param id
- * Token identifier
- * @throws TrustException
- */
+ * Create and add wst:AttachedReference element
+ *
+ * @param rstrElem
+ * wst:RequestSecurityToken element
+ * @param id
+ * Token identifier
+ * @throws TrustException
+ */
public static void createRequestedAttachedRef(OMElement rstrElem, String id, int version)
- throws TrustException {
- OMFactory fac = null;
- OMElement rar = null;
- OMElement str = null;
- OMElement ki = null;
-
- String ns = TrustUtil.getWSTNamespace(version);
- fac = rstrElem.getOMFactory();
- rar = fac.createOMElement(new QName(ns,
- RahasConstants.IssuanceBindingLocalNames.REQUESTED_ATTACHED_REFERENCE,
- RahasConstants.WST_PREFIX), rstrElem);
- str = fac.createOMElement(new QName(WSConstants.WSSE_NS,
- SecurityTokenReference.SECURITY_TOKEN_REFERENCE, WSConstants.WSSE_PREFIX), rar);
- ki = fac.createOMElement(new QName(WSConstants.WSSE_NS, "KeyIdentifier",
- WSConstants.WSSE_PREFIX), str);
- ki.addAttribute("ValueType", WSConstants.WSS_SAML_KI_VALUE_TYPE, null);
- ki.setText(id);
- }
-
- /**
- * Create and add wst:UnattachedReference element
- *
- * @param rstrElem
- * wst:RequestSecurityToken element
- * @param id
- * Token identifier
- * @throws TrustException
- */
- public static void createRequestedUnattachedRef(OMElement rstrElem, String id, int version)
- throws TrustException {
- OMFactory fac = null;
- OMElement rar = null;
- OMElement str = null;
- OMElement ki = null;
-
- String ns = TrustUtil.getWSTNamespace(version);
- fac = rstrElem.getOMFactory();
- rar = fac.createOMElement(new QName(ns,
- RahasConstants.IssuanceBindingLocalNames.REQUESTED_UNATTACHED_REFERENCE,
- RahasConstants.WST_PREFIX), rstrElem);
- str = fac.createOMElement(new QName(WSConstants.WSSE_NS,
- SecurityTokenReference.SECURITY_TOKEN_REFERENCE, WSConstants.WSSE_PREFIX), rar);
- ki = fac.createOMElement(new QName(WSConstants.WSSE_NS, "KeyIdentifier",
- WSConstants.WSSE_PREFIX), str);
-
- ki.addAttribute("ValueType", WSConstants.WSS_SAML_KI_VALUE_TYPE, null);
- ki.setText(id);
- }
+ throws TrustException {
+ OMFactory fac = null;
+ OMElement rar = null;
+ OMElement str = null;
+ OMElement ki = null;
+
+ String ns = TrustUtil.getWSTNamespace(version);
+ fac = rstrElem.getOMFactory();
+ rar = fac.createOMElement(new QName(ns,
+ RahasConstants.IssuanceBindingLocalNames.REQUESTED_ATTACHED_REFERENCE,
+ RahasConstants.WST_PREFIX), rstrElem);
+ str = fac.createOMElement(new QName(WSConstants.WSSE_NS,
+ SecurityTokenReference.SECURITY_TOKEN_REFERENCE, WSConstants.WSSE_PREFIX), rar);
+ ki = fac.createOMElement(new QName(WSConstants.WSSE_NS, "KeyIdentifier",
+ WSConstants.WSSE_PREFIX), str);
+ ki.addAttribute("ValueType", WSConstants.WSS_SAML_KI_VALUE_TYPE, null);
+ ki.setText(id);
+ }
+
+ /**
+ * Create and add wst:UnattachedReference element
+ *
+ * @param rstrElem
+ * wst:RequestSecurityToken element
+ * @param id
+ * Token identifier
+ * @throws TrustException
+ */
+ public static void createRequestedUnattachedRef(OMElement rstrElem, String id, int version)
+ throws TrustException {
+ OMFactory fac = null;
+ OMElement rar = null;
+ OMElement str = null;
+ OMElement ki = null;
+
+ String ns = TrustUtil.getWSTNamespace(version);
+ fac = rstrElem.getOMFactory();
+ rar = fac.createOMElement(new QName(ns,
+ RahasConstants.IssuanceBindingLocalNames.REQUESTED_UNATTACHED_REFERENCE,
+ RahasConstants.WST_PREFIX), rstrElem);
+ str = fac.createOMElement(new QName(WSConstants.WSSE_NS,
+ SecurityTokenReference.SECURITY_TOKEN_REFERENCE, WSConstants.WSSE_PREFIX), rar);
+ ki = fac.createOMElement(new QName(WSConstants.WSSE_NS, "KeyIdentifier",
+ WSConstants.WSSE_PREFIX), str);
+
+ ki.addAttribute("ValueType", WSConstants.WSS_SAML_KI_VALUE_TYPE, null);
+ ki.setText(id);
+ }
public static OMElement createKeySizeElement(int version,
OMElement parent,
@@ -421,11 +421,12 @@ public class TrustUtil {
* @return SOAPEnvelope
*/
public static SOAPEnvelope createSOAPEnvelope(String nsUri) {
+ OMMetaFactory domFac = OMAbstractFactory.getMetaFactory(OMAbstractFactory.FEATURE_DOM);
if (nsUri != null
&& SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI.equals(nsUri)) {
- return DOOMAbstractFactory.getSOAP11Factory().getDefaultEnvelope();
+ return domFac.getSOAP11Factory().getDefaultEnvelope();
} else {
- return DOOMAbstractFactory.getSOAP12Factory().getDefaultEnvelope();
+ return domFac.getSOAP12Factory().getDefaultEnvelope();
}
}
@@ -539,14 +540,14 @@ public class TrustUtil {
}
public static OMElement createClaims(int version,
- OMElement parent, String dialect) throws TrustException{
+ OMElement parent, String dialect) throws TrustException{
OMElement omElem = createOMElement(parent,
getWSTNamespace(version),
RahasConstants.IssuanceBindingLocalNames.CLAIMS,
- RahasConstants.WST_PREFIX);
+ RahasConstants.WST_PREFIX);
OMNamespace ns = omElem.getOMFactory().createOMNamespace(getWSTNamespace(version),
- RahasConstants.WSP_PREFIX);
+ RahasConstants.WSP_PREFIX);
omElem.addAttribute(RahasConstants.ATTR_CLAIMS_DIALECT , dialect, ns);
@@ -612,6 +613,4 @@ public class TrustUtil {
.getAttributeValue().trim());
return properties;
}
-
-
}
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/client/STSClient.java Mon Jan 30 17:29:58 2017
@@ -16,23 +16,12 @@
package org.apache.rahas.client;
-import java.io.IOException;
-import java.util.*;
-import java.text.DateFormat;
-import java.text.ParseException;
-
-import javax.security.auth.callback.Callback;
-import javax.security.auth.callback.CallbackHandler;
-import javax.security.auth.callback.UnsupportedCallbackException;
-import javax.xml.namespace.QName;
-
+import org.apache.axiom.om.OMAbstractFactory;
import org.apache.axiom.om.OMElement;
-import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.OMException;
+import org.apache.axiom.om.OMNode;
import org.apache.axiom.om.impl.builder.StAXOMBuilder;
-import org.apache.axiom.om.impl.dom.DOOMAbstractFactory;
import org.apache.axiom.om.util.Base64;
-import org.apache.axiom.om.util.UUIDGenerator;
import org.apache.axiom.soap.SOAP12Constants;
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.AddressingConstants;
@@ -65,10 +54,24 @@ import org.apache.ws.security.conversati
import org.apache.ws.security.conversation.dkalgo.P_SHA1;
import org.apache.ws.security.message.token.Reference;
import org.apache.ws.security.processor.EncryptedKeyProcessor;
+import org.apache.ws.security.util.UUIDGenerator;
import org.apache.ws.security.util.WSSecurityUtil;
import org.apache.ws.security.util.XmlSchemaDateFormat;
import org.w3c.dom.Element;
+import javax.security.auth.callback.Callback;
+import javax.security.auth.callback.CallbackHandler;
+import javax.security.auth.callback.UnsupportedCallbackException;
+import javax.xml.namespace.QName;
+import java.io.IOException;
+import java.text.DateFormat;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Vector;
+
public class STSClient {
private static final String RAMPART_POLICY = "rampartPolicy";
@@ -389,6 +392,22 @@ public class STSClient {
private Token processIssueResponse(int version, OMElement result,
String issuerAddress) throws TrustException {
OMElement rstr = result;
+
+ /**
+ * TODO :-
+ * There are 3 mechanisms to establish a security context token.
+ * They are,
+ * 1. Security context token created by a security token service
+ * 2. Security context token created by one of the communicating parties and propagated with a
+ * message
+ * 3. Security context token created through negotiation/exchanges
+ *
+ * As per now we are only supporting case 1. Therefore we always expect a
+ * wst:RequestSecurityTokenResponseCollection in the incoming message.
+ *
+ * This only applies when we use specification http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512
+ */
+
if (version == RahasConstants.VERSION_05_12) {
//The WS-SX result will be an RSTRC
rstr = result.getFirstElement();
@@ -457,8 +476,9 @@ public class STSClient {
} else if (child.getQName().equals(new QName(ns, WSConstants.ENC_KEY_LN))) {
try {
Element domChild = (Element) new StAXOMBuilder(
- DOOMAbstractFactory.getOMFactory(), child
- .getXMLStreamReader()).getDocumentElement();
+ OMAbstractFactory.getMetaFactory(
+ OMAbstractFactory.FEATURE_DOM).getOMFactory(),
+ child.getXMLStreamReader()).getDocumentElement();
EncryptedKeyProcessor processor = new EncryptedKeyProcessor();
@@ -549,8 +569,8 @@ public class STSClient {
id = token.getAttributeValue(new QName(WSConstants.WSU_NS, "Id"));
if ( id == null )
{
- // If we are dealing with a SAML Assetion, look for AssertionID.
- id = token.getAttributeValue(new QName( "AssertionID"));
+ // If we are dealing with a SAML Assetion, look for AssertionID.
+ id = token.getAttributeValue(new QName( "AssertionID"));
}
}
return id;
@@ -601,8 +621,7 @@ public class STSClient {
//find the AlgorithmSuite assertion
if (tempAssertion instanceof Binding) {
- log.debug("Extracting algo suite from issuer " +
- "policy binding");
+ log.debug("Extracting algo suite from issuer policy binding");
this.algorithmSuite = ((Binding) tempAssertion)
.getAlgorithmSuite();
@@ -620,12 +639,10 @@ public class STSClient {
Assertion tempAssertion = (Assertion) iter.next();
//find the Trust10 assertion
if (tempAssertion instanceof Trust10) {
- log.debug("Extracting Trust10 assertion from " +
- "service policy");
+ log.debug("Extracting Trust10 assertion from service policy");
this.trust10 = (Trust10) tempAssertion;
} else if (tempAssertion instanceof Trust13) {
- log.debug("Extracting Trust13 assertion from " +
- "service policy");
+ log.debug("Extracting Trust13 assertion from service policy");
this.trust13 = (Trust13) tempAssertion;
}
}
@@ -643,8 +660,10 @@ public class STSClient {
private OMElement createIssueRequest(String requestType,
String appliesTo) throws TrustException {
- log.debug("Creating request with request type: " + requestType +
- " and applies to: " + appliesTo);
+ if (log.isDebugEnabled()) {
+ log.debug("Creating request with request type: " + requestType +
+ " and applies to: " + appliesTo);
+ }
OMElement rst = TrustUtil.createRequestSecurityTokenElement(version);
@@ -657,7 +676,9 @@ public class STSClient {
//Copy over the elements from the template
if (this.rstTemplate != null) {
- log.debug("Using RSTTemplate: " + this.rstTemplate.toString());
+ if (log.isDebugEnabled()) {
+ log.debug("Using RSTTemplate: " + this.rstTemplate.toString());
+ }
Iterator templateChildren = rstTemplate.getChildElements();
while (templateChildren.hasNext()) {
@@ -674,7 +695,9 @@ public class STSClient {
(childElem.getText() != null && !"".equals(childElem.getText())) ?
Integer.parseInt(childElem.getText()) :
-1;
- log.debug("Key size from RSTTemplate: " + this.keySize);
+ if (log.isDebugEnabled()) {
+ log.debug("Key size from RSTTemplate: " + this.keySize);
+ }
}
}
}
@@ -700,8 +723,9 @@ public class STSClient {
getMaximumSymmetricKeyLength()/8);
binSec.setText(Base64.encode(this.requestorEntropy));
- log.debug("Clien entropy : "
- + Base64.encode(this.requestorEntropy));
+ if (log.isDebugEnabled()) {
+ log.debug("Clien entropy : " + Base64.encode(this.requestorEntropy));
+ }
// Add the ComputedKey element
TrustUtil.createComputedKeyAlgorithm(this.version, rst,
@@ -725,8 +749,9 @@ public class STSClient {
getMaximumSymmetricKeyLength()/8);
binSec.setText(Base64.encode(this.requestorEntropy));
- log.debug("Clien entropy : "
- + Base64.encode(this.requestorEntropy));
+ if (log.isDebugEnabled()) {
+ log.debug("Clien entropy : " + Base64.encode(this.requestorEntropy));
+ }
// Add the ComputedKey element
TrustUtil.createComputedKeyAlgorithm(this.version, rst,
@@ -748,9 +773,11 @@ public class STSClient {
}
private OMElement createValidateRequest(String requestType, String tokenId) throws TrustException {
-
- log.debug("Creating request with request type: " + requestType);
-
+
+ if (log.isDebugEnabled()) {
+ log.debug("Creating request with request type: " + requestType);
+ }
+
OMElement rst = TrustUtil.createRequestSecurityTokenElement(version);
TrustUtil.createRequestTypeElement(this.version, rst, requestType);
@@ -788,9 +815,11 @@ public class STSClient {
String requestType =
TrustUtil.getWSTNamespace(version) + RahasConstants.REQ_TYPE_RENEW;
-
- log.debug("Creating request with request type: " + requestType);
-
+
+ if (log.isDebugEnabled()) {
+ log.debug("Creating request with request type: " + requestType);
+ }
+
OMElement rst = TrustUtil.createRequestSecurityTokenElement(version);
TrustUtil.createRequestTypeElement(this.version, rst, requestType);
Modified: axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/errors.properties
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/errors.properties?rev=1780951&r1=1780950&r2=1780951&view=diff
==============================================================================
--- axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/errors.properties (original)
+++ axis/axis2/java/rampart/branches/RAMPART-289/modules/rampart-trust/src/main/java/org/apache/rahas/errors.properties Mon Jan 30 17:29:58 2017
@@ -49,6 +49,7 @@ notSupported = Not supported: {0}
errorCreatingSymmKey = Error in creating the ephemeral key
badDispatcherConfigMultipleDefaultIssuers = Dispatcher configuration error : There should be only one default issuer
errorInBuildingTheEncryptedKeyForPrincipal = Error in building encrypted key for principal : \"{0}\"
+trustedCertNotFoundForEPR = Trusted certificate not found for service address : \"{0}\"
invlidTTL = timeToLive (in milliseconds) must be a positive long value.
invalidKeysize = Invalid key size
unsupportedWSTVersion = Unsupported WS-Trust version
@@ -87,4 +88,13 @@ errorInCancelingToken = Error occurred w
errorExtractingTokenId = Error occurred while extracting token id from the Security Token Reference
lifeTimeElemMissing = Lifetime element is missing in the RSTR
-lifeTimeElemMissing = Lifetime element is missing in the RSTR
\ No newline at end of file
+unableToRetrieveCallbackHandler= Unable to retrieve callback handler
+
+#SAMLUtils errors
+builderNotFound = Unable to find OpenSAML builder for object : \"{0}\"
+issuerCertificateNotFound = Unable to get issuer certificate for issuer alias : \"{0}\"
+issuerPrivateKeyNotFound = Unable to get issuer certificate for issuer alias : \"{0}\"
+errorMarshallingAssertion = Error while marshalling assertion
+errorSigningAssertion = Error signing SAML Assertion. An error occurred while signing SAML Assertion with alias : \"{0}\"
+sha1NotFound = Unable to find SHA-1 algorithm implementation
+certificateEncodingError = Error encoding certificate
\ No newline at end of file