Class WebSocketSecurityConfig

java.lang.Object
org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer
org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
org.qubership.atp.auth.springbootstarter.config.WebSocketSecurityConfig
All Implemented Interfaces:
org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer

@Configuration @Profile("default") public class WebSocketSecurityConfig extends org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    configureInbound(org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry messages)
     
    org.springframework.security.messaging.access.intercept.ChannelSecurityInterceptor
    inboundChannelSecurity(org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource messageSecurityMetadataSource)
    Create ChannelSecurityInterceptor with custom authentication manager.
    protected org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider
     
    protected boolean
     

    Methods inherited from class org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer

    addArgumentResolvers, afterSingletonsInstantiated, configureClientInboundChannel, csrfChannelInterceptor, customizeClientInboundChannel, inboundMessageSecurityMetadataSource, registerStompEndpoints, securityContextChannelInterceptor, setApplicationContext, setMessageExpessionHandler, setMessageExpressionHandler, setObjectPostProcessor

    Methods inherited from class org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer

    addReturnValueHandlers, configureClientOutboundChannel, configureMessageBroker, configureMessageConverters, configureWebSocketTransport

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • WebSocketSecurityConfig

      public WebSocketSecurityConfig()
  • Method Details

    • configureInbound

      protected void configureInbound(org.springframework.security.config.annotation.web.messaging.MessageSecurityMetadataSourceRegistry messages)
      Overrides:
      configureInbound in class org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
    • inboundChannelSecurity

      @Bean public org.springframework.security.messaging.access.intercept.ChannelSecurityInterceptor inboundChannelSecurity(org.springframework.security.messaging.access.intercept.MessageSecurityMetadataSource messageSecurityMetadataSource)
      Create ChannelSecurityInterceptor with custom authentication manager.
      Overrides:
      inboundChannelSecurity in class org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer
      Parameters:
      messageSecurityMetadataSource - the messageSecurityMetadataSource
      Returns:
      ChannelSecurityInterceptor
    • keycloakAuthenticationProvider

      protected org.keycloak.adapters.springsecurity.authentication.KeycloakAuthenticationProvider keycloakAuthenticationProvider()
    • sameOriginDisabled

      protected boolean sameOriginDisabled()
      Overrides:
      sameOriginDisabled in class org.springframework.security.config.annotation.web.socket.AbstractSecurityWebSocketMessageBrokerConfigurer