-
Notifications
You must be signed in to change notification settings - Fork 1
feat: 사용자 인증 Kafka 메시지 반영 기능 구현 #22
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| version: "3.8" | ||
|
|
||
| services: | ||
| auth-server: | ||
| build: | ||
| context: . | ||
| dockerfile: Dockerfile | ||
| image: devnogi-auth-server:local | ||
| container_name: devnogi-auth-server-local | ||
| ports: | ||
| - "${SERVER_PORT:-8091}:${SERVER_PORT:-8091}" | ||
| env_file: | ||
| - .env | ||
| environment: | ||
| SPRING_PROFILES_ACTIVE: default | ||
| SERVER_PORT: ${SERVER_PORT:-8091} | ||
| DB_IP: ${DB_IP:-host.docker.internal} | ||
| DB_PORT: ${DB_PORT:-3316} | ||
| DB_SCHEMA: ${DB_SCHEMA:-devnogi} | ||
| DB_USER: ${DB_USER:-devnogi} | ||
| DB_PASSWORD: ${DB_PASSWORD:-devnogi0529!} | ||
| KAFKA_BOOTSTRAP_SERVERS: ${KAFKA_BOOTSTRAP_SERVERS:-119.194.235.11:9102} | ||
| KAFKA_TOPIC_USER_VERIFICATION_VERIFY: ${KAFKA_TOPIC_USER_VERIFICATION_VERIFY:-USER_VERIFICATION_VERIFY_EVENT} | ||
| KAFKA_CONSUMER_GROUP_ID: ${KAFKA_CONSUMER_GROUP_ID:-devnogi-auth-user-verification-consumer-local} | ||
| JAVA_OPTS: -Xms256m -Xmx512m | ||
| restart: unless-stopped | ||
| extra_hosts: | ||
| - "host.docker.internal:host-gateway" | ||
| healthcheck: | ||
| test: ["CMD", "wget", "--no-verbose", "--tries=1", "--spider", "http://localhost:${SERVER_PORT:-8091}/actuator/health"] | ||
| interval: 30s | ||
| timeout: 10s | ||
| retries: 3 | ||
| start_period: 90s | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| package until.the.eternity.das.common.config; | ||
|
|
||
| import org.springframework.context.annotation.Configuration; | ||
| import org.springframework.kafka.annotation.EnableKafka; | ||
|
|
||
| @Configuration | ||
| @EnableKafka | ||
| public class KafkaListenerConfig { | ||
| } |
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -3,4 +3,5 @@ | |||
| public class UserUpdateConstant { | ||||
| public static final String INFO = "USER_INFO_UPDATE_EVENT"; | ||||
| public static final String PASSWORD = "PASSWORD_UPDATE_EVENT"; | ||||
| public static final String USER_VERIFICATION_VERIFY = "USER_VERIFICATION_VERIFY_EVENT"; | ||||
|
||||
| public static final String USER_VERIFICATION_VERIFY = "USER_VERIFICATION_VERIFY_EVENT"; |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -68,6 +68,18 @@ public class User { | |||||||
| @Enumerated(EnumType.STRING) | ||||||||
| private InactivatedType inactivatedType; | ||||||||
|
|
||||||||
| @Column(name = "server_name", length = 20) | ||||||||
| @Comment("게임 서버명") | ||||||||
| private String serverName; | ||||||||
|
|
||||||||
| @Column(name = "is_verified", nullable = false) | ||||||||
| @Comment("사용자 인증 상태") | ||||||||
| private boolean verified; | ||||||||
|
||||||||
| private boolean verified; | |
| @Builder.Default | |
| private boolean verified = false; |
Copilot
AI
Feb 17, 2026
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.
The updateGameProfile method allows updating both nickname and serverName together, but there's no validation to ensure the nickname doesn't conflict with existing users. This could lead to duplicate nickname constraint violations. Consider adding validation or using the existsByNicknameAndIdNot method to check for conflicts before updating, or document that validation should be done by the caller.
| Original file line number | Diff line number | Diff line change | ||
|---|---|---|---|---|
|
|
@@ -10,6 +10,8 @@ public interface UserRepository extends JpaRepository<User, Long> { | |||
|
|
||||
| boolean existsByNickname(String nickname); | ||||
|
|
||||
| boolean existsByNicknameAndIdNot(String nickname, Long id); | ||||
|
|
||||
|
Comment on lines
+13
to
+14
|
||||
| boolean existsByNicknameAndIdNot(String nickname, Long id); |
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.
The docker-compose file contains hardcoded sensitive information in plain text including database password 'devnogi0529!' on line 21 and Kafka bootstrap server IP address on line 22. Even for local development, credentials should not be hardcoded. These values should be moved to environment variables or a separate .env file that's not committed to version control.