Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Issue 2575963002: Handle Security Key requests from outside the remoted session correctly (Closed)

Created:
4 years ago by joedow
Modified:
3 years, 12 months ago
Reviewers:
Sergey Ulanov, dcheng
CC:
chromium-reviews, chromoting-reviews_chromium.org, Sam McNally
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle Security Key requests from outside the remoted session correctly The recent Mojo conversion changed the communication pattern between the IPC Server and Client classes used for remote security key message forwarding. This change has caused a regression in the scenario where the security key request originates from outside the remoted session. The desired behavior is to pass a message to the local SK handler so it can route/handle the request. Due to the change in the following CL, we would instead report that the remote client would handle it, then return a failure when they sent the request: https://codereview.chromium.org/2478443002/ The reason for this change is that the session detection logic was wrapped in the OnChannelConnected() method. Because you cannot close an IPC channel from within that method, we would defer the close operation. With the old architecture, the client would be waiting for a specific IPC message to complete the connection (and signal success) but instead would receive the deferred close/error message and pass on the right message to the local handler. This behavior was changed such that the client would now signal success in its own 'OnChannelConnected()' and then receive the deferred error. In order to make this scenario more robust, I have added specific success and failure IPC messages to be passed to the client from the server and will use that when establishing the connection. I've also separated out the concept of an invalid session vs. and actual connection error so the IPC client class can provide more accurate details to the local handler. BUG=674236 Committed: https://crrev.com/afdd0e9701d38723cb5ebae11e4e26a7c19e3d58 Cr-Commit-Position: refs/heads/master@{#439685}

Patch Set 1 #

Patch Set 2 : Fixing unit tests and formatting #

Total comments: 4

Patch Set 3 : Addressing CR Feedback #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+171 lines, -36 lines) Patch
M remoting/host/chromoting_messages.h View 1 chunk +8 lines, -2 lines 0 comments Download
M remoting/host/security_key/fake_security_key_ipc_client.h View 1 2 4 chunks +17 lines, -1 line 0 comments Download
M remoting/host/security_key/fake_security_key_ipc_client.cc View 1 2 3 chunks +16 lines, -2 lines 0 comments Download
M remoting/host/security_key/fake_security_key_ipc_server.h View 1 1 chunk +6 lines, -0 lines 0 comments Download
M remoting/host/security_key/fake_security_key_ipc_server.cc View 1 chunk +10 lines, -0 lines 0 comments Download
M remoting/host/security_key/security_key_auth_handler_win.cc View 1 chunk +2 lines, -8 lines 0 comments Download
M remoting/host/security_key/security_key_ipc_client.h View 1 2 4 chunks +12 lines, -7 lines 2 comments Download
M remoting/host/security_key/security_key_ipc_client.cc View 1 2 4 chunks +21 lines, -5 lines 4 comments Download
M remoting/host/security_key/security_key_ipc_client_unittest.cc View 1 2 7 chunks +33 lines, -5 lines 0 comments Download
M remoting/host/security_key/security_key_ipc_server_impl.cc View 1 2 chunks +6 lines, -0 lines 0 comments Download
M remoting/host/security_key/security_key_ipc_server_unittest.cc View 1 9 chunks +18 lines, -0 lines 0 comments Download
M remoting/host/security_key/security_key_message_handler.h View 2 chunks +7 lines, -0 lines 0 comments Download
M remoting/host/security_key/security_key_message_handler.cc View 1 2 chunks +15 lines, -6 lines 0 comments Download

Messages

Total messages: 35 (20 generated)
joedow
PTAL!
4 years ago (2016-12-14 22:22:06 UTC) #11
Sergey Ulanov
lgtm, but see my comment regarding naming. https://codereview.chromium.org/2575963002/diff/40001/remoting/host/security_key/security_key_ipc_client.h File remoting/host/security_key/security_key_ipc_client.h (right): https://codereview.chromium.org/2575963002/diff/40001/remoting/host/security_key/security_key_ipc_client.h#newcode38 remoting/host/security_key/security_key_ipc_client.h:38: typedef base::Callback<void(bool ...
4 years ago (2016-12-15 19:47:33 UTC) #12
joedow
Thanks Sergey! Adding dcheng for chromoting_messages.h approval. https://codereview.chromium.org/2575963002/diff/40001/remoting/host/security_key/security_key_ipc_client.h File remoting/host/security_key/security_key_ipc_client.h (right): https://codereview.chromium.org/2575963002/diff/40001/remoting/host/security_key/security_key_ipc_client.h#newcode38 remoting/host/security_key/security_key_ipc_client.h:38: typedef base::Callback<void(bool ...
4 years ago (2016-12-15 21:18:33 UTC) #16
dcheng
https://codereview.chromium.org/2575963002/diff/60001/remoting/host/security_key/security_key_ipc_client.cc File remoting/host/security_key/security_key_ipc_client.cc (right): https://codereview.chromium.org/2575963002/diff/60001/remoting/host/security_key/security_key_ipc_client.cc#newcode154 remoting/host/security_key/security_key_ipc_client.cc:154: DCHECK(!connected_callback_.is_null()); Just to double-check: is the server end (the ...
4 years ago (2016-12-16 02:33:07 UTC) #19
joedow
https://codereview.chromium.org/2575963002/diff/60001/remoting/host/security_key/security_key_ipc_client.cc File remoting/host/security_key/security_key_ipc_client.cc (right): https://codereview.chromium.org/2575963002/diff/60001/remoting/host/security_key/security_key_ipc_client.cc#newcode154 remoting/host/security_key/security_key_ipc_client.cc:154: DCHECK(!connected_callback_.is_null()); On 2016/12/16 02:33:07, dcheng wrote: > Just to ...
4 years ago (2016-12-16 03:36:22 UTC) #20
dcheng
https://codereview.chromium.org/2575963002/diff/60001/remoting/host/security_key/security_key_ipc_client.cc File remoting/host/security_key/security_key_ipc_client.cc (right): https://codereview.chromium.org/2575963002/diff/60001/remoting/host/security_key/security_key_ipc_client.cc#newcode154 remoting/host/security_key/security_key_ipc_client.cc:154: DCHECK(!connected_callback_.is_null()); On 2016/12/16 03:36:22, joedow wrote: > On 2016/12/16 ...
4 years ago (2016-12-16 09:12:03 UTC) #21
joedow
In addition to the response, I've sent you my design doc if you'd like to ...
4 years ago (2016-12-16 16:20:18 UTC) #22
dcheng
On 2016/12/16 16:20:18, joedow wrote: > In addition to the response, I've sent you my ...
4 years ago (2016-12-17 01:06:09 UTC) #23
joedow
Let's meet up Monday and discuss. This is a fix for a regression that occurred ...
4 years ago (2016-12-18 20:52:14 UTC) #24
joedow
Discussed architecture offline with dcheng. Can I get approval for the chromoting_messages.h file? Thanks! Joe
4 years ago (2016-12-20 00:25:30 UTC) #25
dcheng
This CL LGTM. However, please file a followup bug to remove the DCHECKs and have ...
4 years ago (2016-12-20 00:31:46 UTC) #26
joedow
Sounds good. I've file 675818 to track the client change, will try to get that ...
3 years, 12 months ago (2016-12-20 02:27:32 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2575963002/60001
3 years, 12 months ago (2016-12-20 02:27:59 UTC) #30
commit-bot: I haz the power
Committed patchset #3 (id:60001) as https://chromium.googlesource.com/chromium/src/+/c12ccfe11396646fffdfd11c89607f65182902ff
3 years, 12 months ago (2016-12-20 03:02:54 UTC) #33
commit-bot: I haz the power
3 years, 12 months ago (2016-12-20 03:05:46 UTC) #35
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/afdd0e9701d38723cb5ebae11e4e26a7c19e3d58
Cr-Commit-Position: refs/heads/master@{#439685}

Powered by Google App Engine
This is Rietveld 408576698