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

Side by Side Diff: remoting/host/client_session.h

Issue 138753005: Add gnubby authentication to remoting host (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change authorization socket flag name Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_ 5 #ifndef REMOTING_HOST_CLIENT_SESSION_H_
6 #define REMOTING_HOST_CLIENT_SESSION_H_ 6 #define REMOTING_HOST_CLIENT_SESSION_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
11 #include "base/memory/weak_ptr.h" 11 #include "base/memory/weak_ptr.h"
12 #include "base/sequenced_task_runner_helpers.h" 12 #include "base/sequenced_task_runner_helpers.h"
13 #include "base/threading/non_thread_safe.h" 13 #include "base/threading/non_thread_safe.h"
14 #include "base/time/time.h" 14 #include "base/time/time.h"
15 #include "base/timer/timer.h" 15 #include "base/timer/timer.h"
16 #include "remoting/host/client_session_control.h" 16 #include "remoting/host/client_session_control.h"
17 #include "remoting/host/gnubby_auth_handler.h"
17 #include "remoting/host/mouse_clamping_filter.h" 18 #include "remoting/host/mouse_clamping_filter.h"
18 #include "remoting/host/remote_input_filter.h" 19 #include "remoting/host/remote_input_filter.h"
19 #include "remoting/protocol/clipboard_echo_filter.h" 20 #include "remoting/protocol/clipboard_echo_filter.h"
20 #include "remoting/protocol/clipboard_filter.h" 21 #include "remoting/protocol/clipboard_filter.h"
21 #include "remoting/protocol/clipboard_stub.h" 22 #include "remoting/protocol/clipboard_stub.h"
22 #include "remoting/protocol/connection_to_client.h" 23 #include "remoting/protocol/connection_to_client.h"
23 #include "remoting/protocol/host_stub.h" 24 #include "remoting/protocol/host_stub.h"
24 #include "remoting/protocol/input_event_tracker.h" 25 #include "remoting/protocol/input_event_tracker.h"
25 #include "remoting/protocol/input_filter.h" 26 #include "remoting/protocol/input_filter.h"
26 #include "remoting/protocol/input_stub.h" 27 #include "remoting/protocol/input_stub.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 EventHandler* event_handler, 90 EventHandler* event_handler,
90 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner, 91 scoped_refptr<base::SingleThreadTaskRunner> audio_task_runner,
91 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner, 92 scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
92 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner, 93 scoped_refptr<base::SingleThreadTaskRunner> video_capture_task_runner,
93 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner, 94 scoped_refptr<base::SingleThreadTaskRunner> video_encode_task_runner,
94 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, 95 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner,
95 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner, 96 scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
96 scoped_ptr<protocol::ConnectionToClient> connection, 97 scoped_ptr<protocol::ConnectionToClient> connection,
97 DesktopEnvironmentFactory* desktop_environment_factory, 98 DesktopEnvironmentFactory* desktop_environment_factory,
98 const base::TimeDelta& max_duration, 99 const base::TimeDelta& max_duration,
99 scoped_refptr<protocol::PairingRegistry> pairing_registry); 100 scoped_refptr<protocol::PairingRegistry> pairing_registry,
101 bool enable_gnubby_auth);
Sergey Ulanov 2014/02/09 22:29:54 I suggest adding a method for GnubbyAuthHandler in
psj 2014/02/10 22:57:22 Done.
100 virtual ~ClientSession(); 102 virtual ~ClientSession();
101 103
102 // protocol::HostStub interface. 104 // protocol::HostStub interface.
103 virtual void NotifyClientResolution( 105 virtual void NotifyClientResolution(
104 const protocol::ClientResolution& resolution) OVERRIDE; 106 const protocol::ClientResolution& resolution) OVERRIDE;
105 virtual void ControlVideo( 107 virtual void ControlVideo(
106 const protocol::VideoControl& video_control) OVERRIDE; 108 const protocol::VideoControl& video_control) OVERRIDE;
107 virtual void ControlAudio( 109 virtual void ControlAudio(
108 const protocol::AudioControl& audio_control) OVERRIDE; 110 const protocol::AudioControl& audio_control) OVERRIDE;
109 virtual void SetCapabilities( 111 virtual void SetCapabilities(
(...skipping 17 matching lines...) Expand all
127 const std::string& channel_name, 129 const std::string& channel_name,
128 const protocol::TransportRoute& route) OVERRIDE; 130 const protocol::TransportRoute& route) OVERRIDE;
129 131
130 // ClientSessionControl interface. 132 // ClientSessionControl interface.
131 virtual const std::string& client_jid() const OVERRIDE; 133 virtual const std::string& client_jid() const OVERRIDE;
132 virtual void DisconnectSession() OVERRIDE; 134 virtual void DisconnectSession() OVERRIDE;
133 virtual void OnLocalMouseMoved( 135 virtual void OnLocalMouseMoved(
134 const webrtc::DesktopVector& position) OVERRIDE; 136 const webrtc::DesktopVector& position) OVERRIDE;
135 virtual void SetDisableInputs(bool disable_inputs) OVERRIDE; 137 virtual void SetDisableInputs(bool disable_inputs) OVERRIDE;
136 138
139 void SetGnubbyAuthHandlerForTesting(GnubbyAuthHandler* gnubby_auth_handler);
140
137 protocol::ConnectionToClient* connection() const { 141 protocol::ConnectionToClient* connection() const {
138 return connection_.get(); 142 return connection_.get();
139 } 143 }
140 144
141 bool is_authenticated() { return auth_input_filter_.enabled(); } 145 bool is_authenticated() { return auth_input_filter_.enabled(); }
142 146
143 private: 147 private:
144 // Creates a proxy for sending clipboard events to the client. 148 // Creates a proxy for sending clipboard events to the client.
145 scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy(); 149 scoped_ptr<protocol::ClipboardStub> CreateClipboardProxy();
146 150
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 230
227 // Used to inject mouse and keyboard input and handle clipboard events. 231 // Used to inject mouse and keyboard input and handle clipboard events.
228 scoped_ptr<InputInjector> input_injector_; 232 scoped_ptr<InputInjector> input_injector_;
229 233
230 // Used to apply client-requested changes in screen resolution. 234 // Used to apply client-requested changes in screen resolution.
231 scoped_ptr<ScreenControls> screen_controls_; 235 scoped_ptr<ScreenControls> screen_controls_;
232 236
233 // The pairing registry for PIN-less authentication. 237 // The pairing registry for PIN-less authentication.
234 scoped_refptr<protocol::PairingRegistry> pairing_registry_; 238 scoped_refptr<protocol::PairingRegistry> pairing_registry_;
235 239
240 // True if gnubby auth is enabled.
241 bool enable_gnubby_auth_;
242
243 // Used to proxy gnubby auth traffic.
244 scoped_ptr<GnubbyAuthHandler> gnubby_auth_handler_;
245
236 DISALLOW_COPY_AND_ASSIGN(ClientSession); 246 DISALLOW_COPY_AND_ASSIGN(ClientSession);
237 }; 247 };
238 248
239 } // namespace remoting 249 } // namespace remoting
240 250
241 #endif // REMOTING_HOST_CLIENT_SESSION_H_ 251 #endif // REMOTING_HOST_CLIENT_SESSION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698