[java-opensaml COMMIT] in /trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding: SAMLOutboundDesti...
noreply at shibboleth.net
noreply at shibboleth.net
Fri May 24 14:48:48 EDT 2013
Author: putmanb
Date: Fri May 24 14:48:48 2013
New Revision: 3344
URL: http://svn.shibboleth.net/view/java-opensaml?rev=3344&view=rev
Log:
Add some debug logging.
Modified:
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/SAMLOutboundDestinationHandler.java
trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/security/EndpointUrlSchemeSecurityHandler.java
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/SAMLOutboundDestinationHandler.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/SAMLOutboundDestinationHandler.java?rev=3344&r1=3343&r2=3344&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/SAMLOutboundDestinationHandler.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/SAMLOutboundDestinationHandler.java Fri May 24 14:48:48 2013
@@ -27,6 +27,8 @@
import org.opensaml.messaging.handler.AbstractMessageHandler;
import org.opensaml.messaging.handler.MessageHandlerException;
import org.opensaml.saml.common.SAMLObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Handler for outbound SAML protocol messages which adds the destination endpoint URL as the 'recipient'
@@ -35,6 +37,9 @@
* {@link org.opensaml.saml.saml2.core.StatusResponseType} messages.
*/
public class SAMLOutboundDestinationHandler extends AbstractMessageHandler<SAMLObject> {
+
+ /** Logger. */
+ Logger log = LoggerFactory.getLogger(SAMLOutboundDestinationHandler.class);
/** {@inheritDoc} */
protected void doInvoke(@Nonnull MessageContext<SAMLObject> messageContext) throws MessageHandlerException {
@@ -46,9 +51,11 @@
String endpointURL = endpointURI.toString();
if (samlMessage instanceof org.opensaml.saml.saml1.core.ResponseAbstractType) {
+ log.debug("Adding recipient to outbound SAML 1 protocol message: {}", endpointURL);
SAMLBindingSupport.setSaml1ResponseRecipient(samlMessage, endpointURL);
} else if (samlMessage instanceof org.opensaml.saml.saml2.core.RequestAbstractType
|| samlMessage instanceof org.opensaml.saml.saml2.core.StatusResponseType) {
+ log.debug("Adding destination to outbound SAML 2 protocol message: {}", endpointURL);
SAMLBindingSupport.setSaml2Destination(samlMessage, endpointURL);
}
Modified: trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/security/EndpointUrlSchemeSecurityHandler.java
URL: http://svn.shibboleth.net/view/java-opensaml/trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/security/EndpointUrlSchemeSecurityHandler.java?rev=3344&r1=3343&r2=3344&view=diff
==============================================================================
--- trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/security/EndpointUrlSchemeSecurityHandler.java (original)
+++ trunk/opensaml-saml-impl/src/main/java/org/opensaml/saml/common/binding/security/EndpointUrlSchemeSecurityHandler.java Fri May 24 14:48:48 2013
@@ -26,12 +26,17 @@
import org.opensaml.saml.common.binding.SAMLBindingSupport;
import org.opensaml.saml.common.messaging.SamlMessageSecuritySupport;
import org.opensaml.saml.saml2.metadata.Endpoint;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
/**
* Class which verifies that the {@link Endpoint} to which a message will be delivered
* contains a valid URL scheme.
*/
public class EndpointUrlSchemeSecurityHandler extends AbstractMessageHandler {
+
+ /** Logger. */
+ Logger log = LoggerFactory.getLogger(EndpointUrlSchemeSecurityHandler.class);
/** {@inheritDoc} */
protected void doInvoke(MessageContext messageContext) throws MessageHandlerException {
@@ -42,6 +47,8 @@
throw new MessageHandlerException("Could not obtain message endpoint URL", e);
}
+ log.debug("Checking outbound endpoint for allowed URL scheme: {}", endpointUrl);
+
if (!SamlMessageSecuritySupport.checkUrlScheme(endpointUrl.getScheme())) {
throw new MessageHandlerException("Relying party endpoint used the untrusted URL scheme "
+ endpointUrl.getScheme());
More information about the commits
mailing list