Skip to content

Commit b406971

Browse files
committed
Remove hyphen from asserting-party
spring.security.saml2.relyingparty.registration.*.asserting-party.* is now named spring.security.saml2.relyingparty.registration.*.assertingparty.* Closes gh-30785
1 parent 3c5cea4 commit b406971

File tree

7 files changed

+30
-30
lines changed

7 files changed

+30
-30
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/security/servlet/ManagementWebSecurityAutoConfigurationTests.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,10 @@ void backOffIfOAuth2ResourceServerAutoConfigurationPresent() {
136136
void backOffIfSaml2RelyingPartyAutoConfigurationPresent() {
137137
this.contextRunner.withConfiguration(AutoConfigurations.of(Saml2RelyingPartyAutoConfiguration.class))
138138
.withPropertyValues(
139-
"spring.security.saml2.relyingparty.registration.simplesamlphp.asserting-party.single-sign-on.url=https://simplesaml-for-spring-saml/SSOService.php",
140-
"spring.security.saml2.relyingparty.registration.simplesamlphp.asserting-party.single-sign-on.sign-request=false",
141-
"spring.security.saml2.relyingparty.registration.simplesamlphp.asserting-party.entity-id=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php",
142-
"spring.security.saml2.relyingparty.registration.simplesamlphp.asserting-party.verification.credentials[0].certificate-location=classpath:saml/certificate-location")
139+
"spring.security.saml2.relyingparty.registration.simplesamlphp.assertingparty.single-sign-on.url=https://simplesaml-for-spring-saml/SSOService.php",
140+
"spring.security.saml2.relyingparty.registration.simplesamlphp.assertingparty.single-sign-on.sign-request=false",
141+
"spring.security.saml2.relyingparty.registration.simplesamlphp.assertingparty.entity-id=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/metadata.php",
142+
"spring.security.saml2.relyingparty.registration.simplesamlphp.assertingparty.verification.credentials[0].certificate-location=classpath:saml/certificate-location")
143143
.run((context) -> assertThat(context).doesNotHaveBean(ManagementWebSecurityAutoConfiguration.class)
144144
.doesNotHaveBean(MANAGEMENT_SECURITY_FILTER_CHAIN_BEAN));
145145
}

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyProperties.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,11 @@ public static class Registration {
6868
/**
6969
* Remote SAML Identity Provider.
7070
*/
71-
private final AssertingParty assertingParty = new AssertingParty();
71+
private final AssertingParty assertingparty = new AssertingParty();
7272

7373
/**
7474
* Remote SAML Identity Provider.
75-
* @deprecated use {@link #assertingParty}
75+
* @deprecated use {@link #assertingparty}
7676
*/
7777
@Deprecated
7878
private final AssertingParty identityprovider = new AssertingParty();
@@ -97,14 +97,14 @@ public Decryption getDecryption() {
9797
return this.decryption;
9898
}
9999

100-
public AssertingParty getAssertingParty() {
101-
return this.assertingParty;
100+
public AssertingParty getAssertingparty() {
101+
return this.assertingparty;
102102
}
103103

104104
/**
105105
* Remote SAML Identity Provider.
106106
* @return remote SAML Identity Provider
107-
* @deprecated use {@link #getAssertingParty()}
107+
* @deprecated use {@link #getAssertingparty()}
108108
*/
109109
@Deprecated
110110
public AssertingParty getIdentityprovider() {

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyRegistrationConfiguration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,15 @@ Boolean getSingleSignonSignRequest() {
203203

204204
@SuppressWarnings("deprecation")
205205
private <T> T get(String name, Function<AssertingParty, T> getter) {
206-
T newValue = getter.apply(this.registration.getAssertingParty());
206+
T newValue = getter.apply(this.registration.getAssertingparty());
207207
if (newValue != null) {
208208
return newValue;
209209
}
210210
T deprecatedValue = getter.apply(this.registration.getIdentityprovider());
211211
if (deprecatedValue != null) {
212212
logger.warn(LogMessage.format(
213213
"Property 'spring.security.saml2.relyingparty.registration.identityprovider.%1$s.%2$s' is deprecated, "
214-
+ "please use 'spring.security.saml2.relyingparty.registration.asserting-party.%1$s.%2$s' instead",
214+
+ "please use 'spring.security.saml2.relyingparty.registration.assertingparty.%1$s.%2$s' instead",
215215
this.id, name));
216216
return deprecatedValue;
217217
}

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyAutoConfigurationTests.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ void autoconfigurationShouldQueryAssertingPartyMetadataWhenMetadataUrlIsPresent(
186186
server.start();
187187
String metadataUrl = server.url("").toString();
188188
setupMockResponse(server, new ClassPathResource("saml/idp-metadata"));
189-
this.contextRunner.withPropertyValues(PREFIX + ".foo.asserting-party.metadata-uri=" + metadataUrl)
189+
this.contextRunner.withPropertyValues(PREFIX + ".foo.assertingparty.metadata-uri=" + metadataUrl)
190190
.run((context) -> {
191191
assertThat(context).hasSingleBean(RelyingPartyRegistrationRepository.class);
192192
assertThat(server.getRequestCount()).isEqualTo(1);
@@ -215,7 +215,7 @@ void autoconfigurationShouldUseBindingFromMetadataUrlIfPresent() throws Exceptio
215215
server.start();
216216
String metadataUrl = server.url("").toString();
217217
setupMockResponse(server, new ClassPathResource("saml/idp-metadata"));
218-
this.contextRunner.withPropertyValues(PREFIX + ".foo.asserting-party.metadata-uri=" + metadataUrl)
218+
this.contextRunner.withPropertyValues(PREFIX + ".foo.assertingparty.metadata-uri=" + metadataUrl)
219219
.run((context) -> {
220220
RelyingPartyRegistrationRepository repository = context
221221
.getBean(RelyingPartyRegistrationRepository.class);
@@ -250,8 +250,8 @@ void autoconfigurationWhenMetadataUrlAndPropertyPresentShouldUseBindingFromPrope
250250
server.start();
251251
String metadataUrl = server.url("").toString();
252252
setupMockResponse(server, new ClassPathResource("saml/idp-metadata"));
253-
this.contextRunner.withPropertyValues(PREFIX + ".foo.asserting-party.metadata-uri=" + metadataUrl,
254-
PREFIX + ".foo.asserting-party.singlesignon.binding=redirect").run((context) -> {
253+
this.contextRunner.withPropertyValues(PREFIX + ".foo.assertingparty.metadata-uri=" + metadataUrl,
254+
PREFIX + ".foo.assertingparty.singlesignon.binding=redirect").run((context) -> {
255255
RelyingPartyRegistrationRepository repository = context
256256
.getBean(RelyingPartyRegistrationRepository.class);
257257
RelyingPartyRegistration registration = repository.findByRegistrationId("foo");
@@ -378,7 +378,7 @@ void samlLoginShouldShouldBeConditionalOnSecurityWebFilterClassDeprecated() {
378378
}
379379

380380
private String[] getPropertyValuesWithoutSigningCredentials(boolean signRequests, boolean useDeprecated) {
381-
String assertingParty = useDeprecated ? "identityprovider" : "asserting-party";
381+
String assertingParty = useDeprecated ? "identityprovider" : "assertingparty";
382382
return new String[] {
383383
PREFIX + ".foo." + assertingParty
384384
+ ".singlesignon.url=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php",
@@ -391,7 +391,7 @@ private String[] getPropertyValuesWithoutSigningCredentials(boolean signRequests
391391
}
392392

393393
private String[] getPropertyValuesWithoutSsoBinding(boolean useDeprecated) {
394-
String assertingParty = useDeprecated ? "identityprovider" : "asserting-party";
394+
String assertingParty = useDeprecated ? "identityprovider" : "assertingparty";
395395
return new String[] {
396396
PREFIX + ".foo." + assertingParty
397397
+ ".singlesignon.url=https://simplesaml-for-spring-saml.cfapps.io/saml2/idp/SSOService.php",
@@ -403,7 +403,7 @@ private String[] getPropertyValuesWithoutSsoBinding(boolean useDeprecated) {
403403
}
404404

405405
private String[] getPropertyValues(boolean useDeprecated) {
406-
String assertingParty = useDeprecated ? "identityprovider" : "asserting-party";
406+
String assertingParty = useDeprecated ? "identityprovider" : "assertingparty";
407407
return new String[] {
408408
PREFIX + ".foo.signing.credentials[0].private-key-location=classpath:saml/private-key-location",
409409
PREFIX + ".foo.signing.credentials[0].certificate-location=classpath:saml/certificate-location",

spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/security/saml2/Saml2RelyingPartyPropertiesTests.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,26 +41,26 @@ class Saml2RelyingPartyPropertiesTests {
4141

4242
@Test
4343
void customizeSsoUrl() {
44-
bind("spring.security.saml2.relyingparty.registration.simplesamlphp.asserting-party.single-sign-on.url",
44+
bind("spring.security.saml2.relyingparty.registration.simplesamlphp.assertingparty.single-sign-on.url",
4545
"https://simplesaml-for-spring-saml/SSOService.php");
4646
assertThat(
47-
this.properties.getRegistration().get("simplesamlphp").getAssertingParty().getSinglesignon().getUrl())
47+
this.properties.getRegistration().get("simplesamlphp").getAssertingparty().getSinglesignon().getUrl())
4848
.isEqualTo("https://simplesaml-for-spring-saml/SSOService.php");
4949
}
5050

5151
@Test
5252
void customizeSsoBinding() {
53-
bind("spring.security.saml2.relyingparty.registration.simplesamlphp.asserting-party.single-sign-on.binding",
53+
bind("spring.security.saml2.relyingparty.registration.simplesamlphp.assertingparty.single-sign-on.binding",
5454
"post");
55-
assertThat(this.properties.getRegistration().get("simplesamlphp").getAssertingParty().getSinglesignon()
55+
assertThat(this.properties.getRegistration().get("simplesamlphp").getAssertingparty().getSinglesignon()
5656
.getBinding()).isEqualTo(Saml2MessageBinding.POST);
5757
}
5858

5959
@Test
6060
void customizeSsoSignRequests() {
61-
bind("spring.security.saml2.relyingparty.registration.simplesamlphp.asserting-party.single-sign-on.sign-request",
61+
bind("spring.security.saml2.relyingparty.registration.simplesamlphp.assertingparty.single-sign-on.sign-request",
6262
"false");
63-
assertThat(this.properties.getRegistration().get("simplesamlphp").getAssertingParty().getSinglesignon()
63+
assertThat(this.properties.getRegistration().get("simplesamlphp").getAssertingparty().getSinglesignon()
6464
.getSignRequest()).isEqualTo(false);
6565
}
6666

@@ -80,9 +80,9 @@ void customizeRelyingPartyEntityIdDefaultsToServiceProviderMetadata() {
8080

8181
@Test
8282
void customizeAssertingPartyMetadataUri() {
83-
bind("spring.security.saml2.relyingparty.registration.simplesamlphp.asserting-party.metadata-uri",
83+
bind("spring.security.saml2.relyingparty.registration.simplesamlphp.assertingparty.metadata-uri",
8484
"https://idp.example.org/metadata");
85-
assertThat(this.properties.getRegistration().get("simplesamlphp").getAssertingParty().getMetadataUri())
85+
assertThat(this.properties.getRegistration().get("simplesamlphp").getAssertingparty().getMetadataUri())
8686
.isEqualTo("https://idp.example.org/metadata");
8787
}
8888

spring-boot-project/spring-boot-docs/src/docs/asciidoc/web/spring-security.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ You can register multiple relying parties under the `spring.security.saml2.relyi
262262
credentials:
263263
- private-key-location: "path-to-private-key"
264264
certificate-location: "path-to-certificate"
265-
asserting-party:
265+
assertingparty:
266266
verification:
267267
credentials:
268268
- certificate-location: "path-to-verification-cert"
@@ -278,7 +278,7 @@ You can register multiple relying parties under the `spring.security.saml2.relyi
278278
credentials:
279279
- private-key-location: "path-to-private-key"
280280
certificate-location: "path-to-certificate"
281-
asserting-party:
281+
assertingparty:
282282
verification:
283283
credentials:
284284
- certificate-location: "path-to-other-verification-cert"

spring-boot-tests/spring-boot-smoke-tests/spring-boot-smoke-test-saml2-service-provider/src/main/resources/application.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spring:
88
credentials:
99
- private-key-location: "classpath:saml/privatekey.txt"
1010
certificate-location: "classpath:saml/certificate.txt"
11-
asserting-party:
11+
assertingparty:
1212
verification:
1313
credentials:
1414
- certificate-location: "classpath:saml/certificate.txt"
@@ -21,7 +21,7 @@ spring:
2121
credentials:
2222
- private-key-location: "classpath:saml/privatekey.txt"
2323
certificate-location: "classpath:saml/certificate.txt"
24-
asserting-party:
24+
assertingparty:
2525
verification:
2626
credentials:
2727
- certificate-location: "classpath:saml/certificate.txt"

0 commit comments

Comments
 (0)