From 1dfcb45f5c9515e96d84d0c5570aa7c430d71911 Mon Sep 17 00:00:00 2001 From: lajoie Date: Tue, 26 Feb 2008 17:47:48 +0000 Subject: [PATCH] Be sure to use inbound message issuer and not peer Id git-svn-id: https://subversion.switch.ch/svn/shibboleth/java-idp/trunk@2659 ab3bd59b-922f-494d-bb5f-6f0a3c29deca --- .../shibboleth/idp/profile/saml1/AbstractSAML1ProfileHandler.java | 2 +- .../shibboleth/idp/profile/saml1/ShibbolethSSOProfileHandler.java | 5 +++-- .../shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java | 2 +- .../shibboleth/idp/profile/saml2/SSOProfileHandler.java | 5 +++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/edu/internet2/middleware/shibboleth/idp/profile/saml1/AbstractSAML1ProfileHandler.java b/src/edu/internet2/middleware/shibboleth/idp/profile/saml1/AbstractSAML1ProfileHandler.java index 6957281..98c938d 100644 --- a/src/edu/internet2/middleware/shibboleth/idp/profile/saml1/AbstractSAML1ProfileHandler.java +++ b/src/edu/internet2/middleware/shibboleth/idp/profile/saml1/AbstractSAML1ProfileHandler.java @@ -188,7 +188,7 @@ public abstract class AbstractSAML1ProfileHandler extends AbstractSAMLProfileHan requestContext.setUserSession(userSession); requestContext.setPrincipalName(userSession.getPrincipalName()); requestContext.setPrincipalAuthenticationMethod(userSession.getServicesInformation().get( - requestContext.getPeerEntityId()).getAuthenticationMethod().getAuthenticationMethod()); + requestContext.getInboundMessageIssuer()).getAuthenticationMethod().getAuthenticationMethod()); } } diff --git a/src/edu/internet2/middleware/shibboleth/idp/profile/saml1/ShibbolethSSOProfileHandler.java b/src/edu/internet2/middleware/shibboleth/idp/profile/saml1/ShibbolethSSOProfileHandler.java index da1ab1f..5b6dc04 100644 --- a/src/edu/internet2/middleware/shibboleth/idp/profile/saml1/ShibbolethSSOProfileHandler.java +++ b/src/edu/internet2/middleware/shibboleth/idp/profile/saml1/ShibbolethSSOProfileHandler.java @@ -184,7 +184,7 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler { ShibbolethSSORequestContext requestContext = new ShibbolethSSORequestContext(); requestContext.setCommunicationProfileId(getProfileId()); - + requestContext.setMetadataProvider(getMetadataProvider()); requestContext.setSecurityPolicyResolver(getSecurityPolicyResolver()); @@ -363,7 +363,8 @@ public class ShibbolethSSOProfileHandler extends AbstractSAML1ProfileHandler { endpoint.setLocation(loginContext.getSpAssertionConsumerService()); endpoint.setBinding(getSupportedOutboundBindings().get(0)); log.warn("No endpoint available for relying party {}. Generating endpoint with ACS url {} and binding {}", - new Object[] { requestContext.getPeerEntityId(), endpoint.getLocation(), endpoint.getBinding() }); + new Object[] { requestContext.getInboundMessageIssuer(), endpoint.getLocation(), + endpoint.getBinding(), }); } return endpoint; diff --git a/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java b/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java index ce797a4..9b63d8e 100644 --- a/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java +++ b/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/AbstractSAML2ProfileHandler.java @@ -211,7 +211,7 @@ public abstract class AbstractSAML2ProfileHandler extends AbstractSAMLProfileHan requestContext.setUserSession(userSession); requestContext.setPrincipalName(userSession.getPrincipalName()); requestContext.setPrincipalAuthenticationMethod(userSession.getServicesInformation().get( - requestContext.getPeerEntityId()).getAuthenticationMethod().getAuthenticationMethod()); + requestContext.getInboundMessageIssuer()).getAuthenticationMethod().getAuthenticationMethod()); } } diff --git a/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/SSOProfileHandler.java b/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/SSOProfileHandler.java index 0a0aea6..2061525 100644 --- a/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/SSOProfileHandler.java +++ b/src/edu/internet2/middleware/shibboleth/idp/profile/saml2/SSOProfileHandler.java @@ -279,7 +279,7 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler { log.debug("Decoding message with decoder binding {}", getInboundBinding()); SSORequestContext requestContext = new SSORequestContext(); requestContext.setCommunicationProfileId(getProfileId()); - + requestContext.setMetadataProvider(getMetadataProvider()); requestContext.setSecurityPolicyResolver(getSecurityPolicyResolver()); @@ -526,7 +526,8 @@ public class SSOProfileHandler extends AbstractSAML2ProfileHandler { endpoint.setBinding(getSupportedOutboundBindings().get(0)); } log.warn("No endpoint available for relying party {}. Generating endpoint with ACS url {} and binding {}", - new Object[] { requestContext.getPeerEntityId(), endpoint.getLocation(), endpoint.getBinding() }); + new Object[] { requestContext.getInboundMessageIssuer(), endpoint.getLocation(), + endpoint.getBinding(), }); } return endpoint; -- 1.7.10.4