spring-security icon indicating copy to clipboard operation
spring-security copied to clipboard

OpenID Connect 1.0 UserService customization doesn't work

Open NZhuravlev opened this issue 1 year ago • 2 comments
trafficstars

Describe the bug

The example here doesn't work.

To Reproduce

Just repeat the customization and see that the requests are not autorized at all. Adding

.authorizeHttpRequests(c -> c.anyRequest().authenticated())

will enable authorization back but the userService won't be called during the auth process. Adding scope: profile,email to the configuration fixed, but I have no idea why and I don't know how could somebody guess what is wrong.

Expected behavior

Configuration just works without additional changes that are not trivial to figure out.

NZhuravlev avatar Sep 23 '24 21:09 NZhuravlev

Thanks for the feedback on using the documentation, @NZhuravlev! I'd like to understand the feedback better though, to know whether this specific page of the documentation is problematic (in isolation) or if your experience reading the docs caused difficulty overall in some way.

Just repeat the customization and see that the requests are not autorized at all.

Sometimes documentation examples include an ellipsis (...) to indicate the sample is not a complete configuration example. When you applied the customization, did this example in the documentation gave the impression that it was a complete sample? Would adding an ellipsis help indicate that it does not work in isolation? Or is your feedback indicating that samples like this should be "complete" in some way so that the entire code can be lifted and plugged into a working application?

Adding scope: profile,email to the configuration fixed, but I have no idea why and I don't know how could somebody guess what is wrong.

You added scope to the application.yml in a Spring Boot application, correct? Do you mean to say that you added scope to an existing set of properties? Or did you add properties for a ClientRegistration only after applying this customization?

Can you elaborate on your experience with the docs overall? Specifically, I'm wondering if you had reviewed the "Core Configuration" chapter first since this chapter is titled "Advanced Configuration" or if you felt this section should stand alone and give you what's needed without the need to review earlier sections?

sjohnr avatar Oct 15 '24 16:10 sjohnr

If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.

spring-projects-issues avatar Oct 22 '24 16:10 spring-projects-issues

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

spring-projects-issues avatar Oct 29 '24 16:10 spring-projects-issues