spring-projects / spring-projects/spring-security
Improve documentation about CRSF and WebSocket
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
I am with the current problem described here:
And seems the following is mandatory ('possible' answer/solution):
The current Spring Security Reference Documentation in the 23. WebSocket Security section, "practically" does not teach how configure Spring Security with WebSocket and keeping CSRF.
Thus, by the moment I must disable CRSF, therefore override the sameOriginDisabled method
@Override
protected boolean sameOriginDisabled() {
return true;
}
The problem is I don't want disable CRSF, thus avoid override the sameOriginDisabled method , but this 'missing' stompWebSocketHandlerMapping problem arises.
Not sure if it is a bug or something else is need it to be configured, if is the latter it must be included in the reference documentation.
Thus for this post consider the scenario about never override the sameOriginDisabled method and define/configure the stompWebSocketHandlerMapping bean that is expected.
Thank You
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Spring Security Reference Documentation's WebSocket Security section and compare it with the configuration described in the issue and linked discussions. The documentation is done when it explains how to use WebSocket security while retaining CSRF, including the expected stompWebSocketHandlerMapping configuration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- documentation, security
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100