1. Spring Security
- Spring Framework 기반으로 애플리케이션의 인증(Authentication)과 인가(Authorization or 권한 부여) 기능을 가진 프레임워크이다
- 모든 필수 파일은 애플리케이션에 포함되어 있으며, 애플리케이션이 독립적으로 작동하는 것을 목표로 한다
- Java Runtime Environment에 특별한 구성 파일을 배치할 필요가 없다
- JAAS(Java Authentication and Authorization Service) 정책 파일의 구성이 필요 없다
- Spring Security를 공통 클래스 경로 위치에 배치하지 않아도 된다
- 한 시스템에서 다른 시스템으로 대상 아티팩트(JAR, WAR 또는 EAR)를 복사함과 동시에 작동하므로 최대 배포 시간의 유연성을 제공한다
- Apache 2.0 라이센스 하에 출시된 오픈 소스 소프트웨어이다
- Java 8 이상의 환경이 필요하다
- Spring Security는 종속성을 Maven 아티팩트로 배포한다
2. Spring Security 용어
- 주체(Principal)
- 유저, 기기, 시스템 등이 될 수 있지만, 일반적으로 유저(사용자)를 의미한다 - 인증(Authentication)
- 특정 리소스에 접근하려고 하는 사용자가 누구인지 확인하는 경우에 사용한다
- 주체의 신원(identity)을 증명하는 과정이다
- 주체는 자신을 인증하기 위해 신원 증명 정보(credential)을 제시한다
- 주체가 유저일 경우 신원 증명 정보는 패스워드(password)이다 - 인가(Authorization = 권한 부여)
- 인증을 마친 유저에게 권한(authority)을 부여하여 애플리케이션의 특정 리소스에 접근할 수 있게 허가하는 과정이다
- 인가는 반드시 인증 과정 이후 수행되어야 한다
- 권한은 롤 형태로 부여한다 - 접근 통제(Access control)
- 어떤 유저가 애플리케이션 리소스에 접근하도록 허락할지를 제어하는 행위이다
- 접근 통제 결정(access control decision)이 필요하다
- 리소스의 접근 속성과 유저에게 부여된 권한 또는 다른 속성들을 결정한다
3. Spring Security 제공 기능
- 모든 요청에 대해서 인증을 요구한다
- 사용자 이름과 암호를 가진 사용자가 양식 기반으로 인증할 수 있도록 허용한다
- 사용자의 로그아웃을 허용한다
- CSRF(Cross-Site Request Forgery) 공격을 방지한다
- CSRF 공격은 사용자가 자신의 의지와는 무관하게 공격자가 의도한 행위(수정, 삭제, 등록 등)를 특정 웹사이트에 요청하게 하는 공격을 의미한다 - Session Fixsation(세션 고정 공격)을 보호 한다
- Session Fixsation은 공격자가 자신의 세션 id를 다른 사용자에게 넘겨주고 공격하게 하는 방법을 의미한다 - 보안 헤더 통합
- HSTS 강화
- X-Content-TypeOptions
- 캐시 컨트롤(정적 리소스 캐싱)
- X-XSS-Protection XSS 보안
: 스크립트 공격 보안
- 클릭재킹을 방지하는 X-Frame 옵션 통합
: 클릭재킹이란 웹 사용자가 클릭하고 있는 것에 다른 것을 대체하여 클릭하도록 속이는 기법으로 공격자는 비밀 정보 유출이나 컴퓨터에 대한 제어권을 획득할 수 있게 된다 - Servlet API 제공
※ 참조 링크
▶ Spring Security Tutorial : https://docs.spring.io/spring-security/reference/index.html
Spring Security :: Spring Security
If you are ready to start securing an application see the Getting Started sections for servlet and reactive. These sections will walk you through creating your first Spring Security applications. If you want to understand how Spring Security works, you can
docs.spring.io
▶ Spring Security Q&A
: https://stackoverflow.com/questions/tagged/spring-security
Newest 'spring-security' Questions
Stack Overflow | The World’s Largest Online Community for Developers
stackoverflow.com
: https://github.com/spring-projects/spring-security/issues
GitHub - spring-projects/spring-security: Spring Security
Spring Security. Contribute to spring-projects/spring-security development by creating an account on GitHub.
github.com
▶ Spring Security Source Code : https://github.com/spring-projects/spring-security/
GitHub - spring-projects/spring-security: Spring Security
Spring Security. Contribute to spring-projects/spring-security development by creating an account on GitHub.
github.com
▶ HSTS(HTTP Strict Transport Security) 기능
HSTS(HTTP Strict Transport Security) 기능
HSTS(HTTP Strict Transport Security) HSTS(HTTP Strict Transport Security)는, ...
blog.naver.com
▶ 클릭재킹 : https://ko.wikipedia.org/wiki/%ED%81%B4%EB%A6%AD%EC%9E%AC%ED%82%B9
클릭재킹 - 위키백과, 우리 모두의 백과사전
위키백과, 우리 모두의 백과사전. 클릭재킹(Clickjacking, User Interface redress attack, UI redress attack, UI redressing)은 웹 사용자가 자신이 클릭하고 있다고 인지하는 것과 다른 어떤 것을 클릭하게 속이는
ko.wikipedia.org
'Spring Security' 카테고리의 다른 글
Spring Security - OAuth2 인증(Authentication) (0) | 2022.07.31 |
---|---|
Spring Security - Filter & FilterChain (0) | 2022.07.30 |
Spring Security - JWT 로그인 (0) | 2022.07.28 |
Spring Security - JWT Bearer 인증 (0) | 2022.07.27 |
Spring Security - JWT 인증(Authentication) (0) | 2022.07.27 |