Class ASecurityConfig

  • Direct Known Subclasses:
    ActiveMonitorSecurityConfig, SecurityConfig

    @EnableGlobalAuthentication
    @Configuration
    public abstract class ASecurityConfig
    extends Object
    Generic implementation for security configuration of a server hosting ActivePivot, or Content server or ActiveMonitor.

    This class contains methods:
    * To define authorized users, * To enable anonymous user access, * To configure the JWT filter, * To configure the security for Version service.

    Author:
    ActiveViam
    • Constructor Detail

      • ASecurityConfig

        public ASecurityConfig()
    • Method Detail

      • basicAuthenticationEntryPoint

        @Bean(name="basicAuthenticationEntryPoint")
        public org.springframework.security.web.AuthenticationEntryPoint basicAuthenticationEntryPoint()
        Returns the default AuthenticationEntryPoint to use for the fallback basic HTTP authentication.
        Returns:
        The default AuthenticationEntryPoint for the fallback HTTP basic authentication.
      • configureGlobal

        @Autowired
        public void configureGlobal​(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)
                             throws Exception
        Throws:
        Exception
      • userDetailsService

        @Bean
        public org.springframework.security.core.userdetails.UserDetailsService userDetailsService()
      • technicalUserDetailsService

        protected org.springframework.security.provisioning.UserDetailsManager technicalUserDetailsService()
        Creates and returns the technical users (one for ActivePivot Live, one for ActivePivot) that can be used to authenticate the connections from ActivePivot Live or ActivePivot
        Returns:
        user data
      • authorityComparator

        @Bean
        public com.quartetfs.biz.pivot.security.IAuthorityComparator authorityComparator()
        [Bean] Comparator for user roles

        Defines the comparator used by:

        * com.quartetfs.biz.pivot.security.impl.ContextValueManager#setAuthorityComparator(IAuthorityComparator)
        * IJwtService
        Returns:
        a comparator that indicates which authority/role prevails over another. NOTICE - an authority coming AFTER another one prevails over this "previous" authority. This authority ordering definition is essential to resolve possible ambiguity when, for a given user, a context value has been defined in more than one authority applicable to that user. In such case, it is what has been set for the "prevailing" authority that will be effectively retained for that context value for that user.
      • activeMonitorGrantedAuthorities

        protected static String[] activeMonitorGrantedAuthorities()
        The authorities of the sentinel technical user
        Returns:
        the authorities of the sentinel technical user
      • passwordEncoder

        @Bean
        public org.springframework.security.crypto.password.PasswordEncoder passwordEncoder()