-
Notifications
You must be signed in to change notification settings - Fork 11
Security
Ignacio del Valle Alles edited this page Feb 18, 2016
·
13 revisions
Brutusin-RPC seamless integrates with Spring security.
Configuration can be performed according to the AbstractSecurityWebApplicationInitializer without Existing Spring topic.
Programmatic security via getPrincipal()
and isUserInRole(String roleName)
obtained HttpActionSupport.getInstance()
and WebsocketActionSupport.getInstance()
, as corresponding.
Non-authorized action executions must throw a java.lang.SecurityException
.
The framework uses JSR-356 Websockets, with a custom implementation to integrate with Spring security with the following characteristics:
- Websocket enpoint is deployed behind spring
springSecurityFilterChain
- In order to avoid CSRF attacks the following origin verification algorithm is performed (see
WebsocketEndpointConfigurator
):- If the handshake request doesn't have an
Origin
header skip validation - If a
accessControlOriginHost
environment variable has been configured, verifyOrigin
header matches this value - Else (default case): Verify
Origin
andHost
header values match
- If the handshake request doesn't have an
See rpc-demo-security-jar
demo project
- Home
- Getting started
- Services
- HTTP services
- Messaging topics
- Spring
- Documenting
- Referencing source code
- Builtin components
- Configuration
- Deployment
- Client APIs
- Security
- Developer notes
- Architecture
- Examples