Remove Address from SubjectConfirmationData
Nate Klingenstein
ndk at signet.id
Sat Feb 6 00:14:26 UTC 2021
Tony,
Well, actually, if you just yank the HTTP Servlet Request property from that bean, you might end up with chaotic explosions, or you might end up with nothing populated. My Java stinks, so I can't tell you definitively, but if I were you, I would try that just for fun.
/system/flows/saml/saml2/sso-abstract-beans.xml:
<bean id="AddSubjectConfirmationToSubjects"
class="org.opensaml.saml.saml2.profile.impl.AddSubjectConfirmationToSubjects" scope="prototype"
p:httpServletRequest-ref="shibboleth.HttpServletRequest"
p:method="urn:oasis:names:tc:SAML:2.0:cm:bearer" />
->
<bean id="AddSubjectConfirmationToSubjects"
class="org.opensaml.saml.saml2.profile.impl.AddSubjectConfirmationToSubjects" scope="prototype"
p:method="urn:oasis:names:tc:SAML:2.0:cm:bearer" />
Note that this would be a universal change, though, impacting all assertions coming out of the IdP. If it works.
http://git.shibboleth.net/view/?p=java-opensaml.git;a=blob;f=opensaml-saml-impl/src/main/java/org/opensaml/saml/saml2/profile/impl/AddSubjectConfirmationToSubjects.java;h=3a8c721957b420c7b11f39da55a5ebf8a23ca4b4;hb=HEAD
121 // Default pulls from servlet request.
122 addressLookupStrategy = new Function<>() {
123 public String apply(final ProfileRequestContext input) {
124 final String address = getHttpServletRequest() != null ?
125 HttpServletSupport.getRemoteAddr(getHttpServletRequest()) : null;
126 log.debug("{} Setting confirmation data Address to {}", getLogPrefix(),
127 address != null ? address : "(none)");
128 return address;
129 }
130 };
289 SubjectConfirmationData confirmationData = null;
290
291 final String address = addressLookupStrategy != null
292 ? addressLookupStrategy.apply(profileRequestContext) : null;
293 if (address != null) {
294 confirmationData = confirmationData != null ? confirmationData : confirmationDataBuilder.buildObject();
295 confirmationData.setAddress(address);
296 }
319 if (confirmationData != null) {
320 confirmation.setSubjectConfirmationData(confirmationData);
321 }
Probably shouldn't be sending this,
Nate.
More information about the users
mailing list