|
|
|
@ -126,7 +126,7 @@ class Saml2RelyingPartyAutoConfigurationTests {
|
|
|
|
|
server.start();
|
|
|
|
|
String metadataUrl = server.url("").toString();
|
|
|
|
|
setupMockResponse(server, new ClassPathResource("saml/idp-metadata"));
|
|
|
|
|
this.contextRunner.withPropertyValues(PREFIX + ".foo.asserting-party.metadata-uri=" + metadataUrl)
|
|
|
|
|
this.contextRunner.withPropertyValues(PREFIX + ".foo.assertingparty.metadata-uri=" + metadataUrl)
|
|
|
|
|
.run((context) -> {
|
|
|
|
|
assertThat(context).hasSingleBean(RelyingPartyRegistrationRepository.class);
|
|
|
|
|
assertThat(server.getRequestCount()).isEqualTo(1);
|
|
|
|
@ -140,7 +140,7 @@ class Saml2RelyingPartyAutoConfigurationTests {
|
|
|
|
|
server.start();
|
|
|
|
|
String metadataUrl = server.url("").toString();
|
|
|
|
|
setupMockResponse(server, new ClassPathResource("saml/idp-metadata"));
|
|
|
|
|
this.contextRunner.withPropertyValues(PREFIX + ".foo.asserting-party.metadata-uri=" + metadataUrl)
|
|
|
|
|
this.contextRunner.withPropertyValues(PREFIX + ".foo.assertingparty.metadata-uri=" + metadataUrl)
|
|
|
|
|
.run((context) -> {
|
|
|
|
|
RelyingPartyRegistrationRepository repository = context
|
|
|
|
|
.getBean(RelyingPartyRegistrationRepository.class);
|
|
|
|
@ -157,8 +157,8 @@ class Saml2RelyingPartyAutoConfigurationTests {
|
|
|
|
|
server.start();
|
|
|
|
|
String metadataUrl = server.url("").toString();
|
|
|
|
|
setupMockResponse(server, new ClassPathResource("saml/idp-metadata"));
|
|
|
|
|
this.contextRunner.withPropertyValues(PREFIX + ".foo.asserting-party.metadata-uri=" + metadataUrl,
|
|
|
|
|
PREFIX + ".foo.asserting-party.singlesignon.binding=redirect").run((context) -> {
|
|
|
|
|
this.contextRunner.withPropertyValues(PREFIX + ".foo.assertingparty.metadata-uri=" + metadataUrl,
|
|
|
|
|
PREFIX + ".foo.assertingparty.singlesignon.binding=redirect").run((context) -> {
|
|
|
|
|
RelyingPartyRegistrationRepository repository = context
|
|
|
|
|
.getBean(RelyingPartyRegistrationRepository.class);
|
|
|
|
|
RelyingPartyRegistration registration = repository.findByRegistrationId("foo");
|
|
|
|
@ -216,19 +216,19 @@ class Saml2RelyingPartyAutoConfigurationTests {
|
|
|
|
|
|
|
|
|
|
private String[] getPropertyValuesWithoutSigningCredentials(boolean signRequests) {
|
|
|
|
|
return new String[] { PREFIX
|
|
|
|
|
+ ".foo.asserting-party.singlesignon.url=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php",
|
|
|
|
|
PREFIX + ".foo.asserting-party.singlesignon.binding=post",
|
|
|
|
|
PREFIX + ".foo.asserting-party.singlesignon.sign-request=" + signRequests,
|
|
|
|
|
PREFIX + ".foo.asserting-party.entity-id=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php",
|
|
|
|
|
PREFIX + ".foo.asserting-party.verification.credentials[0].certificate-location=classpath:saml/certificate-location" };
|
|
|
|
|
+ ".foo.assertingparty.singlesignon.url=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php",
|
|
|
|
|
PREFIX + ".foo.assertingparty.singlesignon.binding=post",
|
|
|
|
|
PREFIX + ".foo.assertingparty.singlesignon.sign-request=" + signRequests,
|
|
|
|
|
PREFIX + ".foo.assertingparty.entity-id=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php",
|
|
|
|
|
PREFIX + ".foo.assertingparty.verification.credentials[0].certificate-location=classpath:saml/certificate-location" };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String[] getPropertyValuesWithoutSsoBinding() {
|
|
|
|
|
return new String[] { PREFIX
|
|
|
|
|
+ ".foo.asserting-party.singlesignon.url=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php",
|
|
|
|
|
PREFIX + ".foo.asserting-party.singlesignon.sign-request=false",
|
|
|
|
|
PREFIX + ".foo.asserting-party.entity-id=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php",
|
|
|
|
|
PREFIX + ".foo.asserting-party.verification.credentials[0].certificate-location=classpath:saml/certificate-location" };
|
|
|
|
|
+ ".foo.assertingparty.singlesignon.url=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php",
|
|
|
|
|
PREFIX + ".foo.assertingparty.singlesignon.sign-request=false",
|
|
|
|
|
PREFIX + ".foo.assertingparty.entity-id=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php",
|
|
|
|
|
PREFIX + ".foo.assertingparty.verification.credentials[0].certificate-location=classpath:saml/certificate-location" };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private String[] getPropertyValues() {
|
|
|
|
@ -237,11 +237,11 @@ class Saml2RelyingPartyAutoConfigurationTests {
|
|
|
|
|
PREFIX + ".foo.signing.credentials[0].certificate-location=classpath:saml/certificate-location",
|
|
|
|
|
PREFIX + ".foo.decryption.credentials[0].private-key-location=classpath:saml/private-key-location",
|
|
|
|
|
PREFIX + ".foo.decryption.credentials[0].certificate-location=classpath:saml/certificate-location",
|
|
|
|
|
PREFIX + ".foo.asserting-party.singlesignon.url=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php",
|
|
|
|
|
PREFIX + ".foo.asserting-party.singlesignon.binding=post",
|
|
|
|
|
PREFIX + ".foo.asserting-party.singlesignon.sign-request=false",
|
|
|
|
|
PREFIX + ".foo.asserting-party.entity-id=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php",
|
|
|
|
|
PREFIX + ".foo.asserting-party.verification.credentials[0].certificate-location=classpath:saml/certificate-location",
|
|
|
|
|
PREFIX + ".foo.assertingparty.singlesignon.url=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php",
|
|
|
|
|
PREFIX + ".foo.assertingparty.singlesignon.binding=post",
|
|
|
|
|
PREFIX + ".foo.assertingparty.singlesignon.sign-request=false",
|
|
|
|
|
PREFIX + ".foo.assertingparty.entity-id=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php",
|
|
|
|
|
PREFIX + ".foo.assertingparty.verification.credentials[0].certificate-location=classpath:saml/certificate-location",
|
|
|
|
|
PREFIX + ".foo.entity-id={baseUrl}/saml2/foo-entity-id",
|
|
|
|
|
PREFIX + ".foo.acs.location={baseUrl}/login/saml2/foo-entity-id",
|
|
|
|
|
PREFIX + ".foo.acs.binding=redirect" };
|
|
|
|
|