Skip to content

Missing @NestedConfigurationProperty in Saml2RelyingPartyProperties #42065

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
alexanderankin opened this issue Aug 30, 2024 · 1 comment
Closed
Labels
status: invalid An issue that we don't feel is valid

Comments

@alexanderankin
Copy link

Shouldn't these have the nested annotation on them?

/**
* Assertion Consumer Service.
*/
private final Acs acs = new Acs();
private final Signing signing = new Signing();
private final Decryption decryption = new Decryption();
private final Singlelogout singlelogout = new Singlelogout();
/**
* Remote SAML Identity Provider.
*/
private final AssertingParty assertingparty = new AssertingParty();

total diff below, more than happy to submit a PR:

diff
--- ~/.config/JetBrains/IntelliJIdea2024.2/scratches/scratch_77.java	2024-08-30 12:11:07.746279448 -0400
+++ ~/.config/JetBrains/IntelliJIdea2024.2/scratches/scratch_78.java	2024-08-30 12:13:48.885056426 -0400
@@ -23,4 +23,5 @@
 
 import org.springframework.boot.context.properties.ConfigurationProperties;
+import org.springframework.boot.context.properties.NestedConfigurationProperty;
 import org.springframework.core.io.Resource;
 import org.springframework.security.saml2.provider.service.registration.Saml2MessageBinding;
@@ -61,10 +62,14 @@
 		 * Assertion Consumer Service.
 		 */
+		@NestedConfigurationProperty
 		private final Acs acs = new Acs();
 
+		@NestedConfigurationProperty
 		private final Signing signing = new Signing();
 
+		@NestedConfigurationProperty
 		private final Decryption decryption = new Decryption();
 
+		@NestedConfigurationProperty
 		private final Singlelogout singlelogout = new Singlelogout();
 
@@ -72,4 +77,5 @@
 		 * Remote SAML Identity Provider.
 		 */
+		@NestedConfigurationProperty
 		private final AssertingParty assertingparty = new AssertingParty();
 
@@ -258,8 +264,11 @@
 		private String metadataUri;
 
+		@NestedConfigurationProperty
 		private final Singlesignon singlesignon = new Singlesignon();
 
+		@NestedConfigurationProperty
 		private final Verification verification = new Verification();
 
+		@NestedConfigurationProperty
 		private final Singlelogout singlelogout = new Singlelogout();
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 30, 2024
@wilkinsona
Copy link
Member

From the documentation:

The annotation processor automatically considers inner classes as nested properties … You can use the @NestedConfigurationProperty annotation on a field to indicate that a regular (non-inner) class should be treated as if it were nested.

All of the fields above are of types that are inner-classes so @NestedConfigurationProperty isn't needed. Those properties, which are all nested beneath Registration, don't appear in the documentation appendix (or the metadata from which the documentation is derived) due to #9945.

@wilkinsona wilkinsona closed this as not planned Won't fix, can't repro, duplicate, stale Aug 30, 2024
@wilkinsona wilkinsona added status: invalid An issue that we don't feel is valid and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

3 participants