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

webSocket 연결에서 Authorization에 관련한 malfunctioning (우선순위 낮음) #38

Open
dioo1461 opened this issue Nov 17, 2024 · 1 comment

Comments

@dioo1461
Copy link
Member

dioo1461 commented Nov 17, 2024

  • invalid한 accessToken으로 웹소켓 연결 시, 세션으로부터 메시지를 수신하지는 못하나 본인이 전송한 메시지는 webSocket 세션에 전파됨
  • 사실 당장 크게 문제될 부분은 아니긴 해서, 나중에 시간 날 때 한 번 보면 좋을 듯?
  • 해당 문제가 고쳐지면, 채팅방 LEAVE 메시지에 AccessToken을 넣어 보내는 부분은 제거해도 될 거 같음
@dioo1461 dioo1461 changed the title webSocket 연결에서 Authrization에 관련한 malfunctioning webSocket 연결에서 Authorization에 관련한 malfunctioning Nov 17, 2024
@dioo1461 dioo1461 changed the title webSocket 연결에서 Authorization에 관련한 malfunctioning webSocket 연결에서 Authorization에 관련한 malfunctioning (우선순위 낮음) Nov 17, 2024
@unikal1
Copy link
Contributor

unikal1 commented Nov 21, 2024

  1. Leave에 access token을 넣는 까닭은 다음과 같음.
  • 웹소켓 요청으로 전해진 메시지의 헤더에 대하여, 이는 연결 초기 CONNECT 시 인증 정보를 통해 서버와의 인증을 진행하고, 이후의 메시지에 대해서는 이미 한번 연결된 상태이기 때문에 더 이상의 인증을 진행하지 않음.
  • 즉, 헤더 정보는 맨 처음 연결 이후엔 백엔드 단에서 가져올 방도가 없으며 따라서 추가적인 메시지에 대해 사용자의 인증 정보를 얻기 위해서는 메시지 브로커를 통한 세션 관리나 redis를 통한 세션-userId 매핑을 통해 임시적으로 데이터를 관리해야됨.
  • 그런데 그럴 바엔 그냥 Leave의 메시지에는 프론트단에서 입력하는 데이터가 필요 없으니 여기에 토큰을 담는게 좋다고 판단함.
  1. invalid access token 연결 문제에 대해선, 고치는 중

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

No branches or pull requests

2 participants