호돌맨의 블로그

호돌맨의 블로그

  • 분류 전체보기 (61)
    • 사진 (10)
    • 여행 (8)
      • [2018-01] 홋카이도 (2)
      • [2017-12] 홋카이도 (5)
    • 개발 이야기 (26)
    • 우당탕탕 대모험 (15)
  • 홈
RSS 피드
로그인
로그아웃 글쓰기 관리

호돌맨의 블로그

컨텐츠 검색

태그

nginx 아사리야마 에키벤 Spring Security 호돌맨 2024년 시상식 linux 개발자 제니바코 springboot 배드맨 회고 spring 호돌맨 a7m3 플라워문 logrotate 우아한형제들 spring batch 슈퍼호쿠토 홋카이도

최근글

댓글

공지사항

아카이브

Spring Security(2)

  • SpringSecurity에서 anonymous()

    Spring에서 테스트를 돌리는 중 Unauthorized(401)가 아닌 Forbidden(403)이 발생하는 문제가 생겼다. @RestController @RequiredArgsConstructor public class PostController { private final PostService postService; @PreAuthorize("isAuthenticated()") @PostMapping("/api/bbs/{name}/posts") public void post(@PathVariable String name, @Valid @RequestBody WritePost request, @AuthenticationPrincipal ExternalUser externalUser) { postSe..

    2019.08.15
  • Spring Boot 2.x, 3.x Security에서 hasPermission 사용

    Spring Boot2.x에서 Spring Security를 이용해 권한을 관리 할 수 있다. 기본적으로 Override된 configure(HttpSecurity http)에서 AntMatcher를 이용해 Role확인을 할 수 있다. 하지만 관리 대상과 요구사항이 많아지면 Role만으로는 문제 해결이 용이하지 않다. 그래서 MethodSecurity를 이용한 권한 관리 방법을 간략히 정리한다. Gradle 설정 compile("org.springframework.boot:spring-boot-starter-security") compile("org.springframework.security:spring-security-oauth2-client") compile("org.springframework.s..

    2019.08.11
이전
1
다음
호돌맨

티스토리툴바