복붙노트

[SPRING] 차이가 액세스 = "permitAll"과 필터 = "없음"?

SPRING

차이가 액세스 = "permitAll"과 필터 = "없음"?

여기 Spring Security petclinic 예제의 일부가 있습니다.

<http use-expressions="true">
    <intercept-url pattern="/" access="permitAll"/>
    <intercept-url pattern="/static/**" filters="none" />
    <intercept-url pattern="/**" access="isAuthenticated()" />
    <form-login />
    <logout />
</http>

access = "permitAll"과 filters = "none"의 차이점은 무엇입니까?

URL : http://static.springsource.org/spring-security/site/petclinic-tutorial.html

해결법

  1. ==============================

    1.차이점은 filters = "none"은 지정된 URL에 대해 스프링 보안 필터를 비활성화하는 반면 access = "permitAll"은 필터를 비활성화하지 않고 권한을 구성한다는 것입니다.

    차이점은 filters = "none"은 지정된 URL에 대해 스프링 보안 필터를 비활성화하는 반면 access = "permitAll"은 필터를 비활성화하지 않고 권한을 구성한다는 것입니다.

    실제로, filters = "none"이면 그것의 리소스가 Spring Security의 일부 기능을 필요로 할 때 문제가 발생할 수 있습니다. 예를 들어 제출시 프로그래밍 방식의 로그인을 수행하는 사용자 등록 페이지에는 사용할 수 없습니다 (사용자 권한 부여는 항상 : ROLE_ANONYMOUS입니까?).

  2. from https://stackoverflow.com/questions/7391735/difference-between-access-permitall-and-filters-none by cc-by-sa and MIT license