Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-20747

Remove usage of deprecated Spring Security classes for route policies

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 4.7.0
    • camel-spring-security
    • None
    • Unknown

    Description

      You can currently define route policies as follows:

      @Bean(RolePolicy.ADMIN) public AuthorizationPolicy authorizationPolicyAdmin(AuthenticationManager authenticationManager) { SpringSecurityAuthorizationPolicy authorizationPolicy = new SpringSecurityAuthorizationPolicy(); authorizationPolicy.setAuthenticationManager(authenticationManager); authorizationPolicy.setSpringSecurityAccessPolicy(new SpringSecurityAccessPolicy("ROLE_ADMIN")); authorizationPolicy.setAccessDecisionManager(new AffirmativeBased(Collections.singletonList(new RoleVoter()))); return authorizationPolicy; }

       
      This is however using deprecated classes that will disappear in spring security 7, and is leveraging the deprecated AccessDecisionManager concept instead of the new AuthorizationManager.

      See the following references and discussions for details:

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              santa.85 Marco Santarelli
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: