-
Notifications
You must be signed in to change notification settings - Fork 309
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
[톰캣 구현하기 - 3, 4단계] 포이(김보준) 미션 제출합니다. #409
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
고생하셨습니다 포이! Connector 클래스에 신기한 기술을 많이 사용하셨네요..! 처음보는 기술이 많아서 많이 배우고 가네요 ㅎㅎ 이번에는 이 부분 집중적으로 얘기해봤으면 좋겠네요!
간단하게 제 생각 남겼으니까 참고 부탁드립니다!
tomcat/src/main/java/nextstep/jwp/controller/rest/RegisterController.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/nextstep/jwp/controller/rest/LoginController.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/nextstep/jwp/controller/rest/RegisterController.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/nextstep/jwp/controller/ResponseEntity.java
Outdated
Show resolved
Hide resolved
tomcat/src/main/java/nextstep/jwp/controller/StaticResourceResolver.java
Outdated
Show resolved
Hide resolved
Kudos, SonarCloud Quality Gate passed! 0 Bugs 0.0% Coverage The version of Java (11.0.20.1) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
안녕하세요 포이! 아이미스유네요.. 리뷰 너무 늦게 해드려서 죄송합니다ㅠ
쓰레드 관련해서 많이 고민하고 학습하신것 같아서 이만 어프로브 하겠습니다!
두둠 굿투씨유어게인입니다! 어프로브 하실 때 남겨주신 커멘트 확인했습니다. 감사합니다 👍
다른 부분에 대해서는 처음 리뷰 요청을 드렸을 때에 비해 큰 변경점이 없지만, Session 관련해 몇 가지 변경이 있어 이 과정과 이유를 먼저 공유해드립니다!
이 의견에 굉장히 공감했습니다. 그래서 두둠이 제시해주신 방향으로 Session을 리팩터링 해보았는데, 밑의 커멘트에서 약간 의문이 생겨 Session의 id에 대해 몇가지 찾아보았습니다.
일단 Session id에는 유의미한 정보가 들어가면 안된다고 합니다. 쿠키에 저장되는 만큼 탈취 위험이 있고, 만약 추측할 수 있는 규칙이 있다면 프로그램 전체 보안에 큰 타격이 있을 수 있다고 합니다. (세션의 expired 기간이 있는 이유, 웹 어플리케이션에서 프레임워크가 제공하는 세션 기능을 사용하는 것을 권장하는 이유도 같은 맥락인 것 같네요)
그래서 만약 별다른 이유가 없다면 세션 아이디 정책은 제가 정한 정책을 어느 곳에서도 일관적으로 사용하도록 하는 것이 좋겠다고 생각했습니다. 이로 인해 결국 다시 SessionManager안에 UUID 객체를 직접 가지도록 변경했습니다...🥲
글이 너무 길어졌네요..! 이번 단계에서는 미션에 있는 요구사항을 디테일하게 반영하려고 노력해보았습니다! 의문이 생기는 부분이 있다면 편하게 커멘트 남겨주시면 감사할 것 같습니다! 오늘도 좋은 하루 되세요~🫡
구구의 커멘트 를 보고 ThreadPoolExecutor 대신 Executors를 사용하도록 리팩터링해보았습니다.
테스트 코드도 작성해봤는데 이 부분에 대해 커멘트 남겨주시면 감사할 것 같습니다!