[ fix ]copliot 수정 사항 반영 #217
Merged
Merged
Conversation
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR aligns SSH user authentication and request persistence to consistently use the ubuntu_password_base64 field, fixing an incorrect DTO→Entity mapping and updating repository/query usage accordingly.
Changes:
- Fix
SaveRequestRequestDTO.toEntity()to store the same Base64 value intoubuntuPasswordBase64. - Update
RequestRepositorylookup fromfindByUbuntuUsernameAndUbuntuPassword(...)tofindByUbuntuUsernameAndUbuntuPasswordBase64(...). - Update
UserService.userAuth()and related unit tests to authenticate againstubuntuPasswordBase64.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/test/java/DGU_AI_LAB/admin_be/domain/users/service/UserServiceTest.java | Updates mocks/stubs to use getUbuntuPasswordBase64() and the new repository method. |
| src/main/java/DGU_AI_LAB/admin_be/domain/users/service/UserService.java | Switches authentication lookup/verification to ubuntuPasswordBase64. |
| src/main/java/DGU_AI_LAB/admin_be/domain/requests/repository/RequestRepository.java | Replaces the derived query method to filter by ubuntuPasswordBase64. |
| src/main/java/DGU_AI_LAB/admin_be/domain/requests/dto/request/SaveRequestRequestDTO.java | Fixes entity mapping to store Base64 password into ubuntuPasswordBase64. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| if (!encodedPassword.equals(request.getUbuntuPassword())) { | ||
| if (!passwordBase64.equals(request.getUbuntuPasswordBase64())) { | ||
| // 4-1. 비밀번호 불일치 로그 | ||
| log.error("사용자 '{}'에 대해 데이터베이스 비밀번호와 암호화된 비밀번호가 일치하지 않습니다. (내부 로직 오류 가능성)", dto.username()); |
Comment on lines
79
to
+80
| .ubuntuPassword(ubuntuPasswordBase64) | ||
| .ubuntuPasswordBase64(ubuntuPassword) | ||
| .ubuntuPasswordBase64(ubuntuPasswordBase64) |
|
Caution Failed to replace (edit) comment. This is likely due to insufficient permissions or the comment being deleted. Error details |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🌱 관련 이슈
🌱 작업 사항
SaveRequestRequestDTO.toEntity()에서 ubuntuPasswordBase64에 같은 base64 값을 저장하도록 수정됨
RequestRepository 조회 메서드 변경
UserService.userAuth()도 ubuntu_password_base64 기준으로 조회/검증하도록 수정됨
UserServiceTest mock도 새 메서드/필드 기준으로 수정됨
🌱 참고 사항
기능을 만들 때 생긴 이슈에 대해서 다른사람들이 참고해야 할 사항을 적습니다.
Summary by CodeRabbit
릴리스 노트