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

Add documentation for configuring public endpoints #16345

Closed
wants to merge 1 commit into from

Conversation

Meehdi
Copy link
Contributor

@Meehdi Meehdi commented Dec 26, 2024

Related to 14122 .

This documents authentication Semantics for Public Endpoints.

It includes:

  • Adding Java and Kotlin examples for configuring public endpoints.
  • Add notes about authentication behavior with permitAll()
  • Document usage of SecurityFilterChain and @Order annotation to bypass authentication for public endpoints

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

rwinch commented Jan 7, 2025

Thanks for the Pull Request!

I am going to decline this pull request, because how to make an endpoint public is already documented in Authorizing Requests.

@rwinch rwinch closed this Jan 7, 2025
@Meehdi
Copy link
Contributor Author

Meehdi commented Jan 8, 2025

Hello Rob, thanks for you reply.

Correct if I am wrong, but when authentication credentials are provided in the request, the filter chain will check whether the credentials are valid or not, even for public endpoints.
For a given request containing invalid credentials, the client gets a 401 Error, which might be disturbing since the endpoint is public.
That's why I wanted to document this behaviour since it is not mentioned in the docs.

Let me know, if you want me to rework that or put it in a different section. I understand also that you might find it not pertinent.

Thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-triage An issue we've not yet triaged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants