Skip to content

Ability to disable anonymous authentication in RSocketSecurity #17132

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

Open
Aaur1s opened this issue May 18, 2025 · 2 comments · May be fixed by #17159
Open

Ability to disable anonymous authentication in RSocketSecurity #17132

Aaur1s opened this issue May 18, 2025 · 2 comments · May be fixed by #17159
Labels
in: config An issue in spring-security-config status: ideal-for-contribution An issue that we actively are looking for someone to help us with type: enhancement A general enhancement

Comments

@Aaur1s
Copy link

Aaur1s commented May 18, 2025

Expected Behavior

RSocketSecurity dsl should have ability to disable anonymous auth interceptor

Current Behavior

RSocketSecurity has hardcode in private method that adds anonymous interceptor no matter what

Context

I'm doing method-level security and rely on @PreAuthorize("authenticated"), my global security config has just permitAll. So anonymous authentication ruining my rsocket experience, for http security i can just disable it.
As workaround i constructed PayloadSocketAcceptorInterceptor entirely by hand, but this process is quite tedious, it would be nice to be able to disable it in RSocketSecurity dsl like in http.

@Aaur1s Aaur1s added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels May 18, 2025
@jzheaux
Copy link
Contributor

jzheaux commented May 21, 2025

Thanks for the suggestion, @Aaur1s. Are you able to submit a PR to add this? I think just the ability to disable will be fine for the time being since there are no other configurable aspects of AnonymousPayloadInterceptor.

@jzheaux jzheaux added in: config An issue in spring-security-config status: ideal-for-contribution An issue that we actively are looking for someone to help us with and removed status: waiting-for-triage An issue we've not yet triaged labels May 21, 2025
therepanic added a commit to therepanic/spring-security that referenced this issue May 22, 2025
therepanic added a commit to therepanic/spring-security that referenced this issue May 22, 2025
jzheaux pushed a commit to therepanic/spring-security that referenced this issue May 22, 2025
@Aaur1s
Copy link
Author

Aaur1s commented May 24, 2025

Hey, I didn't able to answer in time, sorry. Thank you for your work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: config An issue in spring-security-config status: ideal-for-contribution An issue that we actively are looking for someone to help us with type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants