java.lang.Object
de.iip_ecosphere.platform.support.aas.basyx2.server.apps.security.ServerConfig

@Configuration @EnableWebSecurity public class ServerConfig extends Object
Performs a web server configuration for tomcat.
Author:
Holger Eichelberger, SSE
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.springframework.security.web.SecurityFilterChain
    securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity)
    Defines the security filter chain.
    org.springframework.boot.web.servlet.server.ServletWebServerFactory
    servletContainer(SSLConnectorCustomizer sslConnectorCustomizer)
    Creates the servlet web server factory.
    org.springframework.security.core.userdetails.UserDetailsService
    Provides the user details service.
    org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer
    Provides the web security customizer, in particular helpful for debugging.

    Methods inherited from class java.lang.Object

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

    • authDesc

      @Autowired(required=false) private de.iip_ecosphere.platform.support.aas.AuthenticationDescriptor authDesc
  • Constructor Details

    • ServerConfig

      public ServerConfig()
  • Method Details

    • servletContainer

      @Bean public org.springframework.boot.web.servlet.server.ServletWebServerFactory servletContainer(SSLConnectorCustomizer sslConnectorCustomizer)
      Creates the servlet web server factory.
      Parameters:
      sslConnectorCustomizer - the connector customizer
      Returns:
      the factory instance
    • securityFilterChain

      @Bean public org.springframework.security.web.SecurityFilterChain securityFilterChain(org.springframework.security.config.annotation.web.builders.HttpSecurity httpSecurity) throws Exception
      Defines the security filter chain.
      Parameters:
      httpSecurity - the security object
      Returns:
      the modified/defined filter chain
      Throws:
      Exception - if defining fails
    • userDetailsService

      @Bean public org.springframework.security.core.userdetails.UserDetailsService userDetailsService()
      Provides the user details service.
      Returns:
      the user details service
    • webSecurityCustomizer

      @Bean public org.springframework.security.config.annotation.web.configuration.WebSecurityCustomizer webSecurityCustomizer()
      Provides the web security customizer, in particular helpful for debugging.
      Returns:
      the customizer