[java-plugin-shibd-saml] branch main updated: Support ProxyCount and use to drive Scoping generation.
Codeberg
noreply at shibboleth.net
Mon Apr 6 15:06:11 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/78cde7779558efd38fcbb1e8f3ff33011edd0e52
The following commit(s) were added to refs/heads/main by this push:
new 78cde77 Support ProxyCount and use to drive Scoping generation.
78cde77 is described below
commit 78cde7779558efd38fcbb1e8f3ff33011edd0e52
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Apr 6 11:04:57 2026 -0400
Support ProxyCount and use to drive Scoping generation.
---
.../saml/saml2/profile/impl/AddAuthnRequest.java | 41 +++-------------------
1 file changed, 4 insertions(+), 37 deletions(-)
diff --git a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/AddAuthnRequest.java b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/AddAuthnRequest.java
index c44a58f..565d788 100644
--- a/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/AddAuthnRequest.java
+++ b/sp-saml-impl/src/main/java/net/shibboleth/sp/saml/saml2/profile/impl/AddAuthnRequest.java
@@ -58,8 +58,6 @@ import org.opensaml.saml.saml2.core.AuthnContextClassRef;
import org.opensaml.saml.saml2.core.AuthnContextComparisonTypeEnumeration;
import org.opensaml.saml.saml2.core.AuthnRequest;
import org.opensaml.saml.saml2.core.Extensions;
-import org.opensaml.saml.saml2.core.IDPEntry;
-import org.opensaml.saml.saml2.core.IDPList;
import org.opensaml.saml.saml2.core.Issuer;
import org.opensaml.saml.saml2.core.NameID;
import org.opensaml.saml.saml2.core.NameIDPolicy;
@@ -96,9 +94,6 @@ public class AddAuthnRequest extends AbstractApplicationAction {
/** Overwrite an existing message? */
private boolean overwriteExisting;
-
- /** Controls whether to include {@link Scoping} element. */
- private boolean includeScoping;
/** Strategy used to locate {@link RelyingPartyContext} if required. */
@Nullable private Function<ProfileRequestContext,RelyingPartyContext> relyingPartyContextLookupStrategy;
@@ -148,19 +143,6 @@ public class AddAuthnRequest extends AbstractApplicationAction {
overwriteExisting = flag;
}
- /**
- * Set whether to include {@link Scoping} in request carrying a known entityID
- * in an {@link IDPList}.
- *
- * <p>Defaults to false.</p>
- *
- * @param flag flag to set
- */
- public void setIncludeScoping(final boolean flag) {
- checkSetterPreconditions();
- includeScoping = true;
- }
-
/**
* Set lookup strategy to locate {@link RelyingPartyContext}, only relevant when
* also including {@link Scoping} element.
@@ -335,10 +317,7 @@ public class AddAuthnRequest extends AbstractApplicationAction {
object.setRequestedAuthnContext(buildRequestedAuthnContext(profileRequestContext));
object.setSubject(buildSubject(profileRequestContext));
object.setExtensions(buildExtensions(profileRequestContext));
-
- if (includeScoping) {
- object.setScoping(buildScoping(profileRequestContext));
- }
+ object.setScoping(buildScoping(profileRequestContext));
profileRequestContext.ensureOutboundMessageContext().setMessage(object);
@@ -599,10 +578,8 @@ public class AddAuthnRequest extends AbstractApplicationAction {
*/
@Nullable private Scoping buildScoping(@Nonnull final ProfileRequestContext profileRequestContext) {
- final RelyingPartyContext rpContext = relyingPartyContextLookupStrategy != null ?
- relyingPartyContextLookupStrategy.apply(profileRequestContext) : null;
- final String entityID = rpContext != null ? rpContext.getRelyingPartyId() : null;
- if (entityID == null) {
+ final Integer proxyCount = profileConfiguration.getProxyCount(profileRequestContext);
+ if (proxyCount == null) {
return null;
}
@@ -610,19 +587,9 @@ public class AddAuthnRequest extends AbstractApplicationAction {
final SAMLObjectBuilder<Scoping> scopingBuilder =
(SAMLObjectBuilder<Scoping>) bf.<Scoping>ensureBuilder(Scoping.DEFAULT_ELEMENT_NAME);
- final SAMLObjectBuilder<IDPList> idpListBuilder =
- (SAMLObjectBuilder<IDPList>) bf.<IDPList>ensureBuilder(IDPList.DEFAULT_ELEMENT_NAME);
- final SAMLObjectBuilder<IDPEntry> idpBuilder =
- (SAMLObjectBuilder<IDPEntry>) bf.<IDPEntry>ensureBuilder(IDPEntry.DEFAULT_ELEMENT_NAME);
-
- final IDPEntry entry = idpBuilder.buildObject();
- entry.setProviderID(entityID);
- final IDPList idps = idpListBuilder.buildObject();
- idps.getIDPEntrys().add(entry);
-
final Scoping scoping = scopingBuilder.buildObject();
- scoping.setIDPList(idps);
+ scoping.setProxyCount(proxyCount);
return scoping;
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list