|
@@ -81,12 +81,6 @@ public final class RelyingPartyRegistration {
|
|
|
|
|
|
private final Saml2MessageBinding assertionConsumerServiceBinding;
|
|
|
|
|
|
- private final String singleLogoutServiceLocation;
|
|
|
-
|
|
|
- private final String singleLogoutServiceResponseLocation;
|
|
|
-
|
|
|
- private final Saml2MessageBinding singleLogoutServiceBinding;
|
|
|
-
|
|
|
private final ProviderDetails providerDetails;
|
|
|
|
|
|
private final List<org.springframework.security.saml2.credentials.Saml2X509Credential> credentials;
|
|
@@ -96,9 +90,7 @@ public final class RelyingPartyRegistration {
|
|
|
private final Collection<Saml2X509Credential> signingX509Credentials;
|
|
|
|
|
|
private RelyingPartyRegistration(String registrationId, String entityId, String assertionConsumerServiceLocation,
|
|
|
- Saml2MessageBinding assertionConsumerServiceBinding, String singleLogoutServiceLocation,
|
|
|
- String singleLogoutServiceResponseLocation, Saml2MessageBinding singleLogoutServiceBinding,
|
|
|
- ProviderDetails providerDetails,
|
|
|
+ Saml2MessageBinding assertionConsumerServiceBinding, ProviderDetails providerDetails,
|
|
|
Collection<org.springframework.security.saml2.credentials.Saml2X509Credential> credentials,
|
|
|
Collection<Saml2X509Credential> decryptionX509Credentials,
|
|
|
Collection<Saml2X509Credential> signingX509Credentials) {
|
|
@@ -126,9 +118,6 @@ public final class RelyingPartyRegistration {
|
|
|
this.entityId = entityId;
|
|
|
this.assertionConsumerServiceLocation = assertionConsumerServiceLocation;
|
|
|
this.assertionConsumerServiceBinding = assertionConsumerServiceBinding;
|
|
|
- this.singleLogoutServiceLocation = singleLogoutServiceLocation;
|
|
|
- this.singleLogoutServiceResponseLocation = singleLogoutServiceResponseLocation;
|
|
|
- this.singleLogoutServiceBinding = singleLogoutServiceBinding;
|
|
|
this.providerDetails = providerDetails;
|
|
|
this.credentials = Collections.unmodifiableList(new LinkedList<>(credentials));
|
|
|
this.decryptionX509Credentials = Collections.unmodifiableList(new LinkedList<>(decryptionX509Credentials));
|
|
@@ -188,51 +177,6 @@ public final class RelyingPartyRegistration {
|
|
|
return this.assertionConsumerServiceBinding;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Get the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Binding.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService Binding="..."/> in the
|
|
|
- * relying party's <SPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Binding
|
|
|
- * @since 5.5
|
|
|
- */
|
|
|
- public Saml2MessageBinding getSingleLogoutServiceBinding() {
|
|
|
- return this.singleLogoutServiceBinding;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Get the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Location.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService Location="..."/> in the
|
|
|
- * relying party's <SPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Location
|
|
|
- * @since 5.5
|
|
|
- */
|
|
|
- public String getSingleLogoutServiceLocation() {
|
|
|
- return this.singleLogoutServiceLocation;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Get the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Response Location.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService
|
|
|
- * ResponseLocation="..."/> in the relying party's <SPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Response Location
|
|
|
- * @since 5.5
|
|
|
- */
|
|
|
- public String getSingleLogoutServiceResponseLocation() {
|
|
|
- return this.singleLogoutServiceResponseLocation;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Get the {@link Collection} of decryption {@link Saml2X509Credential}s associated
|
|
|
* with this relying party
|
|
@@ -420,9 +364,6 @@ public final class RelyingPartyRegistration {
|
|
|
.decryptionX509Credentials((c) -> c.addAll(registration.getDecryptionX509Credentials()))
|
|
|
.assertionConsumerServiceLocation(registration.getAssertionConsumerServiceLocation())
|
|
|
.assertionConsumerServiceBinding(registration.getAssertionConsumerServiceBinding())
|
|
|
- .singleLogoutServiceLocation(registration.getSingleLogoutServiceLocation())
|
|
|
- .singleLogoutServiceResponseLocation(registration.getSingleLogoutServiceResponseLocation())
|
|
|
- .singleLogoutServiceBinding(registration.getSingleLogoutServiceBinding())
|
|
|
.assertingPartyDetails((assertingParty) -> assertingParty
|
|
|
.entityId(registration.getAssertingPartyDetails().getEntityId())
|
|
|
.wantAuthnRequestsSigned(registration.getAssertingPartyDetails().getWantAuthnRequestsSigned())
|
|
@@ -435,13 +376,7 @@ public final class RelyingPartyRegistration {
|
|
|
.singleSignOnServiceLocation(
|
|
|
registration.getAssertingPartyDetails().getSingleSignOnServiceLocation())
|
|
|
.singleSignOnServiceBinding(
|
|
|
- registration.getAssertingPartyDetails().getSingleSignOnServiceBinding())
|
|
|
- .singleLogoutServiceLocation(
|
|
|
- registration.getAssertingPartyDetails().getSingleLogoutServiceLocation())
|
|
|
- .singleLogoutServiceResponseLocation(
|
|
|
- registration.getAssertingPartyDetails().getSingleLogoutServiceResponseLocation())
|
|
|
- .singleLogoutServiceBinding(
|
|
|
- registration.getAssertingPartyDetails().getSingleLogoutServiceBinding()));
|
|
|
+ registration.getAssertingPartyDetails().getSingleSignOnServiceBinding()));
|
|
|
}
|
|
|
|
|
|
private static Saml2X509Credential fromDeprecated(
|
|
@@ -510,17 +445,10 @@ public final class RelyingPartyRegistration {
|
|
|
|
|
|
private final Saml2MessageBinding singleSignOnServiceBinding;
|
|
|
|
|
|
- private final String singleLogoutServiceLocation;
|
|
|
-
|
|
|
- private final String singleLogoutServiceResponseLocation;
|
|
|
-
|
|
|
- private final Saml2MessageBinding singleLogoutServiceBinding;
|
|
|
-
|
|
|
private AssertingPartyDetails(String entityId, boolean wantAuthnRequestsSigned, List<String> signingAlgorithms,
|
|
|
Collection<Saml2X509Credential> verificationX509Credentials,
|
|
|
Collection<Saml2X509Credential> encryptionX509Credentials, String singleSignOnServiceLocation,
|
|
|
- Saml2MessageBinding singleSignOnServiceBinding, String singleLogoutServiceLocation,
|
|
|
- String singleLogoutServiceResponseLocation, Saml2MessageBinding singleLogoutServiceBinding) {
|
|
|
+ Saml2MessageBinding singleSignOnServiceBinding) {
|
|
|
Assert.hasText(entityId, "entityId cannot be null or empty");
|
|
|
Assert.notEmpty(signingAlgorithms, "signingAlgorithms cannot be empty");
|
|
|
Assert.notNull(verificationX509Credentials, "verificationX509Credentials cannot be null");
|
|
@@ -544,9 +472,6 @@ public final class RelyingPartyRegistration {
|
|
|
this.encryptionX509Credentials = encryptionX509Credentials;
|
|
|
this.singleSignOnServiceLocation = singleSignOnServiceLocation;
|
|
|
this.singleSignOnServiceBinding = singleSignOnServiceBinding;
|
|
|
- this.singleLogoutServiceLocation = singleLogoutServiceLocation;
|
|
|
- this.singleLogoutServiceResponseLocation = singleLogoutServiceResponseLocation;
|
|
|
- this.singleLogoutServiceBinding = singleLogoutServiceBinding;
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -640,48 +565,6 @@ public final class RelyingPartyRegistration {
|
|
|
return this.singleSignOnServiceBinding;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Get the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Location.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService Location="..."/> in
|
|
|
- * the asserting party's <IDPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Location
|
|
|
- */
|
|
|
- public String getSingleLogoutServiceLocation() {
|
|
|
- return this.singleLogoutServiceLocation;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Get the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * ResponseLocation.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService Location="..."/> in
|
|
|
- * the asserting party's <IDPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Response Location
|
|
|
- */
|
|
|
- public String getSingleLogoutServiceResponseLocation() {
|
|
|
- return this.singleLogoutServiceResponseLocation;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Get the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Binding.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService Binding="..."/> in
|
|
|
- * the asserting party's <IDPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Binding
|
|
|
- */
|
|
|
- public Saml2MessageBinding getSingleLogoutServiceBinding() {
|
|
|
- return this.singleLogoutServiceBinding;
|
|
|
- }
|
|
|
-
|
|
|
public static final class Builder {
|
|
|
|
|
|
private String entityId;
|
|
@@ -698,12 +581,6 @@ public final class RelyingPartyRegistration {
|
|
|
|
|
|
private Saml2MessageBinding singleSignOnServiceBinding = Saml2MessageBinding.REDIRECT;
|
|
|
|
|
|
- private String singleLogoutServiceLocation;
|
|
|
-
|
|
|
- private String singleLogoutServiceResponseLocation;
|
|
|
-
|
|
|
- private Saml2MessageBinding singleLogoutServiceBinding = Saml2MessageBinding.REDIRECT;
|
|
|
-
|
|
|
/**
|
|
|
* Set the asserting party's <a href=
|
|
|
* "https://wiki.shibboleth.net/confluence/display/CONCEPT/EntityNaming">EntityID</a>.
|
|
@@ -800,55 +677,6 @@ public final class RelyingPartyRegistration {
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Set the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Location.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService
|
|
|
- * Location="..."/> in the asserting party's <IDPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Location
|
|
|
- * @since 5.5
|
|
|
- */
|
|
|
- public Builder singleLogoutServiceLocation(String singleLogoutServiceLocation) {
|
|
|
- this.singleLogoutServiceLocation = singleLogoutServiceLocation;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Set the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Response Location.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService
|
|
|
- * ResponseLocation="..."/> in the asserting party's
|
|
|
- * <IDPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Response Location
|
|
|
- * @since 5.5
|
|
|
- */
|
|
|
- public Builder singleLogoutServiceResponseLocation(String singleLogoutServiceResponseLocation) {
|
|
|
- this.singleLogoutServiceResponseLocation = singleLogoutServiceResponseLocation;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Set the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Binding.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService Binding="..."/>
|
|
|
- * in the asserting party's <IDPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Binding
|
|
|
- * @since 5.5
|
|
|
- */
|
|
|
- public Builder singleLogoutServiceBinding(Saml2MessageBinding singleLogoutServiceBinding) {
|
|
|
- this.singleLogoutServiceBinding = singleLogoutServiceBinding;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Creates an immutable ProviderDetails object representing the configuration
|
|
|
* for an Identity Provider, IDP
|
|
@@ -861,9 +689,7 @@ public final class RelyingPartyRegistration {
|
|
|
|
|
|
return new AssertingPartyDetails(this.entityId, this.wantAuthnRequestsSigned, signingAlgorithms,
|
|
|
this.verificationX509Credentials, this.encryptionX509Credentials,
|
|
|
- this.singleSignOnServiceLocation, this.singleSignOnServiceBinding,
|
|
|
- this.singleLogoutServiceLocation, this.singleLogoutServiceResponseLocation,
|
|
|
- this.singleLogoutServiceBinding);
|
|
|
+ this.singleSignOnServiceLocation, this.singleSignOnServiceBinding);
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -1004,12 +830,6 @@ public final class RelyingPartyRegistration {
|
|
|
|
|
|
private Saml2MessageBinding assertionConsumerServiceBinding = Saml2MessageBinding.POST;
|
|
|
|
|
|
- private String singleLogoutServiceLocation;
|
|
|
-
|
|
|
- private String singleLogoutServiceResponseLocation;
|
|
|
-
|
|
|
- private Saml2MessageBinding singleLogoutServiceBinding = Saml2MessageBinding.POST;
|
|
|
-
|
|
|
private ProviderDetails.Builder providerDetails = new ProviderDetails.Builder();
|
|
|
|
|
|
private Collection<org.springframework.security.saml2.credentials.Saml2X509Credential> credentials = new HashSet<>();
|
|
@@ -1113,54 +933,6 @@ public final class RelyingPartyRegistration {
|
|
|
return this;
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Set the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Binding.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService Binding="..."/> in
|
|
|
- * the relying party's <SPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Binding
|
|
|
- * @since 5.5
|
|
|
- */
|
|
|
- public Builder singleLogoutServiceBinding(Saml2MessageBinding singleLogoutServiceBinding) {
|
|
|
- this.singleLogoutServiceBinding = singleLogoutServiceBinding;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Set the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Location.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService Location="..."/> in
|
|
|
- * the relying party's <SPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Location
|
|
|
- * @since 5.5
|
|
|
- */
|
|
|
- public Builder singleLogoutServiceLocation(String singleLogoutServiceLocation) {
|
|
|
- this.singleLogoutServiceLocation = singleLogoutServiceLocation;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
- /**
|
|
|
- * Set the <a href=
|
|
|
- * "https://wiki.shibboleth.net/confluence/display/CONCEPT/MetadataForIdP#MetadataForIdP-Logout">SingleLogoutService</a>
|
|
|
- * Response Location.
|
|
|
- *
|
|
|
- * <p>
|
|
|
- * Equivalent to the value found in <SingleLogoutService
|
|
|
- * ResponseLocation="..."/> in the relying party's <SPSSODescriptor>.
|
|
|
- * @return the SingleLogoutService Response Location
|
|
|
- * @since 5.5
|
|
|
- */
|
|
|
- public Builder singleLogoutServiceResponseLocation(String singleLogoutServiceResponseLocation) {
|
|
|
- this.singleLogoutServiceResponseLocation = singleLogoutServiceResponseLocation;
|
|
|
- return this;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Apply this {@link Consumer} to further configure the Asserting Party details
|
|
|
* @param assertingPartyDetails The {@link Consumer} to apply
|
|
@@ -1303,14 +1075,10 @@ public final class RelyingPartyRegistration {
|
|
|
for (Saml2X509Credential credential : this.providerDetails.assertingPartyDetailsBuilder.encryptionX509Credentials) {
|
|
|
this.credentials.add(toDeprecated(credential));
|
|
|
}
|
|
|
- if (this.singleLogoutServiceResponseLocation == null) {
|
|
|
- this.singleLogoutServiceResponseLocation = this.singleLogoutServiceLocation;
|
|
|
- }
|
|
|
return new RelyingPartyRegistration(this.registrationId, this.entityId,
|
|
|
this.assertionConsumerServiceLocation, this.assertionConsumerServiceBinding,
|
|
|
- this.singleLogoutServiceLocation, this.singleLogoutServiceResponseLocation,
|
|
|
- this.singleLogoutServiceBinding, this.providerDetails.build(), this.credentials,
|
|
|
- this.decryptionX509Credentials, this.signingX509Credentials);
|
|
|
+ this.providerDetails.build(), this.credentials, this.decryptionX509Credentials,
|
|
|
+ this.signingX509Credentials);
|
|
|
}
|
|
|
|
|
|
}
|