[java-plugin-shibd-saml] 02/02: Fix handling of default Issuer Format.
Codeberg
noreply at shibboleth.net
Mon Jun 1 16:53:51 UTC 2026
This is an automated email from the git hooks/post-receive script.
codeberg pushed a commit to branch main
in repository java-plugin-shibd-saml.
View the commit online:
https://codeberg.org/Shibboleth/java-plugin-shibd-saml/commit/4e5cd15bd331760303d9f0b22eb232547d54566d
commit 4e5cd15bd331760303d9f0b22eb232547d54566d
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Jun 1 12:16:51 2026 -0400
Fix handling of default Issuer Format.
---
.../net/shibboleth/sp/saml/flows/saml2/SAML2LogoutConsumerFlowTest.java | 2 --
.../net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequest.java | 2 +-
.../shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutResponse.java | 2 +-
.../shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequestTest.java | 2 --
.../sp/saml/saml2/profile/impl/ProcessLogoutRespoonseTest.java | 2 --
5 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2LogoutConsumerFlowTest.java b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2LogoutConsumerFlowTest.java
index d642b82..73dc7e1 100644
--- a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2LogoutConsumerFlowTest.java
+++ b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2LogoutConsumerFlowTest.java
@@ -499,7 +499,6 @@ public class SAML2LogoutConsumerFlowTest extends AbstractSPFlowTest {
request.setDestination(RESPONSE_URL);
final Issuer iss = SAML2ActionTestingSupport.buildIssuer(issuer);
- iss.setFormat(NameIDType.ENTITY);
request.setIssuer(iss);
return request;
@@ -528,7 +527,6 @@ public class SAML2LogoutConsumerFlowTest extends AbstractSPFlowTest {
response.setDestination(RESPONSE_URL);
final Issuer iss = SAML2ActionTestingSupport.buildIssuer(issuer);
- iss.setFormat(NameIDType.ENTITY);
response.setIssuer(iss);
final SAMLObjectBuilder<Status> statusBuilder = (SAMLObjectBuilder<Status>)
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequest.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequest.java
index f8a97c3..a49e665 100644
--- a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequest.java
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequest.java
@@ -221,7 +221,7 @@ public class ProcessLogoutRequest extends AbstractApplicationAction {
// Establish request issuer if it's legitimate.
Issuer issuer = logoutRequest.getIssuer();
- if (issuer != null && !NameIDType.ENTITY.equals(issuer.getFormat())) {
+ if (issuer != null && issuer.getFormat() != null && !NameIDType.ENTITY.equals(issuer.getFormat())) {
issuer = null;
}
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutResponse.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutResponse.java
index 57fc842..4670ee0 100644
--- a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutResponse.java
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutResponse.java
@@ -135,7 +135,7 @@ public class ProcessLogoutResponse extends AbstractApplicationAction {
// Establish request issuer if it's legitimate.
final Issuer issuer = logoutResponse.getIssuer();
- if (issuer == null || !NameIDType.ENTITY.equals(issuer.getFormat())) {
+ if (issuer == null || (issuer.getFormat() != null && !NameIDType.ENTITY.equals(issuer.getFormat()))) {
log.warn("{} LogoutResponse did not contain a valid Issuer to cross-check", getLogPrefix());
output.addmember(STATUS_PARAM).integer(-1);
} else if (!Objects.equals(issuer.getValue(), stateData != null ? stateData.getAuthenticationAuthority() : null)) {
diff --git a/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequestTest.java b/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequestTest.java
index 743d30a..6bbfd59 100644
--- a/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequestTest.java
+++ b/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRequestTest.java
@@ -31,7 +31,6 @@ import org.opensaml.saml.saml2.core.Extensions;
import org.opensaml.saml.saml2.core.Issuer;
import org.opensaml.saml.saml2.core.LogoutRequest;
import org.opensaml.saml.saml2.core.LogoutResponse;
-import org.opensaml.saml.saml2.core.NameIDType;
import org.opensaml.saml.saml2.core.RequestAbstractType;
import org.opensaml.saml.saml2.core.SessionIndex;
import org.opensaml.saml.saml2.testing.SAML2ActionTestingSupport;
@@ -377,7 +376,6 @@ public class ProcessLogoutRequestTest extends BaseApplicationActionTest {
SAML2ActionTestingSupport.buildNameID("jdoe"));
final Issuer issuer = request.getIssuer();
assert issuer != null;
- issuer.setFormat(NameIDType.ENTITY);
prc.ensureInboundMessageContext().setMessage(request);
SAMLBindingSupport.setRelayState(prc.ensureInboundMessageContext(), RELAY_STATE);
}
diff --git a/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRespoonseTest.java b/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRespoonseTest.java
index e0bad51..1e86f40 100644
--- a/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRespoonseTest.java
+++ b/sp-saml-impl/src/test/java/net/shibboleth/sp/saml/saml2/profile/impl/ProcessLogoutRespoonseTest.java
@@ -26,7 +26,6 @@ import org.opensaml.saml.common.SAMLObjectBuilder;
import org.opensaml.saml.saml2.core.Issuer;
import org.opensaml.saml.saml2.core.LogoutRequest;
import org.opensaml.saml.saml2.core.LogoutResponse;
-import org.opensaml.saml.saml2.core.NameIDType;
import org.opensaml.saml.saml2.core.Status;
import org.opensaml.saml.saml2.core.StatusCode;
import org.opensaml.saml.saml2.testing.SAML2ActionTestingSupport;
@@ -175,7 +174,6 @@ public class ProcessLogoutRespoonseTest extends BaseApplicationActionTest {
prc.ensureInboundMessageContext().setMessage(response);
final Issuer issuer = SAML2ActionTestingSupport.buildIssuer(ActionTestingSupport.OUTBOUND_MSG_ISSUER);
- issuer.setFormat(NameIDType.ENTITY);
response.setIssuer(issuer);
response.setInResponseTo("12345");
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list