WebSocket does not support Token Binding
Reported by
ravil...@gmail.com,
Mar 20 2018
|
|||||||
Issue descriptionChromium Version: 65.0.3325.162 OS Version: 10.0 64bit original issue: https://github.com/nwjs/nw.js/issues/6527 Description: WebSocket not working in Chromium on spotify.com What steps will reproduce the problem? 1. Open dev console in chromium 2. execute: window.location.href = 'https://open.spotify.com' 3. execute: new WebSocket('wss://gew-dealer.spotify.com'); What is the expected result? expected message "WebSocket connection to 'wss://gew-dealer.spotify.com/' failed: HTTP Authentication failed; no valid credentials available" What happens instead of that? generated message "WebSocket connection to 'wss://gew-dealer.spotify.com/' failed: Error in connection establishment: net::ERR_NOT_IMPLEMENTED" additional information: * In Chrome all works fine * If I turn on Fiddler on my computer then in chromium all works as expected. Without fiddler - net::ERR_NOT_IMPLEMENTED error is produced
,
Mar 20 2018
Done
,
Mar 20 2018
Thank you for providing more feedback. Adding the requester to the cc list. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Mar 20 2018
Is your Chromium built with enable_websockets=true build config flag?
,
Mar 20 2018
For testing I used chromium binaries from here https://chromium.woolyss.com/.
,
Mar 20 2018
I can't find information on what build flags they use. I suspect they do not enable websockets, so this bug is working as intended. I encourage you to contact them to see if they can enable websockets.
,
Mar 20 2018
I try testing websockets on other resources. By example on https://www.websocket.org/echo.html. And it works. If websockets will disabled then they would not work anywhere, would they?
,
Mar 20 2018
It's hard to say what modifications they could have added that could trigger that behavior. I'd suggest contacting the binary provider asking them to debug. Alternatively you could build your own Chromium binaries: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md
,
Mar 20 2018
Can you tell me which flags you use to compile Chormium? Because I have same problems on node-webkit, which use chromium. And developers of node-webkit said that problem in chromium (you can see that by url to original issue - https://github.com/nwjs/nw.js/issues/6527). Node-webkit use next flags: is_debug=false is_component_ffmpeg=true target_cpu="x64" enable_nacl=true enable_widevine=true.
,
Mar 20 2018
I think the default build uses no flags: https://chromium.googlesource.com/chromium/src/+/master/docs/windows_build_instructions.md#Setting-up-the-build You may want to build a release copy with is_debug=false https://www.chromium.org/developers/gn-build-configuration
,
Mar 27 2018
This issue looks like https://bugs.chromium.org/p/chromium/issues/detail?id=684681
,
Mar 27 2018
And I am able to reproduce with official Chromium binary downloaded here: https://download-chromium.appspot.com/dl/Linux_x64 . See the original NW.js issue for more information.
,
Mar 27 2018
PS: note that it's an issue in the official Chromium binary (not Chrome) -- it's not reproducible with the Chrome official binary .
,
Mar 27 2018
#11 So you're using an HTTP/2 proxy? Adding bnc@ in case it's related to recent WS/H2 work.
,
Mar 27 2018
#13 Have you tried Chrome Canary? https://www.google.com/chrome/browser/canary.html It won't mess up your stable Chrome installation.
,
Mar 27 2018
No I am not using proxy. I guess that might be the same issue because there could be some transparent proxy in the middle? And Chrome canary is good. It only reproduce with official Chromium canary.
,
Mar 27 2018
Re comment #11: Issue 684681 only concerns plantext websockets (ws scheme), whereas this issue is with encrypted websockets (wss scheme), therefore this seems to be a separate issue to me. Re comment #16: Just like you reported, I am not able to reproduce with Google Chrome 67.0.3377.1 (Official Build) dev (64-bit). However, I am able to reproduce with tip of the tree build (commit hash 12f9cbe62b). On a release build, I get ERR_NOT_IMPLEMENTED. On a debug build, Chromium crashes at websocket_basic_handshake_stream.cc:337. This is WebSocketBasicHandshakeStream::GetTokenBindingSignature(), see https://cs.chromium.org/chromium/src/net/websockets/websocket_basic_handshake_stream.cc?q=GetTokenBindingSignature. Adding Internals>Network>SSL label and cc'ing nharper for Token Binding. Re comment #14: I do not believe this is related to issue 801564.
,
Mar 27 2018
For reference, here's the stack trace of the debug build crash: [230093:230110:0327/104545.150348:FATAL:websocket_basic_handshake_stream.cc(337)] Check failed: false. #0 0x7f28b448f4ad base::debug::StackTrace::StackTrace() #1 0x7f28b448da6c base::debug::StackTrace::StackTrace() #2 0x7f28b451429a logging::LogMessage::~LogMessage() #3 0x7f28b2525a30 net::WebSocketBasicHandshakeStream::GetTokenBindingSignature() #4 0x7f28b1eef9c6 net::HttpNetworkTransaction::BuildTokenBindingHeader() #5 0x7f28b1eef41d net::HttpNetworkTransaction::BuildRequestHeaders() #6 0x7f28b1eec192 net::HttpNetworkTransaction::DoBuildRequest() #7 0x7f28b1ee3369 net::HttpNetworkTransaction::DoLoop() #8 0x7f28b1ee1ccf net::HttpNetworkTransaction::OnIOComplete() #9 0x7f28b1ee6b5b net::HttpNetworkTransaction::OnStreamReady() #10 0x7f28b1ee6e61 net::HttpNetworkTransaction::OnWebSocketHandshakeStreamReady() #11 0x7f28b1f6a264 net::HttpStreamFactoryImpl::JobController::OnWebSocketHandshakeStreamReady() #12 0x7f28b1f55898 net::HttpStreamFactoryImpl::Job::OnWebSocketHandshakeStreamReadyCallback() #13 0x7f28b1b098ef _ZN4base8internal13FunctorTraitsIMN3net16SocketBIOAdapterEFvvEvE6InvokeIRKNS_7WeakPtrIS3_EEJEEEvS5_OT_DpOT0_ #14 0x7f28b1b0986a _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN3net16SocketBIOAdapterEFvvERKNS_7WeakPtrIS5_EEJEEEvOT_OT0_DpOT1_ #15 0x7f28b1b09800 _ZN4base8internal7InvokerINS0_9BindStateIMN3net16SocketBIOAdapterEFvvEJNS_7WeakPtrIS4_EEEEEFvvEE7RunImplIRKS6_RKNSt3__15tupleIJS8_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEE #16 0x7f28b1b0979c _ZN4base8internal7InvokerINS0_9BindStateIMN3net16SocketBIOAdapterEFvvEJNS_7WeakPtrIS4_EEEEEFvvEE3RunEPNS0_13BindStateBaseE #17 0x7f28b443e1ae _ZNO4base12OnceCallbackIFvvEE3RunEv #18 0x7f28b449338f base::debug::TaskAnnotator::RunTask() #19 0x7f28b45327f9 base::internal::IncomingTaskQueue::RunTask() #20 0x7f28b453b9b5 base::MessageLoop::RunTask() #21 0x7f28b453bc38 base::MessageLoop::DeferOrRunPendingTask() #22 0x7f28b453bf69 base::MessageLoop::DoWork() #23 0x7f28b454173e base::MessagePumpLibevent::Run() #24 0x7f28b453b17c base::MessageLoop::Run() #25 0x7f28b45f211d base::RunLoop::Run() #26 0x7f28b46b0398 base::Thread::Run() #27 0x7f28ae1da2c6 content::BrowserThreadImpl::IOThreadRun() #28 0x7f28ae1da557 content::BrowserThreadImpl::Run() #29 0x7f28b46b1005 base::Thread::ThreadMain() #30 0x7f28b46a708d base::(anonymous namespace)::ThreadFunc() #31 0x7f28b49ea494 start_thread #32 0x7f289637aa8f clone Received signal 6 #0 0x7f28b448f4ad base::debug::StackTrace::StackTrace() #1 0x7f28b448da6c base::debug::StackTrace::StackTrace() #2 0x7f28b448ef04 base::debug::(anonymous namespace)::StackDumpSignalHandler() #3 0x7f28b49f40c0 <unknown> #4 0x7f28962c4fcf gsignal #5 0x7f28962c63fa abort #6 0x7f28b448ab56 base::debug::(anonymous namespace)::DebugBreak() #7 0x7f28b448ab38 base::debug::BreakDebugger() #8 0x7f28b4515094 logging::LogMessage::~LogMessage() #9 0x7f28b2525a30 net::WebSocketBasicHandshakeStream::GetTokenBindingSignature() #10 0x7f28b1eef9c6 net::HttpNetworkTransaction::BuildTokenBindingHeader() #11 0x7f28b1eef41d net::HttpNetworkTransaction::BuildRequestHeaders() #12 0x7f28b1eec192 net::HttpNetworkTransaction::DoBuildRequest() #13 0x7f28b1ee3369 net::HttpNetworkTransaction::DoLoop() #14 0x7f28b1ee1ccf net::HttpNetworkTransaction::OnIOComplete() #15 0x7f28b1ee6b5b net::HttpNetworkTransaction::OnStreamReady() #16 0x7f28b1ee6e61 net::HttpNetworkTransaction::OnWebSocketHandshakeStreamReady() #17 0x7f28b1f6a264 net::HttpStreamFactoryImpl::JobController::OnWebSocketHandshakeStreamReady() #18 0x7f28b1f55898 net::HttpStreamFactoryImpl::Job::OnWebSocketHandshakeStreamReadyCallback() #19 0x7f28b1b098ef _ZN4base8internal13FunctorTraitsIMN3net16SocketBIOAdapterEFvvEvE6InvokeIRKNS_7WeakPtrIS3_EEJEEEvS5_OT_DpOT0_ #20 0x7f28b1b0986a _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN3net16SocketBIOAdapterEFvvERKNS_7WeakPtrIS5_EEJEEEvOT_OT0_DpOT1_ #21 0x7f28b1b09800 _ZN4base8internal7InvokerINS0_9BindStateIMN3net16SocketBIOAdapterEFvvEJNS_7WeakPtrIS4_EEEEEFvvEE7RunImplIRKS6_RKNSt3__15tupleIJS8_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEE #22 0x7f28b1b0979c _ZN4base8internal7InvokerINS0_9BindStateIMN3net16SocketBIOAdapterEFvvEJNS_7WeakPtrIS4_EEEEEFvvEE3RunEPNS0_13BindStateBaseE #23 0x7f28b443e1ae _ZNO4base12OnceCallbackIFvvEE3RunEv #24 0x7f28b449338f base::debug::TaskAnnotator::RunTask() #25 0x7f28b45327f9 base::internal::IncomingTaskQueue::RunTask() #26 0x7f28b453b9b5 base::MessageLoop::RunTask() #27 0x7f28b453bc38 base::MessageLoop::DeferOrRunPendingTask() #28 0x7f28b453bf69 base::MessageLoop::DoWork() #29 0x7f28b454173e base::MessagePumpLibevent::Run() #30 0x7f28b453b17c base::MessageLoop::Run() #31 0x7f28b45f211d base::RunLoop::Run() #32 0x7f28b46b0398 base::Thread::Run() #33 0x7f28ae1da2c6 content::BrowserThreadImpl::IOThreadRun() #34 0x7f28ae1da557 content::BrowserThreadImpl::Run() #35 0x7f28b46b1005 base::Thread::ThreadMain() #36 0x7f28b46a708d base::(anonymous namespace)::ThreadFunc() #37 0x7f28b49ea494 start_thread #38 0x7f289637aa8f clone
,
Mar 27 2018
,
Mar 28 2018
Thanks bnc@ for tracking this down!
,
Mar 29 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/3cb271d20eb447e1b002a5f53aaa2ef874d1a32b commit 3cb271d20eb447e1b002a5f53aaa2ef874d1a32b Author: Bence Béky <bnc@chromium.org> Date: Thu Mar 29 22:00:48 2018 Implement WebSocket*HandshakeStream::GetTokenBindingSignature(). Locally verified that this fixes the linked bug. Bug: 823643 Change-Id: Icb7048ce60e46babdae278c1d2b913e44df8f7a5 Reviewed-on: https://chromium-review.googlesource.com/980964 Commit-Queue: Bence Béky <bnc@chromium.org> Reviewed-by: Nick Harper <nharper@chromium.org> Reviewed-by: Ryan Hamilton <rch@chromium.org> Reviewed-by: Adam Rice <ricea@chromium.org> Cr-Commit-Position: refs/heads/master@{#546975} [modify] https://crrev.com/3cb271d20eb447e1b002a5f53aaa2ef874d1a32b/net/spdy/chromium/spdy_session.cc [modify] https://crrev.com/3cb271d20eb447e1b002a5f53aaa2ef874d1a32b/net/spdy/chromium/spdy_session.h [modify] https://crrev.com/3cb271d20eb447e1b002a5f53aaa2ef874d1a32b/net/spdy/chromium/spdy_stream.cc [modify] https://crrev.com/3cb271d20eb447e1b002a5f53aaa2ef874d1a32b/net/spdy/chromium/spdy_stream.h [modify] https://crrev.com/3cb271d20eb447e1b002a5f53aaa2ef874d1a32b/net/websockets/websocket_basic_handshake_stream.cc [modify] https://crrev.com/3cb271d20eb447e1b002a5f53aaa2ef874d1a32b/net/websockets/websocket_http2_handshake_stream.cc
,
Sep 28
Whether WebSocket Token Binding support was complete or not does not matter any longer. See https://crrev.com/c/1248125. |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by pauljensen@chromium.org
, Mar 20 2018Labels: Needs-Feedback