Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/38 add enable global method security #71

Merged
merged 3 commits into from
May 7, 2021

Conversation

hongbin-dev
Copy link
Collaborator

#38

변경 사항

  • 스프링시큐리티의 필터가 2번 작동하는게 문제가 있었는데요. @EnableGlobalMethodSecurity을 활성화하니, 시큐리티 관련 필터가 잘 동작하는 것 같습니다. 그외에도 다른 메서드위에 추가적인 어노테이션을 활용할 수 있다고 합니다.
  • 403에러를 핸들링해주는 RestAccessDeniedHandler 메서드를 추가했습니다.

기타

  • 정말 설정할게 많네요. 시큐리티 끝이없다..

@hongbin-dev hongbin-dev self-assigned this May 4, 2021
Copy link
Collaborator

@plzprayme plzprayme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HandlerExceptionResolver 으로 글로벌하게 예외 처리를 할 수 있군요..
진짜 설정할게 너무 많네요 고생하셨습니다 !!!~!

.and()
.addFilterBefore(tokenAuthenticationFilter, UsernamePasswordAuthenticationFilter.class)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어떤 PR이었는지 기억은 안나지만 이 녀석의 선언 순서가 변경되었던 적이 있었던 것 같은데요.
혹시 이 녀석 선언 순서도 동작에 영향을 미칠까요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

명확하진 않지만
.anyRequest().authenticated() 하단에 작성하면 무관할 것 같습니다

@hongbin-dev hongbin-dev merged commit 43ed99c into develop May 7, 2021
@hongbin-dev hongbin-dev deleted the feat/38-add_enable_global_method_security branch May 7, 2021 06:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants