[Security] 인증(Authentication) vs 인가(Authorization)의 차이

LeeSeungEun·2023년 9월 21일

Security

목록 보기
1/4

1. 개념

1. 인증(Authentication)

  • 사용자가 회원인지 확인

2. 인가(Authorization)

  • 사용자가 요청을 실행할 수 있는 권한이 있는지 확인

2. 예시

  • permitAll()은 인증 필터를 거치치 않고 인가 처리
    따라서, “/sign-up” URL 요청 시에는 인증 필터를 거치지 않고, 인가 처리가 되어 접근 가능
  • anyReqeust().authenticated()의 의미는 인증을 거친 사용자만 인가 처리
http.authorizeRequests().antMatchers("/sign-up").permitAll()
												.anyReqeust().authenticated()

3. 출처

https://ksh-coding.tistory.com/54

0개의 댓글