{"action":"created","issue":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1370","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1370/labels{/name}","comments_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1370/comments","events_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1370/events","html_url":"https://github.com/jhipster/generator-jhipster/issues/1370","id":67754436,"number":1370,"title":"WebSocket authentication error with token and OAuth2 authentication","user":{"login":"pochadri","id":3205161,"avatar_url":"https://avatars.githubusercontent.com/u/3205161?v=3","gravatar_id":"","url":"https://api.github.com/users/pochadri","html_url":"https://github.com/pochadri","followers_url":"https://api.github.com/users/pochadri/followers","following_url":"https://api.github.com/users/pochadri/following{/other_user}","gists_url":"https://api.github.com/users/pochadri/gists{/gist_id}","starred_url":"https://api.github.com/users/pochadri/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pochadri/subscriptions","organizations_url":"https://api.github.com/users/pochadri/orgs","repos_url":"https://api.github.com/users/pochadri/repos","events_url":"https://api.github.com/users/pochadri/events{/privacy}","received_events_url":"https://api.github.com/users/pochadri/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/jhipster/generator-jhipster/labels/bug","name":"bug","color":"fc2929"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/milestones/42","html_url":"https://github.com/jhipster/generator-jhipster/milestones/2.10.1","labels_url":"https://api.github.com/repos/jhipster/generator-jhipster/milestones/42/labels","id":1100937,"number":42,"title":"2.10.1","description":"","creator":{"login":"jdubois","id":316835,"avatar_url":"https://avatars.githubusercontent.com/u/316835?v=3","gravatar_id":"","url":"https://api.github.com/users/jdubois","html_url":"https://github.com/jdubois","followers_url":"https://api.github.com/users/jdubois/followers","following_url":"https://api.github.com/users/jdubois/following{/other_user}","gists_url":"https://api.github.com/users/jdubois/gists{/gist_id}","starred_url":"https://api.github.com/users/jdubois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdubois/subscriptions","organizations_url":"https://api.github.com/users/jdubois/orgs","repos_url":"https://api.github.com/users/jdubois/repos","events_url":"https://api.github.com/users/jdubois/events{/privacy}","received_events_url":"https://api.github.com/users/jdubois/received_events","type":"User","site_admin":false},"open_issues":0,"closed_issues":7,"state":"closed","created_at":"2015-05-07T20:27:34Z","updated_at":"2015-09-02T16:49:50Z","due_on":null,"closed_at":"2015-05-07T20:28:16Z"},"comments":53,"created_at":"2015-04-11T08:13:50Z","updated_at":"2015-09-02T16:49:50Z","closed_at":"2015-09-02T16:49:50Z","body":"I have created the app with following config -\r\njava 7, token based authentication, mongodb, without hazelcast.\r\n\r\nAt client side, this is the console output \r\nOpening Web Socket...\r\nstomp.min.js:8 Web Socket Opened...\r\nstomp.min.js:8 >>> CONNECT\r\nX-CSRF-TOKEN:undefined\r\naccept-version:1.1,1.0\r\nheart-beat:10000,10000\r\n\r\nstomp.min.js:8 <<< ERROR\r\nmessage:Failed to send message to ExecutorSubscribableChannel[clientInboundChannel]; nested exception is org.springframework.security.access.AccessDeniedException\\c Access is denied\r\ncontent-length:0\r\n\r\nAt server side,\r\n\r\n[ERROR] org.springframework.web.socket.messaging.StompSubProtocolHandler - Failed to send client message to application via MessageChannel in session 7ey98h6g. Sending STOMP ERROR to client.\r\norg.springframework.messaging.MessageDeliveryException: Failed to send message to ExecutorSubscribableChannel[clientInboundChannel]; nested exception is org.springframework.security.access.AccessDeniedException: Access is denied\r\nat org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:127) ~[spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:104) ~[spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.messaging.StompSubProtocolHandler.handleMessageFromClient(StompSubProtocolHandler.java:267) ~[spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.messaging.SubProtocolWebSocketHandler.handleMessage(SubProtocolWebSocketHandler.java:309) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.handler.WebSocketHandlerDecorator.handleMessage(WebSocketHandlerDecorator.java:75) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.handler.LoggingWebSocketHandlerDecorator.handleMessage(LoggingWebSocketHandlerDecorator.java:56) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.handler.ExceptionWebSocketHandlerDecorator.handleMessage(ExceptionWebSocketHandlerDecorator.java:72) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.sockjs.transport.session.AbstractSockJsSession.delegateMessages(AbstractSockJsSession.java:385) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.sockjs.transport.session.WebSocketServerSockJsSession.handleMessage(WebSocketServerSockJsSession.java:194) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.sockjs.transport.handler.SockJsWebSocketHandler.handleTextMessage(SockJsWebSocketHandler.java:92) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.handler.AbstractWebSocketHandler.handleMessage(AbstractWebSocketHandler.java:43) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter.handleTextMessage(StandardWebSocketHandlerAdapter.java:112) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter.access$000(StandardWebSocketHandlerAdapter.java:42) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter$3.onMessage(StandardWebSocketHandlerAdapter.java:82) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.web.socket.adapter.standard.StandardWebSocketHandlerAdapter$3.onMessage(StandardWebSocketHandlerAdapter.java:79) [spring-websocket-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.apache.tomcat.websocket.WsFrameBase.sendMessageText(WsFrameBase.java:393) [tomcat-embed-websocket-8.0.20.jar:8.0.20]\r\nat org.apache.tomcat.websocket.WsFrameBase.processDataText(WsFrameBase.java:494) [tomcat-embed-websocket-8.0.20.jar:8.0.20]\r\nat org.apache.tomcat.websocket.WsFrameBase.processData(WsFrameBase.java:289) [tomcat-embed-websocket-8.0.20.jar:8.0.20]\r\nat org.apache.tomcat.websocket.WsFrameBase.processInputBuffer(WsFrameBase.java:130) [tomcat-embed-websocket-8.0.20.jar:8.0.20]\r\nat org.apache.tomcat.websocket.server.WsFrameServer.onDataAvailable(WsFrameServer.java:60) [tomcat-embed-websocket-8.0.20.jar:8.0.20]\r\nat org.apache.tomcat.websocket.server.WsHttpUpgradeHandler$WsReadListener.onDataAvailable(WsHttpUpgradeHandler.java:203) [tomcat-embed-websocket-8.0.20.jar:8.0.20]\r\nat org.apache.coyote.http11.upgrade.AbstractServletInputStream.onDataAvailable(AbstractServletInputStream.java:198) [tomcat-embed-core-8.0.20.jar:8.0.20]\r\nat org.apache.coyote.http11.upgrade.AbstractProcessor.upgradeDispatch(AbstractProcessor.java:96) [tomcat-embed-core-8.0.20.jar:8.0.20]\r\nat org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:654) [tomcat-embed-core-8.0.20.jar:8.0.20]\r\nat org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:223) [tomcat-embed-core-8.0.20.jar:8.0.20]\r\nat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1558) [tomcat-embed-core-8.0.20.jar:8.0.20]\r\nat org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1515) [tomcat-embed-core-8.0.20.jar:8.0.20]\r\nat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_40]\r\nat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_40]\r\nat org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat-embed-core-8.0.20.jar:8.0.20]\r\nat java.lang.Thread.run(Thread.java:745) [na:1.8.0_40]\r\nCaused by: org.springframework.security.access.AccessDeniedException: Access is denied\r\nat org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:83) ~[spring-security-core-4.0.0.RELEASE.jar:na]\r\nat org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:232) ~[spring-security-core-4.0.0.RELEASE.jar:na]\r\nat org.springframework.security.messaging.access.intercept.ChannelSecurityInterceptor.preSend(ChannelSecurityInterceptor.java:71) ~[spring-security-messaging-4.0.0.RELEASE.jar:na]\r\nat org.springframework.messaging.support.AbstractMessageChannel$ChannelInterceptorChain.applyPreSend(AbstractMessageChannel.java:158) ~[spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\nat org.springframework.messaging.support.AbstractMessageChannel.send(AbstractMessageChannel.java:113) ~[spring-messaging-4.1.6.RELEASE.jar:4.1.6.RELEASE]\r\n... 30 common frames omitted"},"comment":{"url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/comments/137166822","html_url":"https://github.com/jhipster/generator-jhipster/issues/1370#issuecomment-137166822","issue_url":"https://api.github.com/repos/jhipster/generator-jhipster/issues/1370","id":137166822,"user":{"login":"jdubois","id":316835,"avatar_url":"https://avatars.githubusercontent.com/u/316835?v=3","gravatar_id":"","url":"https://api.github.com/users/jdubois","html_url":"https://github.com/jdubois","followers_url":"https://api.github.com/users/jdubois/followers","following_url":"https://api.github.com/users/jdubois/following{/other_user}","gists_url":"https://api.github.com/users/jdubois/gists{/gist_id}","starred_url":"https://api.github.com/users/jdubois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jdubois/subscriptions","organizations_url":"https://api.github.com/users/jdubois/orgs","repos_url":"https://api.github.com/users/jdubois/repos","events_url":"https://api.github.com/users/jdubois/events{/privacy}","received_events_url":"https://api.github.com/users/jdubois/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T16:49:50Z","updated_at":"2015-09-02T16:49:50Z","body":"I'm closing this:\r\n\r\n- This is solved for OAuth2\r\n- This can't be solved for XAuth at the moment, but this is documented"}}