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/07/30 13:14:11 UTC
svn commit: r1803424 - in /axis/axis2/java/rampart/trunk/modules:
rampart-core/src/main/java/org/apache/rampart/
rampart-core/src/main/java/org/apache/rampart/builder/
rampart-core/src/main/java/org/apache/rampart/handler/
rampart-core/src/main/java/or...
Author: veithen
Date: Sun Jul 30 13:14:10 2017
New Revision: 1803424
URL: http://svn.apache.org/viewvc?rev=1803424&view=rev
Log:
Fix Javadoc errors.
Modified:
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/NonceCache.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyValidatorCallbackHandler.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartConfigCallbackHandler.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartException.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/builder/BindingBuilder.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/RampartPolicyBuilder.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/OptimizePartsBuilder.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/CryptoConfig.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/KerberosConfig.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/RampartUtil.java
axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/RequiredParts.java
axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/SignedEncryptedParts.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Token.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenCanceler.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenIssuer.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TrustException.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAMLTokenValidator.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SCTIssuer.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenCancelerImpl.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/CommonUtil.java
axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/SAMLUtils.java
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/NonceCache.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/NonceCache.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/NonceCache.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/NonceCache.java Sun Jul 30 13:14:10 2017
@@ -81,9 +81,6 @@ public class NonceCache extends Abstract
super(maxLifeTime);
}
- /**
- * @inheritdoc
- */
public void addToCache(String id, String userName) {
Nonce nonce = new Nonce(id, userName);
@@ -98,9 +95,6 @@ public class NonceCache extends Abstract
}
- /**
- * @inheritdoc
- */
public boolean valueExistsInCache(String id, String userName) {
lock.lock();
@@ -115,9 +109,6 @@ public class NonceCache extends Abstract
return mapIdNonce.containsKey(nonce);
}
- /**
- * @inheritdoc
- */
public void clearCache() {
lock.lock();
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyBasedResultsValidator.java Sun Jul 30 13:14:10 2017
@@ -718,7 +718,7 @@ public class PolicyBasedResultsValidator
/**
* Evaluate whether a given certificate should be trusted.
* Hook to allow subclasses to implement custom validation methods however they see fit.
- * <p/>
+ * <p>
* Policy used in this implementation:
* 1. Search the keystore for the transmitted certificate
* 2. Search the keystore for a connection to the transmitted certificate
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyValidatorCallbackHandler.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyValidatorCallbackHandler.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyValidatorCallbackHandler.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/PolicyValidatorCallbackHandler.java Sun Jul 30 13:14:10 2017
@@ -24,10 +24,10 @@ import java.util.Vector;
*
* Example:
* <PRE>
- * <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
- * <ramp:policyValidatorCbClass>xx.yy.CustomPolicyValidator</ramp:policyValidatorCbClass>
+ * <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ * <ramp:policyValidatorCbClass>xx.yy.CustomPolicyValidator</ramp:policyValidatorCbClass>
* ...
- * </ramp:RampartConfig>
+ * </ramp:RampartConfig>
* </PRE>
*/
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartConfigCallbackHandler.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartConfigCallbackHandler.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartConfigCallbackHandler.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartConfigCallbackHandler.java Sun Jul 30 13:14:10 2017
@@ -23,10 +23,10 @@ import org.apache.rampart.policy.model.R
*
* Example:
* <PRE>
- * <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
- * <ramp:rampartConfigCallbackClass>o.a.r.ConfigUpdater</ramp:rampartConfigCallbackClass>
+ * <ramp:RampartConfig xmlns:ramp="http://ws.apache.org/rampart/policy">
+ * <ramp:rampartConfigCallbackClass>o.a.r.ConfigUpdater</ramp:rampartConfigCallbackClass>
* ...
- * </ramp:RampartConfig>
+ * </ramp:RampartConfig>
* </PRE>
*/
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartException.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartException.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartException.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/RampartException.java Sun Jul 30 13:14:10 2017
@@ -69,7 +69,6 @@ public class RampartException extends Ex
/**
* get the message from resource bundle.
- * <p/>
*
* @return the message translated from the property (message) file.
*/
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/builder/BindingBuilder.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/builder/BindingBuilder.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/builder/BindingBuilder.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/builder/BindingBuilder.java Sun Jul 30 13:14:10 2017
@@ -212,7 +212,6 @@ public abstract class BindingBuilder {
* @param rmd
* @param token
* @return
- * @throws WSSecurityException
* @throws RampartException
*/
protected WSSecEncryptedKey getEncryptedKeyBuilder(RampartMessageData rmd, Token token) throws RampartException {
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/handler/PostDispatchVerificationHandler.java Sun Jul 30 13:14:10 2017
@@ -48,49 +48,28 @@ public class PostDispatchVerificationHan
private HandlerDescription handlerDesc;
- /**
- * @see org.apache.axis2.engine.Handler#cleanup()
- */
public void cleanup() {
}
- /**
- * @see org.apache.axis2.engine.Handler#flowComplete(org.apache.axis2.context.MessageContext)
- */
public void flowComplete(MessageContext msgContext) {
}
- /**
- * @see org.apache.axis2.engine.Handler#getHandlerDesc()
- */
public HandlerDescription getHandlerDesc() {
return this.handlerDesc;
}
- /**
- * @see org.apache.axis2.engine.Handler#getName()
- */
public String getName() {
return "Post dispatch security verification handler";
}
- /**
- * @see org.apache.axis2.engine.Handler#getParameter(java.lang.String)
- */
public Parameter getParameter(String name) {
return this.handlerDesc.getParameter(name);
}
- /**
- * @see org.apache.axis2.engine.Handler#init(org.apache.axis2.description.HandlerDescription)
- */
public void init(HandlerDescription handlerDesc) {
this.handlerDesc = handlerDesc;
}
- /**
- * @see org.apache.axis2.engine.Handler#invoke(org.apache.axis2.context.MessageContext)
- */
public InvocationResponse invoke(MessageContext msgContext)
throws AxisFault {
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/RampartPolicyBuilder.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/RampartPolicyBuilder.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/RampartPolicyBuilder.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/RampartPolicyBuilder.java Sun Jul 30 13:14:10 2017
@@ -57,7 +57,7 @@ public class RampartPolicyBuilder {
* During this processing the method prepares the parameters in a format
* that is ready for processing by the WSS4J functions.
*
- * <p/>
+ * <p>
*
* The WSS4J policy enabled handler takes this data block to control the
* setup of the security header.
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/OptimizePartsBuilder.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/OptimizePartsBuilder.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/OptimizePartsBuilder.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/builders/OptimizePartsBuilder.java Sun Jul 30 13:14:10 2017
@@ -32,15 +32,15 @@ import org.apache.rampart.policy.model.R
* This clase deserialize the following XML fragment inside the RampartConfig.
* Example
<pre>
-<ramp:optimizeParts><br />
-<ramp:expressions><br />
-<ramp:expression>//ns1:data1</ramp:expression><br />
-<ramp:expression>//ns2:data2</ramp:expression><br />
-</ramp:expressions><br />
- <ramp:namespaces><br />
-<nampespace uri="http://test1.com" prefix="ns1"/><br />
-<nampespace uri="http://test2.com" prefix="ns2"/><br />
-</ramp:namespaces><br />
+<ramp:optimizeParts>
+<ramp:expressions>
+<ramp:expression>//ns1:data1</ramp:expression>
+<ramp:expression>//ns2:data2</ramp:expression>
+</ramp:expressions>
+ <ramp:namespaces>
+<nampespace uri="http://test1.com" prefix="ns1"/>
+<nampespace uri="http://test2.com" prefix="ns2"/>
+</ramp:namespaces>
</ramp:optimizeParts>
</pre>
* @see OptimizePartsConfig
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/CryptoConfig.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/CryptoConfig.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/CryptoConfig.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/CryptoConfig.java Sun Jul 30 13:14:10 2017
@@ -32,11 +32,11 @@ import java.util.Properties;
*
* Example:
<pre>
-<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
- <ramp:property name="keystoreType">JKS</ramp:property>
- <ramp:property name="keystoreFile">/path/to/file.jks</ramp:property>
- <ramp:property name="keystorePassword">password</ramp:property>
-</ramp:crypto>
+<ramp:crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ <ramp:property name="keystoreType">JKS</ramp:property>
+ <ramp:property name="keystoreFile">/path/to/file.jks</ramp:property>
+ <ramp:property name="keystorePassword">password</ramp:property>
+</ramp:crypto>
</pre>
*/
public class CryptoConfig implements Assertion {
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/KerberosConfig.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/KerberosConfig.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/KerberosConfig.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/policy/model/KerberosConfig.java Sun Jul 30 13:14:10 2017
@@ -189,7 +189,7 @@ public class KerberosConfig implements A
* The class will be loaded using current service's {@link org.apache.axis2.description.AxisService#getClassLoader() classloader}.
* </p>
*
- * @param kerberosTokenValidatorClass A fully qualifier class name that implements {@link org.apache.ws.security.validate.KerberosTokenValidator}.
+ * @param kerberosTokenDecoderClass A fully qualifier class name that implements {@link org.apache.ws.security.validate.KerberosTokenValidator}.
*/
public void setKerberosTokenDecoderClass(String kerberosTokenDecoderClass) {
this.kerberosTokenDecoderClass = kerberosTokenDecoderClass;
@@ -243,9 +243,8 @@ public class KerberosConfig implements A
/**
* Enables Kerberos credential delegation. If credential delegation is requested, the initiator's TGT (Ticket
- * granting ticket) is propagated to the receiver along with the TGS(Ticket granting service). <br/>
- * <br/>
- *
+ * granting ticket) is propagated to the receiver along with the TGS(Ticket granting service).
+ * <p>
* Enabling delegation requires <b>forwardable=true</b> property to be added to the <b>[libdefaults]</b> section in
* the Kerberos setup configuration.KDC should also be explicitly configured to allow delegation as it is considered
* a security issue and is disabled by default.
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/Axis2Util.java Sun Jul 30 13:14:10 2017
@@ -79,7 +79,6 @@ public class Axis2Util {
* Creates a DOM Document using the SOAP Envelope.
* @param env An org.apache.axiom.soap.SOAPEnvelope instance
* @return Returns the DOM Document of the given SOAP Envelope.
- * @throws Exception
*/
public static Document getDocumentFromSOAPEnvelope(SOAPEnvelope env, boolean useDoom)
throws WSSecurityException {
Modified: axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/RampartUtil.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/RampartUtil.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/RampartUtil.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-core/src/main/java/org/apache/rampart/util/RampartUtil.java Sun Jul 30 13:14:10 2017
@@ -305,7 +305,7 @@ public class RampartUtil {
/**
* Perform a callback to get a password.
- * <p/>
+ * <p>
* The called back function gets an indication why to provide a password:
* to produce a UsernameToken, Signature, or a password (key) for a given
* name.
@@ -510,17 +510,17 @@ public class RampartUtil {
/**
* Retrieve policy using metadata reference
- * <wsa:Metadata xmlns:wsa="http://www.w3.org/2005/08/addressing">
- * <mex:Metadata
+ * <pre> <wsa:Metadata xmlns:wsa="http://www.w3.org/2005/08/addressing">
+ * <mex:Metadata
* xmlns:mex="http://schemas.xmlsoap.org/ws/2004/09/mex"
- * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- * <mex:MetadataSection>
- * <mex:MetadataReference>
- * <wsa:Address>http://address/of/mex/service</wsa:Address>
- * </mex:MetadataReference>
- * </mex:MetadataSection>
- * </mex:Metadata>
- * </wsa:Metadata>
+ * xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ * <mex:MetadataSection>
+ * <mex:MetadataReference>
+ * <wsa:Address>http://address/of/mex/service</wsa:Address>
+ * </mex:MetadataReference>
+ * </mex:MetadataSection>
+ * </mex:Metadata>
+ * </wsa:Metadata></pre>
* @param mex Metadata element
* @return Policy from the mex service
*/
@@ -1487,7 +1487,7 @@ public class RampartUtil {
}
/**
- * Scan through <code>WSHandlerResult<code> list for a Username token and return
+ * Scan through {@link WSHandlerResult} list for a Username token and return
* the username if a Username Token found
* @param results
* @return
Modified: axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/RequiredParts.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/RequiredParts.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/RequiredParts.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/RequiredParts.java Sun Jul 30 13:14:10 2017
@@ -43,7 +43,7 @@ public class RequiredParts extends Abstr
}
/**
- * @param headers The headers to set.
+ * @param header The header to set.
*/
public void addHeader(Header header) {
this.headers.add(header);
Modified: axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/SignedEncryptedParts.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/SignedEncryptedParts.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/SignedEncryptedParts.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-policy/src/main/java/org/apache/ws/secpolicy/model/SignedEncryptedParts.java Sun Jul 30 13:14:10 2017
@@ -89,7 +89,7 @@ public class SignedEncryptedParts extend
}
/**
- * @param headers The headers to set.
+ * @param header The header to set.
*/
public void addHeader(Header header) {
this.headers.add(header);
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Token.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Token.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Token.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/Token.java Sun Jul 30 13:14:10 2017
@@ -49,7 +49,7 @@ import org.apache.ws.security.util.XmlSc
* 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
* present state and the previous state.
- * <p/>
+ * <p>
* These tokens are stored using the storage mechanism provided via the <code>TokenStorage</code> interface.
*
* @see org.apache.rahas.TokenStorage
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenCanceler.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenCanceler.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenCanceler.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenCanceler.java Sun Jul 30 13:14:10 2017
@@ -32,7 +32,7 @@ public interface TokenCanceler {
/**
* Set the configuration file of this TokenCanceller.
- * <p/>
+ * <p>
* This is the text value of the <configuration-file> element of the
* token-dispatcher-configuration
*
@@ -42,7 +42,7 @@ public interface TokenCanceler {
/**
* Set the configuration element of this TokenCanceller.
- * <p/>
+ * <p>
* This is the <configuration> element of the
* token-dispatcher-configuration
*
@@ -52,7 +52,7 @@ public interface TokenCanceler {
/**
* Set the name of the configuration parameter.
- * <p/>
+ * <p>
* If this is used then there must be a
* <code>org.apache.axis2.description.Parameter</code> object available in
* the via the messageContext when the <code>TokenIssuer</code> is called.
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenIssuer.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenIssuer.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenIssuer.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TokenIssuer.java Sun Jul 30 13:14:10 2017
@@ -46,7 +46,7 @@ public interface TokenIssuer {
/**
* Set the configuration file of this TokenIssuer.
- * <p/>
+ * <p>
* This is the text value of the <configuration-file> element of the
* token-dispatcher-configuration
*
@@ -56,7 +56,7 @@ public interface TokenIssuer {
/**
* Set the configuration element of this TokenIssuer.
- * <p/>
+ * <p>
* This is the <configuration> element of the
* token-dispatcher-configuration
*
@@ -66,7 +66,7 @@ public interface TokenIssuer {
/**
* Set the name of the configuration parameter.
- * <p/>
+ * <p>
* If this is used then there must be a
* <code>org.apache.axis2.description.Parameter</code> object available in
* the via the messageContext when the <code>TokenIssuer</code> is called.
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TrustException.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TrustException.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TrustException.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/TrustException.java Sun Jul 30 13:14:10 2017
@@ -95,7 +95,6 @@ public class TrustException extends Exce
/**
* get the message from resource bundle.
- * <p/>
*
* @return the message translated from the property (message) file.
*/
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAML2TokenIssuer.java Sun Jul 30 13:14:10 2017
@@ -132,23 +132,23 @@ public class SAML2TokenIssuer implements
/**
* This method prepares the final response. This method will create a request security token response as
* specified in WS-Trust specification. The equivalent XML would take following format,
- * <wst:RequestSecurityTokenResponse xmlns:wst="...">
- * <wst:TokenType>...</wst:TokenType>
- * <wst:RequestedSecurityToken>...</wst:RequestedSecurityToken>
+ * <pre> <wst:RequestSecurityTokenResponse xmlns:wst="...">
+ * <wst:TokenType>...</wst:TokenType>
+ * <wst:RequestedSecurityToken>...</wst:RequestedSecurityToken>
* ...
- * <wsp:AppliesTo xmlns:wsp="...">...</wsp:AppliesTo>
- * <wst:RequestedAttachedReference>
+ * <wsp:AppliesTo xmlns:wsp="...">...</wsp:AppliesTo>
+ * <wst:RequestedAttachedReference>
* ...
- * </wst:RequestedAttachedReference>
- * <wst:RequestedUnattachedReference>
+ * </wst:RequestedAttachedReference>
+ * <wst:RequestedUnattachedReference>
* ...
- * </wst:RequestedUnattachedReference>
- * <wst:RequestedProofToken>...</wst:RequestedProofToken>
- * <wst:Entropy>
- * <wst:BinarySecret>...</wst:BinarySecret>
- * </wst:Entropy>
- * <wst:Lifetime>...</wst:Lifetime>
- * </wst:RequestSecurityTokenResponse>
+ * </wst:RequestedUnattachedReference>
+ * <wst:RequestedProofToken>...</wst:RequestedProofToken>
+ * <wst:Entropy>
+ * <wst:BinarySecret>...</wst:BinarySecret>
+ * </wst:Entropy>
+ * <wst:Lifetime>...</wst:Lifetime>
+ * </wst:RequestSecurityTokenResponse></pre>
*
* Thus the RequestedSecurityToken will have SAML2 assertion passed.
* @param rahasData The configuration data which comes with RST
@@ -241,59 +241,59 @@ public class SAML2TokenIssuer implements
/**
* This methods builds the SAML2 assertion. The equivalent XML would look as follows,
- * <saml:Assertion
+ * <pre><saml:Assertion
* xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
* xmlns:xs="http://www.w3.org/2001/XMLSchema"
* xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
* ID="b07b804c-7c29-ea16-7300-4f3d6f7928ac"
* Version="2.0"
- * IssueInstant="2004-12-05T09:22:05Z">
- * <saml:Issuer>https://idp.example.org/SAML2</saml:Issuer>
- * <ds:Signature
- * xmlns:ds="http://www.w3.org/2000/09/xmldsig#">...</ds:Signature>
- * <saml:Subject>
- * <saml:NameID
- * Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">
+ * IssueInstant="2004-12-05T09:22:05Z">
+ * <saml:Issuer>https://idp.example.org/SAML2</saml:Issuer>
+ * <ds:Signature
+ * xmlns:ds="http://www.w3.org/2000/09/xmldsig#">...</ds:Signature>
+ * <saml:Subject>
+ * <saml:NameID
+ * Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient">
* 3f7b3dcf-1674-4ecd-92c8-1544f346baf8
- * </saml:NameID>
- * <saml:SubjectConfirmation
- * Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
- * <saml:SubjectConfirmationData
+ * </saml:NameID>
+ * <saml:SubjectConfirmation
+ * Method="urn:oasis:names:tc:SAML:2.0:cm:bearer">
+ * <saml:SubjectConfirmationData
* InResponseTo="aaf23196-1773-2113-474a-fe114412ab72"
* Recipient="https://sp.example.com/SAML2/SSO/POST"
- * NotOnOrAfter="2004-12-05T09:27:05Z"/>
- * </saml:SubjectConfirmation>
- * </saml:Subject>
- * <saml:Conditions
+ * NotOnOrAfter="2004-12-05T09:27:05Z"/>
+ * </saml:SubjectConfirmation>
+ * </saml:Subject>
+ * <saml:Conditions
* NotBefore="2004-12-05T09:17:05Z"
- * NotOnOrAfter="2004-12-05T09:27:05Z">
- * <saml:AudienceRestriction>
- * <saml:Audience>https://sp.example.com/SAML2</saml:Audience>
- * </saml:AudienceRestriction>
- * </saml:Conditions>
- * <saml:AuthnStatement
+ * NotOnOrAfter="2004-12-05T09:27:05Z">
+ * <saml:AudienceRestriction>
+ * <saml:Audience>https://sp.example.com/SAML2</saml:Audience>
+ * </saml:AudienceRestriction>
+ * </saml:Conditions>
+ * <saml:AuthnStatement
* AuthnInstant="2004-12-05T09:22:00Z"
- * SessionIndex="b07b804c-7c29-ea16-7300-4f3d6f7928ac">
- * <saml:AuthnContext>
- * <saml:AuthnContextClassRef>
+ * SessionIndex="b07b804c-7c29-ea16-7300-4f3d6f7928ac">
+ * <saml:AuthnContext>
+ * <saml:AuthnContextClassRef>
* urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
- * </saml:AuthnContextClassRef>
- * </saml:AuthnContext>
- * </saml:AuthnStatement>
- * <saml:AttributeStatement>
- * <saml:Attribute
+ * </saml:AuthnContextClassRef>
+ * </saml:AuthnContext>
+ * </saml:AuthnStatement>
+ * <saml:AttributeStatement>
+ * <saml:Attribute
* xmlns:x500="urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500"
* x500:Encoding="LDAP"
* NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
* Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1"
- * FriendlyName="eduPersonAffiliation">
- * <saml:AttributeValue
- * xsi:type="xs:string">member</saml:AttributeValue>
- * <saml:AttributeValue
- * xsi:type="xs:string">staff</saml:AttributeValue>
- * </saml:Attribute>
- * </saml:AttributeStatement>
- * </saml:Assertion>
+ * FriendlyName="eduPersonAffiliation">
+ * <saml:AttributeValue
+ * xsi:type="xs:string">member</saml:AttributeValue>
+ * <saml:AttributeValue
+ * xsi:type="xs:string">staff</saml:AttributeValue>
+ * </saml:Attribute>
+ * </saml:AttributeStatement>
+ * </saml:Assertion></pre>
*
* Reference - en.wikipedia.org/wiki/SAML_2.0#SAML_2.0_Assertions
* @param doc The Document which comprises SAML 2 assertion.
@@ -354,20 +354,20 @@ public class SAML2TokenIssuer implements
/**
* This method will create a SAML 2 subject based on Holder of Key confirmation method.
* The relevant XML would look as follows,
- * <saml2:Subject>
- * <saml2:NameID>
+ * <pre> <saml2:Subject>
+ * <saml2:NameID>
* ...
- * </saml2:NameID>
- * <saml2:SubjectConfirmation
- * Method="urn:oasis:names:tc:SAML:2.0:cm:holder-of-key">
- * <saml2:SubjectConfirmationData
- * xsi:type="saml2:KeyInfoConfirmationDataType">
- * <ds:KeyInfo>
- * <ds:KeyValue>...</ds:KeyValue>
- * </ds:KeyInfo>
- * </saml2:SubjectConfirmationData>
- * </saml2:SubjectConfirmation>
- * </saml2:Subject>
+ * </saml2:NameID>
+ * <saml2:SubjectConfirmation
+ * Method="urn:oasis:names:tc:SAML:2.0:cm:holder-of-key">
+ * <saml2:SubjectConfirmationData
+ * xsi:type="saml2:KeyInfoConfirmationDataType">
+ * <ds:KeyInfo>
+ * <ds:KeyValue>...</ds:KeyValue>
+ * </ds:KeyInfo>
+ * </saml2:SubjectConfirmationData>
+ * </saml2:SubjectConfirmation>
+ * </saml2:Subject></pre>
*
* KeyInfo can be created based on public key or symmetric key. That is decided by looking at
* the RahasData.getKeyType. TODO make sure this implementation is correct.
@@ -438,19 +438,19 @@ public class SAML2TokenIssuer implements
/**
* This method creates a subject element with the bearer subject confirmation method.
- * <saml:Subject>
- * <saml:NameIdentifier
+ * <pre> <saml:Subject>
+ * <saml:NameIdentifier
* NameQualifier="www.example.com"
* Format="urn:oasis:names:tc:SAML:1.1:nameid-
- * format:X509SubjectName">
+ * format:X509SubjectName">
* uid=joe,ou=people,ou=saml-demo,o=baltimore.com
- * </saml:NameIdentifier>
- * <saml:SubjectConfirmation>
- * <saml:ConfirmationMethod>
+ * </saml:NameIdentifier>
+ * <saml:SubjectConfirmation>
+ * <saml:ConfirmationMethod>
* urn:oasis:names:tc:SAML:1.0:cm:bearer
- * </saml:ConfirmationMethod>
- * </saml:SubjectConfirmation>
- * </saml:Subject>
+ * </saml:ConfirmationMethod>
+ * </saml:SubjectConfirmation>
+ * </saml:Subject></pre>
* @param data RahasData element
* @return SAML 2.0 Subject element with Bearer subject confirmation
* @throws org.apache.rahas.TrustException if an error occurred while creating the subject.
@@ -574,19 +574,19 @@ public class SAML2TokenIssuer implements
/**
* This method creates an AttributeStatement. The relevant XML would look like as follows,
- * <saml:AttributeStatement>
- * <saml:Attribute
+ * <pre> <saml:AttributeStatement>
+ * <saml:Attribute
* xmlns:x500="urn:oasis:names:tc:SAML:2.0:profiles:attribute:X500"
* x500:Encoding="LDAP"
* NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri"
* Name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1"
- * FriendlyName="eduPersonAffiliation">
- * <saml:AttributeValue
- * xsi:type="xs:string">member</saml:AttributeValue>
- * <saml:AttributeValue
- * xsi:type="xs:string">staff</saml:AttributeValue>
- * </saml:Attribute>
- * </saml:AttributeStatement>
+ * FriendlyName="eduPersonAffiliation">
+ * <saml:AttributeValue
+ * xsi:type="xs:string">member</saml:AttributeValue>
+ * <saml:AttributeValue
+ * xsi:type="xs:string">staff</saml:AttributeValue>
+ * </saml:Attribute>
+ * </saml:AttributeStatement></pre>
* Reference - http://en.wikipedia.org/wiki/SAML_2.0#SAML_2.0_Assertions
* @param data The RahasData which carry information about RST.
* @return An AttributeStatement with filled attributes retrieved by calling callback class.
@@ -644,15 +644,15 @@ public class SAML2TokenIssuer implements
/**
* This method creates an authentication statement. The equivalent XML would look as follows,
- * <saml:AuthnStatement
+ * <pre> <saml:AuthnStatement
* AuthnInstant="2004-12-05T09:22:00Z"
- * SessionIndex="b07b804c-7c29-ea16-7300-4f3d6f7928ac">
- * <saml:AuthnContext>
- * <saml:AuthnContextClassRef>
+ * SessionIndex="b07b804c-7c29-ea16-7300-4f3d6f7928ac">
+ * <saml:AuthnContext>
+ * <saml:AuthnContextClassRef>
* urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport
- * </saml:AuthnContextClassRef>
- * </saml:AuthnContext>
- * </saml:AuthnStatement>
+ * </saml:AuthnContextClassRef>
+ * </saml:AuthnContext>
+ * </saml:AuthnStatement></pre>
* @param data The RahasData which carry information about RST.
* @return OpenSAML representation of an AuthnStatement class.
* @throws TrustException If an error occurred while creating the authentication statement.
@@ -777,30 +777,18 @@ public class SAML2TokenIssuer implements
}
- /**
- * @inheritDoc
- */
public String getResponseAction(RahasData data) throws TrustException {
return null;
}
- /**
- * @inheritDoc
- */
public void setConfigurationFile(String configFile) {
this.configFile = configFile;
}
- /**
- * @inheritDoc
- */
public void setConfigurationElement(OMElement configElement) {
this.configElement = configElement;
}
- /**
- * @inheritDoc
- */
public void setConfigurationParamName(String configParamName) {
this.configParamName = configParamName;
}
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAMLTokenValidator.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAMLTokenValidator.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAMLTokenValidator.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SAMLTokenValidator.java Sun Jul 30 13:14:10 2017
@@ -210,7 +210,7 @@ public class SAMLTokenValidator implemen
// ========================================================================
/**
- * Set the configuration file of this TokenValidator. <p/> This is the text
+ * Set the configuration file of this TokenValidator. <p> This is the text
* value of the <configuration-file> element of the
* token-dispatcher-configuration
*
@@ -221,7 +221,7 @@ public class SAMLTokenValidator implemen
}
/**
- * Set the name of the configuration parameter. <p/> If this is used then
+ * Set the name of the configuration parameter. <p> If this is used then
* there must be a <code>org.apache.axis2.description.Parameter</code>
* object available in the via the messageContext when the
* <code>TokenValidator</code> is called.
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SCTIssuer.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SCTIssuer.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SCTIssuer.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/SCTIssuer.java Sun Jul 30 13:14:10 2017
@@ -48,7 +48,7 @@ public class SCTIssuer implements TokenI
/**
* Issue a {@link SecurityContextToken} based on the wsse:Signature or
* wsse:UsernameToken
- * <p/>
+ * <p>
* This will support returning the SecurityContextToken with the following
* types of wst:RequestedProof tokens:
* <ul>
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenCancelerImpl.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenCancelerImpl.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenCancelerImpl.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/TokenCancelerImpl.java Sun Jul 30 13:14:10 2017
@@ -154,7 +154,7 @@ public class TokenCancelerImpl implement
/**
* Set the configuration file of this TokenCanceller.
- * <p/>
+ * <p>
* This is the text value of the <configuration-file> element of the
* token-dispatcher-configuration
*
@@ -166,7 +166,7 @@ public class TokenCancelerImpl implement
/**
* Set the configuration element of this TokenCanceller.
- * <p/>
+ * <p>
* This is the <configuration> element of the
* token-dispatcher-configuration
*
@@ -178,7 +178,7 @@ public class TokenCancelerImpl implement
/**
* Set the name of the configuration parameter.
- * <p/>
+ * <p>
* If this is used then there must be a
* <code>org.apache.axis2.description.Parameter</code> object available in
* the via the messageContext when the <code>TokenIssuer</code> is called.
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/CommonUtil.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/CommonUtil.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/CommonUtil.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/CommonUtil.java Sun Jul 30 13:14:10 2017
@@ -204,27 +204,27 @@ public class CommonUtil {
* 3. Try create token configuration using a parameter name in message context.
* The issuer configuration would look like as follows,
*
- * <saml-issuer-config>
- * <issuerName>Test_STS</issuerName>
- * <issuerKeyAlias>ip</issuerKeyAlias>
- * <issuerKeyPassword>password</issuerKeyPassword>
- * <cryptoProperties>
- * <crypto provider="org.apache.ws.security.components.crypto.Merlin">
- * <property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</property>
- * <property name="org.apache.ws.security.crypto.merlin.file">META-INF/rahas-sts.jks</property>
- * <property name="org.apache.ws.security.crypto.merlin.keystore.password">password</property>
- * </crypto>
- * </cryptoProperties>
- * <timeToLive>300000</timeToLive>
- * <keySize>256</keySize>
- * <addRequestedAttachedRef />
- * <addRequestedUnattachedRef />
- * <keyComputation>2</keyComputation>
- * <proofKeyType>BinarySecret</proofKeyType>
- * <trusted-services>
- * <service alias="bob">http://localhost:8080/axis2/services/STS</service>
- * </trusted-services>
- * </saml-issuer-config>
+ * <pre> <saml-issuer-config>
+ * <issuerName>Test_STS</issuerName>
+ * <issuerKeyAlias>ip</issuerKeyAlias>
+ * <issuerKeyPassword>password</issuerKeyPassword>
+ * <cryptoProperties>
+ * <crypto provider="org.apache.ws.security.components.crypto.Merlin">
+ * <property name="org.apache.ws.security.crypto.merlin.keystore.type">JKS</property>
+ * <property name="org.apache.ws.security.crypto.merlin.file">META-INF/rahas-sts.jks</property>
+ * <property name="org.apache.ws.security.crypto.merlin.keystore.password">password</property>
+ * </crypto>
+ * </cryptoProperties>
+ * <timeToLive>300000</timeToLive>
+ * <keySize>256</keySize>
+ * <addRequestedAttachedRef />
+ * <addRequestedUnattachedRef />
+ * <keyComputation>2</keyComputation>
+ * <proofKeyType>BinarySecret</proofKeyType>
+ * <trusted-services>
+ * <service alias="bob">http://localhost:8080/axis2/services/STS</service>
+ * </trusted-services>
+ * </saml-issuer-config></pre>
*
* @param configElement Configuration as an OMElement.
* @param configFile Configuration as a file.
Modified: axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/SAMLUtils.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/SAMLUtils.java?rev=1803424&r1=1803423&r2=1803424&view=diff
==============================================================================
--- axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/SAMLUtils.java (original)
+++ axis/axis2/java/rampart/trunk/modules/rampart-trust/src/main/java/org/apache/rahas/impl/util/SAMLUtils.java Sun Jul 30 13:14:10 2017
@@ -195,9 +195,9 @@ public class SAMLUtils {
/**
* Creates the subject confirmation method.
* Relevant XML element would look like as follows,
- * <saml:ConfirmationMethod>
+ * <pre> <saml:ConfirmationMethod>
* urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
- * </saml:ConfirmationMethod>
+ * </saml:ConfirmationMethod></pre>
* @param confirmationMethod Name of the actual confirmation method. Could be
* holder-of-key - "urn:oasis:names:tc:SAML:1.0:cm:holder-of-key"
* sender-vouches - "urn:oasis:names:tc:SAML:1.0:cm:sender-vouches"
@@ -217,11 +217,11 @@ public class SAMLUtils {
/**
* Creates opensaml SubjectConfirmation representation. The relevant XML would looks as follows,
- * <saml:SubjectConfirmation>
- * <saml:ConfirmationMethod>
+ * <pre> <saml:SubjectConfirmation>
+ * <saml:ConfirmationMethod>
* urn:oasis:names:tc:SAML:1.0:cm:sender-vouches
- * </saml:ConfirmationMethod>
- * </saml:SubjectConfirmation>
+ * </saml:ConfirmationMethod>
+ * </saml:SubjectConfirmation></pre>
* @param confirmationMethod The subject confirmation method. Bearer, Sender-Vouches or Holder-Of-Key.
* @param keyInfoContent The KeyInfo content. According to SPEC (SAML 1.1) this could be null.
* @return OpenSAML representation of SubjectConfirmation.
@@ -245,21 +245,21 @@ public class SAMLUtils {
/**
* Creates an opensaml Subject representation. The relevant XML would looks as follows,
- * <saml:Subject>
- * <saml:NameIdentifier
+ * <pre> <saml:Subject>
+ * <saml:NameIdentifier
* NameQualifier="www.example.com"
- * Format="...">
+ * Format="...">
* uid=joe,ou=people,ou=saml-demo,o=baltimore.com
- * </saml:NameIdentifier>
- * <saml:SubjectConfirmation>
- * <saml:ConfirmationMethod>
+ * </saml:NameIdentifier>
+ * <saml:SubjectConfirmation>
+ * <saml:ConfirmationMethod>
* urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
- * </saml:ConfirmationMethod>
- * <ds:KeyInfo>
- * <ds:KeyValue>...</ds:KeyValue>
- * </ds:KeyInfo>
- * </saml:SubjectConfirmation>
- * </saml:Subject>
+ * </saml:ConfirmationMethod>
+ * <ds:KeyInfo>
+ * <ds:KeyValue>...</ds:KeyValue>
+ * </ds:KeyInfo>
+ * </saml:SubjectConfirmation>
+ * </saml:Subject></pre>
* @param nameIdentifier Represent the "NameIdentifier" of XML element above.
* @param confirmationMethod Represent the bearer, HOK or Sender-Vouches.
* @param keyInfoContent Key info information. This could be null.
@@ -281,19 +281,19 @@ public class SAMLUtils {
/**
* Creates an AuthenticationStatement. The relevant XML element looks as follows,
- * <AuthenticationStatement
+ * <pre> <AuthenticationStatement
* AuthenticationInstant="2003-04-17T00:46:00Z"
- * AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
- * <Subject>
- * <NameIdentifier
- * Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
- * scott@example.org</NameIdentifier>
- * <SubjectConfirmation>
- * <ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</ConfirmationMethod>
- * </SubjectConfirmation>
- * </Subject>
- * <SubjectLocality IPAddress="127.0.0.1"/>
- * </AuthenticationStatement>
+ * AuthenticationMethod="urn:oasis:names:tc:SAML:1.0:am:password">
+ * <Subject>
+ * <NameIdentifier
+ * Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress">
+ * scott@example.org</NameIdentifier>
+ * <SubjectConfirmation>
+ * <ConfirmationMethod>urn:oasis:names:tc:SAML:1.0:cm:bearer</ConfirmationMethod>
+ * </SubjectConfirmation>
+ * </Subject>
+ * <SubjectLocality IPAddress="127.0.0.1"/>
+ * </AuthenticationStatement></pre>
* @param subject OpenSAML Subject implementation.
* @param authenticationMethod How subject is authenticated ? i.e. by using a password, kerberos, certificate
* etc ... The method is defined as a URL in SAML specification.
@@ -316,33 +316,33 @@ public class SAMLUtils {
}
/**Creates an attribute statement. Sample attribute statement would look like follows,
- * <saml:AttributeStatement>
- * <saml:Subject>
- * <saml:NameIdentifier
+ * <pre> <saml:AttributeStatement>
+ * <saml:Subject>
+ * <saml:NameIdentifier
* NameQualifier="www.example.com"
- * Format="...">
+ * Format="...">
* uid=joe,ou=people,ou=saml-demo,o=baltimore.com
- * </saml:NameIdentifier>
- * <saml:SubjectConfirmation>
- * <saml:ConfirmationMethod>
+ * </saml:NameIdentifier>
+ * <saml:SubjectConfirmation>
+ * <saml:ConfirmationMethod>
* urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
- * </saml:ConfirmationMethod>
- * <ds:KeyInfo>
- * <ds:KeyValue>...</ds:KeyValue>
- * </ds:KeyInfo>
- * </saml:SubjectConfirmation>
- * </saml:Subject>
- * <saml:Attribute
+ * </saml:ConfirmationMethod>
+ * <ds:KeyInfo>
+ * <ds:KeyValue>...</ds:KeyValue>
+ * </ds:KeyInfo>
+ * </saml:SubjectConfirmation>
+ * </saml:Subject>
+ * <saml:Attribute
* AttributeName="MemberLevel"
- * AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
- * <saml:AttributeValue>gold</saml:AttributeValue>
- * </saml:Attribute>
- * <saml:Attribute
+ * AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
+ * <saml:AttributeValue>gold</saml:AttributeValue>
+ * </saml:Attribute>
+ * <saml:Attribute
* AttributeName="E-mail"
- * AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
- * <saml:AttributeValue>joe@yahoo.com</saml:AttributeValue>
- * </saml:Attribute>
- * </saml:AttributeStatement>
+ * AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
+ * <saml:AttributeValue>joe@yahoo.com</saml:AttributeValue>
+ * </saml:Attribute>
+ * </saml:AttributeStatement></pre>
*
* @param subject The OpenSAML representation of the Subject.
* @param attributeList List of attribute values to include within the message.
@@ -363,9 +363,9 @@ public class SAMLUtils {
/**
* Creates Conditions object. Analogous XML element is as follows,
- * <saml:Conditions>
+ * <pre><saml:Conditions
* NotBefore="2002-06-19T16:53:33.173Z"
- * NotOnOrAfter="2002-06-19T17:08:33.173Z"/>
+ * NotOnOrAfter="2002-06-19T17:08:33.173Z"/></pre>
* @param notBefore The validity of the Assertion starts from this value.
* @param notOnOrAfter The validity ends from this value.
* @return OpenSAML Conditions object.
@@ -383,43 +383,43 @@ public class SAMLUtils {
/**
* This method creates the final SAML assertion. The final SAML assertion would looks like as follows,
- * <saml:Assertion AssertionID="_a75adf55-01d7-40cc-929f-dbd8372ebdfc"
+ * <pre> <saml:Assertion AssertionID="_a75adf55-01d7-40cc-929f-dbd8372ebdfc"
* IssueInstant="2003-04-17T00:46:02Z"
* Issuer="www.opensaml.org"
* MajorVersion="1"
* MinorVersion="1"
- * xmlns="urn:oasis:names:tc:SAML:1.0:assertion">
- * <saml:Conditions>
+ * xmlns="urn:oasis:names:tc:SAML:1.0:assertion">
+ * <saml:Conditions>
* NotBefore="2002-06-19T16:53:33.173Z"
- * NotOnOrAfter="2002-06-19T17:08:33.173Z"/>
- * <saml:AttributeStatement>
- * <saml:Subject>
- * <saml:NameIdentifier
+ * NotOnOrAfter="2002-06-19T17:08:33.173Z"/>
+ * <saml:AttributeStatement>
+ * <saml:Subject>
+ * <saml:NameIdentifier
* NameQualifier="www.example.com"
- * Format="...">
+ * Format="...">
* uid=joe,ou=people,ou=saml-demo,o=baltimore.com
- * </saml:NameIdentifier>
- * <saml:SubjectConfirmation>
- * <saml:ConfirmationMethod>
+ * </saml:NameIdentifier>
+ * <saml:SubjectConfirmation>
+ * <saml:ConfirmationMethod>
* urn:oasis:names:tc:SAML:1.0:cm:holder-of-key
- * </saml:ConfirmationMethod>
- * <ds:KeyInfo>
- * <ds:KeyValue>...</ds:KeyValue>
- * </ds:KeyInfo>
- * </saml:SubjectConfirmation>
- * </saml:Subject>
- * <saml:Attribute
+ * </saml:ConfirmationMethod>
+ * <ds:KeyInfo>
+ * <ds:KeyValue>...</ds:KeyValue>
+ * </ds:KeyInfo>
+ * </saml:SubjectConfirmation>
+ * </saml:Subject>
+ * <saml:Attribute
* AttributeName="MemberLevel"
- * AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
- * <saml:AttributeValue>gold</saml:AttributeValue>
- * </saml:Attribute>
- * <saml:Attribute
- * AttributeName="E-mail" AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
- * <saml:AttributeValue>joe@yahoo.com</saml:AttributeValue>
- * </saml:Attribute>
- * </saml:AttributeStatement>
- * <ds:Signature>...</ds:Signature>
- * </saml:Assertion>
+ * AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
+ * <saml:AttributeValue>gold</saml:AttributeValue>
+ * </saml:Attribute>
+ * <saml:Attribute
+ * AttributeName="E-mail" AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
+ * <saml:AttributeValue>joe@yahoo.com</saml:AttributeValue>
+ * </saml:Attribute>
+ * </saml:AttributeStatement>
+ * <ds:Signature>...</ds:Signature>
+ * </saml:Assertion></pre>
* @param issuerName Represents the "Issuer" in Assertion.
* @param notBefore The Condition's NotBefore value
* @param notOnOrAfter The Condition's NotOnOrAfter value
@@ -442,11 +442,11 @@ public class SAMLUtils {
/**
* Creates a SAML attribute similar to following,
- * <saml:Attribute
+ * <pre> <saml:Attribute
* AttributeName="MemberLevel"
- * AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
- * <saml:AttributeValue>gold</saml:AttributeValue>
- * </saml:Attribute>
+ * AttributeNamespace="http://www.oasis.open.org/Catalyst2002/attributes">
+ * <saml:AttributeValue>gold</saml:AttributeValue>
+ * </saml:Attribute></pre>
* @param name attribute name
* @param namespace attribute namespace.
* @param value attribute value.
@@ -485,11 +485,11 @@ public class SAMLUtils {
/**
* Creates a KeyInfo element given EncryptedKey. The relevant XML would looks as follows,
- * <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
- * <xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
+ * <pre> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
+ * <xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
* ....
- * </xenc:EncryptedKey>
- * </ds:KeyInfo>
+ * </xenc:EncryptedKey>
+ * </ds:KeyInfo></pre>
* @param encryptedKey The OpemSAML representation of encrypted key.
* @return The appropriate opensaml representation of the KeyInfo.
* @throws org.apache.rahas.TrustException If unable to find the builder.
@@ -504,11 +504,11 @@ public class SAMLUtils {
/**
* Creates a KeyInfo element given EncryptedKey. The relevant XML would looks as follows,
- * <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
- * <X509Data xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
+ * <pre> <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
+ * <X509Data xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
* ....
- * </X509Data>
- * </ds:KeyInfo>
+ * </X509Data>
+ * </ds:KeyInfo></pre>
* @param x509Data The OpemSAML representation X509Data
* @return The appropriate opensaml representation of the KeyInfo.
* @throws org.apache.rahas.TrustException If unable to find the builder.
@@ -526,27 +526,27 @@ public class SAMLUtils {
/**
* This method will created the "EncryptedKey" of a SAML assertion.
* An encrypted key would look like as follows,
- * <xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
+ * <pre> <xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"
* xmlns:ds="http://www.w3.org/2000/09/xmldsig#"
- * Id="EncKeyId-E5CEA44F9C25F55C4913269595550814">
- * <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
- * <ds:KeyInfo>
- * <wsse:SecurityTokenReference
- * xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
- * <wsse:KeyIdentifier
+ * Id="EncKeyId-E5CEA44F9C25F55C4913269595550814">
+ * <xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
+ * <ds:KeyInfo>
+ * <wsse:SecurityTokenReference
+ * xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
+ * <wsse:KeyIdentifier
* EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0
* #Base64Binary"
- * ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1">
+ * ValueType="http://docs.oasis-open.org/wss/oasis-wss-soap-message-security-1.1#ThumbprintSHA1">
* a/jhNus21KVuoFx65LmkW2O/l10=
- * </wsse:KeyIdentifier>
- * </wsse:SecurityTokenReference>
- * </ds:KeyInfo>
- * <xenc:CipherData>
- * <xenc:CipherValue>
+ * </wsse:KeyIdentifier>
+ * </wsse:SecurityTokenReference>
+ * </ds:KeyInfo>
+ * <xenc:CipherData>
+ * <xenc:CipherValue>
* dnP0MBHiMLlSmnjJhGFs/I8/z...
- * </xenc:CipherValue>
- * </xenc:CipherData>
- * </xenc:EncryptedKey>
+ * </xenc:CipherValue>
+ * </xenc:CipherData>
+ * </xenc:EncryptedKey></pre>
* @param certificate Certificate which holds the public key to encrypt ephemeral key.
* @param wsSecEncryptedKey WS Security object which contains encrypted ephemeral key.
* TODO Passing WSSecEncryptedKey is an overhead. We should be able to create encrypted ephemeral