-
Notifications
You must be signed in to change notification settings - Fork 1
TIL 1월 24일
whipbaek edited this page Jan 24, 2023
·
12 revisions
- somthing..
- somthing..
- somthing..
- somthing..
- somthing..
- somthing..
- somthing..
- somthing..
- somthing..
- Spring Security 관련 공부
- 진짜 노답이라 느꼈는데, 하나씩 뜯어서 찾아보다 보니 조금은 알겠다.
- 아직 할 거 천지인데.. 여기에 시간이 이만큼 뺏기면 안되는데 걱정이 많다.
- 관련 자료 : https://frogand.tistory.com/188 , https://mangkyu.tistory.com/76
- In Spring Security
-
인증(Authentication): 해당 사용자가 본인이 맞는지를 확인하는 절차. -
인가(Authorization): 인증된 사용자가 요청한 '특정 자원' 에 접근 가능한지를 결정하는 절차 - Authentication 이 이루어지고 나서, Authorizatino이 이루어진다.
-
-
Authentication- 현재 접근하는 주체의 정보와 권한을 담은 인터페이스이다. Authentication 객체는 Security Context에 저장되며, SecurityContextHolder를 통하여 SecurityContext에 접근하고, SecurityContext를 통해 Authentication에 접근할 수 있다.
public interface Authentication extends Principal, Serializable { // 현재 사용자의 권한 목록을 가져옴 Collection<? extends GrantedAuthority> getAuthorities(); // credential(주로 비밀번호)을 가져옴 Object getCredentials(); Object getDetails(); // Principal 객체를 가져옴 Object getPrincipal(); // 인증 여부를 가져옴 boolean isAuthenticated(); // 인증 여부를 설정함 void setAuthenticated(boolean isAuthenticated) throws IllegalArgumentException; }
-
SecurityContext- Authentication 객체를 보관하는 역할을 한다. SecurityContextHolder를 통해 Authenticatino 객체를 가져올 수 있다.
-
SecurityContextHolder- 보안 주체의 세부정부를 포함하여 응용프로개름의 현재 보안 컨텍스트에 대한 세부 정보가 저장된다. image
- somthing..
- somthing..
- somthing..