You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(api): stop embedding phone ID in adapter notification JWT claims
Address PR review: the token used phoneID as both the readable sub claim and the HS256 signing secret, so anyone who saw one token could read the secret and forge further ones. The sub claim is unnecessary since the adapter already knows which phone ID to verify against from its own gateway registration, so it is removed; the phone ID remains the signing secret only.
- http_notification_sender.go: getAuthToken no longer sets Subject.
- adapter-emulator/notification_handler.go: verifyNotificationAuth no longer checks claims.Subject.
- Updated tests in api/pkg/services and tests/ to assert sub is empty instead of equal to the phone ID.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 45ed9de9-a3ad-41cf-ad32-ebec28d9771c
0 commit comments