[java-plugin-shibd-saml] branch main updated: Add signing to AuthnRequest tests to exercise new code.
Codeberg
noreply at shibboleth.net
Mon Jul 27 18:58:44 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/890f737c3813cd03becae7926913706c400ea395
The following commit(s) were added to refs/heads/main by this push:
new 890f737 Add signing to AuthnRequest tests to exercise new code.
890f737 is described below
commit 890f737c3813cd03becae7926913706c400ea395
Author: Scott Cantor <scott at restingparrotsoftware.com>
AuthorDate: Mon Jul 27 14:58:12 2026 -0400
Add signing to AuthnRequest tests to exercise new code.
---
.../main/resources/net/shibboleth/sp/saml/conf/plugin.properties | 2 +-
.../sp/saml/flows/saml2/SAML2SessionInitiatorFlowTest.java | 8 +++++++-
.../net/shibboleth/idp/module/conf/metadata-providers.xml | 2 +-
.../sp/xmlsec/config/impl/BasicSignatureSigningConfiguration.java | 2 ++
4 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/sp-saml-conf-impl/src/main/resources/net/shibboleth/sp/saml/conf/plugin.properties b/sp-saml-conf-impl/src/main/resources/net/shibboleth/sp/saml/conf/plugin.properties
index be79f98..ddb1c5e 100644
--- a/sp-saml-conf-impl/src/main/resources/net/shibboleth/sp/saml/conf/plugin.properties
+++ b/sp-saml-conf-impl/src/main/resources/net/shibboleth/sp/saml/conf/plugin.properties
@@ -5,5 +5,5 @@ plugin.id = net.shibboleth.plugin.shibd.saml
# Only used when package manifest is not available
plugin.version = 1.0.0
-# No prereqs
+# Prereqs
plugin.modules.required = sp.Core
diff --git a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2SessionInitiatorFlowTest.java b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2SessionInitiatorFlowTest.java
index d2521aa..ec916e4 100644
--- a/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2SessionInitiatorFlowTest.java
+++ b/sp-saml-conf-impl/src/test/java/net/shibboleth/sp/saml/flows/saml2/SAML2SessionInitiatorFlowTest.java
@@ -284,7 +284,6 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
assertOutputMessageEvent(result, AuthnEventIds.NO_POTENTIAL_FLOW);
}
-
/**
* Test simple success case with computed relay state.
*
@@ -576,6 +575,7 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
final Object saml = prc.ensureOutboundMessageContext().ensureMessage();
assert saml instanceof AuthnRequest;
authnRequest = (AuthnRequest) saml;
+ Assert.assertTrue(authnRequest.isSigned());
}
assert authnRequest != null;
@@ -626,6 +626,9 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
if (url == null || index < 0) {
throw new MessageDecodingException("No query string");
}
+
+ mock.setQueryString(url.substring(index + 1));
+
final List<Pair<String,String>> params = URISupport.parseQueryString(url.substring(index + 1));
for (final var param : params) {
final String name = param.getFirst();
@@ -634,6 +637,9 @@ public class SAML2SessionInitiatorFlowTest extends AbstractSPFlowTest {
}
}
+ Assert.assertNotNull(mock.getParameter("SAMLRequest"));
+ Assert.assertNotNull(mock.getParameter("Signature"));
+
final HTTPRedirectDeflateDecoder decoder = new HTTPRedirectDeflateDecoder();
decoder.setHttpServletRequestSupplier(NonnullSupplier.of(mock));
decoder.setParserPool(parserPool);
diff --git a/sp-saml-conf-impl/src/test/resources/net/shibboleth/idp/module/conf/metadata-providers.xml b/sp-saml-conf-impl/src/test/resources/net/shibboleth/idp/module/conf/metadata-providers.xml
index ea3603c..09fd1df 100644
--- a/sp-saml-conf-impl/src/test/resources/net/shibboleth/idp/module/conf/metadata-providers.xml
+++ b/sp-saml-conf-impl/src/test/resources/net/shibboleth/idp/module/conf/metadata-providers.xml
@@ -30,7 +30,7 @@
<MetadataProvider id="InlineExample" xsi:type="InlineMetadataProvider" indexesRef="testbed.MetadataIndexes">
<md:EntitiesDescriptor Name="tests">
<md:EntityDescriptor entityID="https://idp.example.org">
- <md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
+ <md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol" WantAuthnRequestsSigned="true">
<md:Extensions>
<shibmd:Scope regexp="false">example.org</shibmd:Scope>
</md:Extensions>
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/xmlsec/config/impl/BasicSignatureSigningConfiguration.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/xmlsec/config/impl/BasicSignatureSigningConfiguration.java
index 419fa61..28ecbc4 100644
--- a/sp-saml-impl/src/main/java/net/shibboleth/sp/xmlsec/config/impl/BasicSignatureSigningConfiguration.java
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/xmlsec/config/impl/BasicSignatureSigningConfiguration.java
@@ -81,11 +81,13 @@ public class BasicSignatureSigningConfiguration extends org.opensaml.xmlsec.impl
final Iterable<Credential> creds = credentialResolver.resolve(criteria);
final ArrayList<Credential> accumulator = new ArrayList<>();
creds.forEach(accumulator::add);
+ log.debug("Resolved {} signing key(s)", accumulator.size());
return accumulator;
} catch (final ResolverException e) {
log.error("Exception resolving signing credentials", e);
}
+ log.debug("Resolved 0 signing key(s)");
return CollectionSupport.emptyList();
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list