Spring Security  2.0 다운로드 파일에 들어있는 예제를 이해하는데 도움을 주기 위해 두 가지 작업만 했다.
  • jsp를 한글로 변경해서 톰캣에 올려서 보면서 이해하기 쉽게 함
  • 이클립스 프로젝트로 변경
이클립스 인코딩은 UTF-8로 설정해야 한다. JDK 6.0, Tomcat 6에서 테스트한 것이다. 다운로드 파일에 예제가 하나 뿐인 것이 아쉽지만, 레퍼런스가 있어서 사용하는데 무리가 없을 것 같다. 설정이 완전히 바뀌었지만, 내부 메커니즘 이해를 위해서는 5회 KSUG 세미나에 진행한 내용이 여전히 유용한 것 같다.



Todo 목록: 아래 사항을 쉽게 쓸 수 있는 래퍼 혹은 적용을 도울 예제 만들기


  • Simplified namespace-based configuration syntax. Old configurations could require hundreds of lines of XML but our new convention over configuration approach ensures that many deployments will now require less than 10 lines.
  • OpenID integration, which is the web's emerging single sign on standard (supported by Google, IBM, Sun, Yahoo and others)
  • Windows NTLM support, providing easy enterprise-wide single sign on against Windows corporate networks
  • Support for JSR 250 ("EJB 3") security annotations, delivering a standards-based model for authorization metadata
  • AspectJ pointcut expression language support, allowing developers to apply cross-cutting security logic across their Spring managed objects
  • Substantial improvements to the high-performance domain object instance security ("ACL") capabilities
  • Comprehensive support for RESTful web request authorization, which works well with Spring 2.5's @MVC model for building RESTful systems
  • Long-requested support for groups, hierarchical roles and a user management API, which all combine to reduce development time and significantly improve system administration
  • An improved, database-backed "remember me" implementation
  • Support for portlet authentication out-of-the-box
  • Support for additional languages
  • Numerous other general improvements, documentation and new samples
  • New support for web state and flow transition authorization through the Spring Web Flow 2.0 release
  • New support for visualizing secured methods, plus configuration auto-completion support in Spring IDE
  • Enhanced WSS (formerly WS-Security) support through the Spring Web Services 1.5 release
출처: http://www.infoq.com/news/2008/04/spring-security

참고사항: Pathway from ACEGI to Spring Security 2.0

이올린에 북마크하기(0) 이올린에 추천하기(0)

5회 사용자 모임 발표 시나리오 사전 공유

우선 보안 처리가 없는 간단한 웹 애플리케이션을 가지고 다음 사항을 하나씩 실현해본다.
1. 보호할 페이지는 로그인 하게!
2. 패스워드 등을 확인하여 인증Authenticate!
3. 권한이 없는 사용자는 접근 거부 페이지Access Denied page로!
4. 인증authenticated과 권한 확인authorized에 성공하면 해당 페이지로!
5. 인증을 수행한 클라이언트는 쿠키를 통해 향후에는 로그인이 필요 없게!
6. 인증정보를 세션에 보관하여 뒤이은 요청에서 사용하게!
7. 캐시를 사용하여 성능 향상!
8. 사용자가 로그아웃하면 세션에 보관하던 객체 제거!

해야 할 일에 대해서.. 그림을 그릴 수 있는 것들은 옮겨본다.

1. Servlet Filter 대신 Bean을 쓰기
사용자 삽입 이미지

web.xml 이 아니라 스프링으로 설정하기 위해서 FilterChainProxy 활용

사용자 삽입 이미지


그림만 쭉 이어봐도 대략의 스토리가 나온다.
주요 필터들
사용자 삽입 이미지

Manager와 Provider 관계
사용자 삽입 이미지

계층적으로 보기
사용자 삽입 이미지

실제 클래스 배열해보기
사용자 삽입 이미지
Security Interceptor 종류

사용자 삽입 이미지

Security Interceptor 의 collaborator
사용자 삽입 이미지

참고

  • Securing Java applications with Acegi, Part 1: Architectural overview and security filters: http://www.ibm.com/developerworks/java/library/j-acegi1/
  • Spring in Action, 2nd edition, Craig Walls, Ryan Breidenbach, Manning 7장
이올린에 북마크하기(0) 이올린에 추천하기(0)