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

Update application.yml in Getting Started guide #1519

Conversation

rozagerardo
Copy link
Contributor

@rozagerardo rozagerardo commented Jan 19, 2024

Update application.yml in Getting Started guide so it aligns with the UserDetailsService @Bean defined in the "Defining Required Components" section.

Issue gh-1186

With Boot 3.2.0 the auto-configured InMemoryUserDetailsManager bean (used by our minimal configuration) is backing-off because we include the spring-security-oauth2-resource-server dependency, and with an additional condition introduced since 3.2.2 - if none of the spring.security.user name or password properties is present in the setup.

With this update in the minimal configuration guidelines, the service is starting correctly.

Fixes spring-projectsgh-1475
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jan 19, 2024
@jgrandja jgrandja changed the title Fix startup issue for minimal config guidelines Update application.yml for Getting Started guide Jan 22, 2024
@jgrandja jgrandja changed the title Update application.yml for Getting Started guide Update application.yml in Getting Started guide Jan 22, 2024
@jgrandja jgrandja self-assigned this Jan 22, 2024
@jgrandja jgrandja added type: bug A general bug and removed status: waiting-for-triage An issue we've not yet triaged labels Jan 22, 2024
@jgrandja jgrandja added this to the 1.1.5 milestone Jan 22, 2024
@jgrandja jgrandja self-requested a review January 22, 2024 21:44
@jgrandja jgrandja closed this in 6b04022 Jan 22, 2024
@jgrandja
Copy link
Collaborator

Thanks for the PR @rozagerardo.

Just a heads up that I updated the PR description and associated commit message as the original description stated that this fixed gh-1475, which is not the case. We'll need to wait until Boot 3.2.2 is released to validate the fix.

@rozagerardo
Copy link
Contributor Author

Cool @jgrandja. A quick question, though, if this doesn't "fix" #1475, then how will we resolve that issue?

Anyway, Boot 3.2.2 is GA now. The minimal configuration seems to be working with this version.

Here is a small sample to check it out (I included an OAuth2 Client and a RS to check the whole flow, just in case):

https://github.com/rozagerardo/samples/tree/spring/auth-server-minimal-config

Also, as I was working on the setup, I realized we're using the {noop} prefix for the client-secret, and I was wondering if we should follow the same approach for the user password we're including at this stage, mainly for consistency (it works either way). Let me know if I should modify/re-create the PR with that small change :)

@jgrandja
Copy link
Collaborator

@rozagerardo

A quick question, though, if this doesn't "fix" #1475, then how will we resolve that issue?

See this comment

@jgrandja
Copy link
Collaborator

@rozagerardo

I was wondering if we should follow the same approach for the user password we're including at this stage, mainly for consistency (it works either way)

I think we are fine to leave as-is. FYI, UserDetailsServiceAutoConfiguration automatically prefixes the password with {noop}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants