Skip to content
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

The spring.ssl properties metadata seems to be missing #35656

Closed
sandipchitale opened this issue May 26, 2023 · 9 comments
Closed

The spring.ssl properties metadata seems to be missing #35656

sandipchitale opened this issue May 26, 2023 · 9 comments
Labels
status: superseded An issue that has been superseded by another type: bug A general bug

Comments

@sandipchitale
Copy link

sandipchitale commented May 26, 2023

Spring 3.1.0 supports SSLBundles (good!). The properties for it are defined here:

/**
 * Properties for centralized SSL trust material configuration.
 *
  ...
 * @since 3.1.0
 */
@ConfigurationProperties(prefix = "spring.ssl")
public class SslProperties {

The metadata for this seems to be missing (?):

spring-boot-project/spring-boot-autoconfigure/src/main/resources/META-INF/additional-spring-configuration-metadata.json

In VSCode I see:

Unknown property 'spring.ssl'

for this config in application.yaml

---
spring:
  ssl:
    bundle:
...
...

BTW runtime wroks, no issues.

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label May 26, 2023
@snicoll
Copy link
Member

snicoll commented May 27, 2023

spring.ssl is a namespace (a prefix), not a property. The file you've referenced is for manual metadata, metadata for keys under spring.ssl are generated automatically and you should see them in your IDE.

What do you mean by "runtime works"? The config you've shared is not doing anything, it should use pem or jks and then configure an actual bundle, see https://docs.spring.io/spring-boot/docs/current/reference/html/features.html#features.ssl.jks

@snicoll snicoll added the status: waiting-for-feedback We need additional information before we can continue label May 27, 2023
@sandipchitale
Copy link
Author

I see. I had shown truncated configuration. I do have more keys under that, I just did not show them. Not sure why then but VScode tooling for spring is showing me an error.

@spring-projects-issues spring-projects-issues added status: feedback-provided Feedback has been provided and removed status: waiting-for-feedback We need additional information before we can continue labels May 27, 2023
@sandipchitale
Copy link
Author

From your comments it appears that the metadata is not statically generated but should be dynamically built by tooling/IDE. If that is the case, should I move this to VSCode spring support extension?

@snicoll
Copy link
Member

snicoll commented May 27, 2023

it appears that the metadata is not statically generated but should be dynamically built by tooling/IDE.

No. It's built automatically by us.

Not sure why then but VScode tooling for spring is showing me an error.

I see it now also with IntelliJ IDEA Odd, as the metadata has been generated but for some reason the IDE doesn't recognize it.

@snicoll snicoll self-assigned this May 27, 2023
@sandipchitale
Copy link
Author

sandipchitale commented May 28, 2023

Good. Looking forward to the fix.

I also thought it was odd. BTW while debugging I also found some oddities with source being out of sync with bytecode for certain classes. So I did fresh dependency updates again via gradle but got the same. I will file a separate issue if I continue to experience that. May be the artifacts were not built properly?

@snicoll snicoll added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged status: feedback-provided Feedback has been provided labels Jun 6, 2023
@snicoll snicoll added this to the 3.1.1 milestone Jun 6, 2023
@snicoll
Copy link
Member

snicoll commented Jun 6, 2023

Closing in favor of PR #35667

@snicoll snicoll closed this as not planned Won't fix, can't repro, duplicate, stale Jun 6, 2023
@snicoll snicoll added the status: superseded An issue that has been superseded by another label Jun 6, 2023
@snicoll snicoll removed this from the 3.1.1 milestone Jun 6, 2023
@snicoll snicoll removed their assignment Jun 6, 2023
@sandipchitale
Copy link
Author

sandipchitale commented Jun 7, 2023

Hmmm....I was not aware of the that mechanism i.e. config.accept("spring.ssl"); . Good to know. I thought @NestedConfigurationProperty was meant to deal with this. I will need to understand @NestedConfigurationProperty better I guess.

@wilkinsona
Copy link
Member

config.accept("spring.ssl") is only needed for generating our reference documentation. It controls how the properties are grouped in the appendix.

@sandipchitale
Copy link
Author

sandipchitale commented Jun 9, 2023

Oh I see. So @NestedConfigurationProperty was actually causing the bug. Interesting. And now when I think about it I do not recall seeing @NestedConfigurationProperty on the List<...> or Set<...> and properties and in fact it did cross my mind why these were there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: superseded An issue that has been superseded by another type: bug A general bug
Projects
None yet
Development

No branches or pull requests

4 participants