[재질문2] FilterSecurityInterceptor
- 작성자 :
- 최*혁
- 작성일 :
- 2010-12-20 10:17:08
- 조회수 :
- 2,820
- 구분 :
- 실행환경
- 진행상태 :
- 완료
Q
제가 등록해서 사용하는 URL은 다음과 같습니다.
보시다 시피, 순서는 저번에 적었다시피 제일 나중에 오도록 했구요.
SecuredObjectDAO에 DEF_ROLES_AND_URL_QUERY의 SQL을 직접 수정하였으며, 실행하면 다음과 같이 결과가 나옵니다.
/index\.jsp.* ROLE_ANONYMOUS
/xxxx/xxx/loginUsr\.do.* ROLE_ANONYMOUS
/common/msg/*.* ROLE_ANONYMOUS
/j_spring_security.* ROLE_ANONYMOUS
/style/*.* ROLE_ANONYMOUS
/images/*.* ROLE_ANONYMOUS
/gpkisecureweb/*.* ROLE_ANONYMOUS
/js/*.* ROLE_ANONYMOUS
/css/*.* ROLE_ANONYMOUS
/xxxx/xxx/actionLogin\.do.* ROLE_ANONYMOUS
/xxxx/xxx/actionCertLogin\.do.* ROLE_ANONYMOUS
/xxxx/xxx/schOutpassword\.do.* ROLE_ANONYMOUS
/uss/umt/mber/*.* ROLE_ANONYMOUS
/WEB-INF/jsp/sti/main/loginUsrView.jsp ROLE_ANONYMOUS
/*.* ROLE_USER
그리고, 아래 bean 정의에서 custom-filter element를 comment 처리하는 게 정상적인 건가요? (이걸 제거해야지만 무한루프에서 벗어나는 데요)
<b:bean id="filterSecurityInterceptor"
class="org.springframework.security.intercept.web.FilterSecurityInterceptor">
<custom-filter before="FILTER_SECURITY_INTERCEPTOR" />
<b:property name="authenticationManager" ref="authenticationManager" />
<b:property name="accessDecisionManager" ref="accessDecisionManager" />
<b:property name="objectDefinitionSource" ref="databaseObjectDefinitionSource" />
</b:bean>
보시다 시피, 순서는 저번에 적었다시피 제일 나중에 오도록 했구요.
SecuredObjectDAO에 DEF_ROLES_AND_URL_QUERY의 SQL을 직접 수정하였으며, 실행하면 다음과 같이 결과가 나옵니다.
/index\.jsp.* ROLE_ANONYMOUS
/xxxx/xxx/loginUsr\.do.* ROLE_ANONYMOUS
/common/msg/*.* ROLE_ANONYMOUS
/j_spring_security.* ROLE_ANONYMOUS
/style/*.* ROLE_ANONYMOUS
/images/*.* ROLE_ANONYMOUS
/gpkisecureweb/*.* ROLE_ANONYMOUS
/js/*.* ROLE_ANONYMOUS
/css/*.* ROLE_ANONYMOUS
/xxxx/xxx/actionLogin\.do.* ROLE_ANONYMOUS
/xxxx/xxx/actionCertLogin\.do.* ROLE_ANONYMOUS
/xxxx/xxx/schOutpassword\.do.* ROLE_ANONYMOUS
/uss/umt/mber/*.* ROLE_ANONYMOUS
/WEB-INF/jsp/sti/main/loginUsrView.jsp ROLE_ANONYMOUS
/*.* ROLE_USER
그리고, 아래 bean 정의에서 custom-filter element를 comment 처리하는 게 정상적인 건가요? (이걸 제거해야지만 무한루프에서 벗어나는 데요)
<b:bean id="filterSecurityInterceptor"
class="org.springframework.security.intercept.web.FilterSecurityInterceptor">
<custom-filter before="FILTER_SECURITY_INTERCEPTOR" />
<b:property name="authenticationManager" ref="authenticationManager" />
<b:property name="accessDecisionManager" ref="accessDecisionManager" />
<b:property name="objectDefinitionSource" ref="databaseObjectDefinitionSource" />
</b:bean>
A
안녕하세요.. 최재혁님..
query의 결과가 나오는 순서가 중요한 것이 아니라..
secured_resources 테이블에 있는 sort_order의 숫자로 우선순위를 적용하시는 것입니다.
/*.* 패턴에 대한 sort_order를 확인해 보시면 될 것 같습니다.
그리고.. filterSecurityInterceptor는 실제 권한을 점검하는 interceptor를 활성화하기 위해서 필요합니다.
(무한루프는 위의 권한을 해결하면.. 자연히 해결된 것 같습니다.)
그럼.. 즐거운 하루되십시오.
감사합니다.
query의 결과가 나오는 순서가 중요한 것이 아니라..
secured_resources 테이블에 있는 sort_order의 숫자로 우선순위를 적용하시는 것입니다.
/*.* 패턴에 대한 sort_order를 확인해 보시면 될 것 같습니다.
그리고.. filterSecurityInterceptor는 실제 권한을 점검하는 interceptor를 활성화하기 위해서 필요합니다.
(무한루프는 위의 권한을 해결하면.. 자연히 해결된 것 같습니다.)
그럼.. 즐거운 하루되십시오.
감사합니다.