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

client-side stomp authentication headers are passed to the message broker [SPR-11154] #15781

Closed
spring-projects-issues opened this issue Dec 4, 2013 · 3 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

spring-projects-issues commented Dec 4, 2013

zyro opened SPR-11154 and commented

environment: using rabbitmq with its stomp plugin and default configuration as message broker impl.

if i understand correctly how the stomp client registration currently works, it should never be necessary that a (web-) user sends stomp authentication headers ("login"/"passcode") in a websocket message?

the behavior that i am currently seeing is:

  1. wrong/dummy credentials: [BAD CONNECT] reply from rabbitmq
  2. empty strings as login/passcode: some header format error from StompDecoder
  3. no credentials (i.e. empty js-object as stompClient connect headers): works

--> even if #3 works, that does mean a client is able to "knock" at the message brokers stomp authentication (#1).
--> also, i guess #3 does just work because the rabbitmq default configuration defines a "default_user" (guest/guest) that is used if login/passcode are omitted.
--> shouldnt the configured StompBrokerRelayRegistration.applicationLogin and StompBrokerRelayRegistration.applicationPasscode be used for a users CONNECT-frame as well?


Affects: 4.0 RC2

Issue Links:

Referenced from: commits 4e5e700

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

Currently we have systemLogin/Password fields in the broker relay, which are used for the shared "system" connection used to send messages from the within the (server-side) application. We can add applicationLogin/Password properties and set them if client CONNECT frames don't already have such headers. Does that seem reasonable?

@spring-projects-issues
Copy link
Collaborator Author

zyro commented

applicationLogin/Passcode sounds good. but i would suggest that these settings do - if they are set - override the corresponding headers on a message incoming from a websocket client.

@spring-projects-issues
Copy link
Collaborator Author

Rossen Stoyanchev commented

See commit 4e5e70.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

2 participants