-
Notifications
You must be signed in to change notification settings - Fork 925
/
gateone.html
465 lines (441 loc) · 27 KB
/
gateone.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>gateone.py - Gate One's Main Script — Gate One 0.9 documentation</title>
<link rel="stylesheet" href="../_static/default.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/ansi.css" type="text/css" />
<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '0.9',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true
};
</script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<link rel="top" title="Gate One 0.9 documentation" href="../index.html" />
<link rel="up" title="Developer Documentation" href="index.html" />
<link rel="next" title="logviewer.py - Session Log Viewer" href="logviewer.html" />
<link rel="prev" title="authpam.py - A PAM Authentication Module" href="authpam.html" />
</head>
<body>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
accesskey="I">index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="logviewer.html" title="logviewer.py - Session Log Viewer"
accesskey="N">next</a> |</li>
<li class="right" >
<a href="authpam.html" title="authpam.py - A PAM Authentication Module"
accesskey="P">previous</a> |</li>
<li><a href="../index.html">Gate One Documentation</a> »</li>
<li><a href="index.html" accesskey="U">Developer Documentation</a> »</li>
</ul>
</div>
<div class="document">
<div class="documentwrapper">
<div class="bodywrapper">
<div class="body">
<div class="section" id="module-gateone">
<span id="gateone-py-gate-one-s-main-script"></span><h1><tt class="xref py py-mod docutils literal"><span class="pre">gateone.py</span></tt> - Gate One's Main Script<a class="headerlink" href="#module-gateone" title="Permalink to this headline">¶</a></h1>
<div class="section" id="gate-one">
<span id="gateone-py"></span><h2>Gate One<a class="headerlink" href="#gate-one" title="Permalink to this headline">¶</a></h2>
<p>Gate One is a web-based terminal emulator written in Python using the Tornado
web framework. This module runs the primary daemon process and acts as a
central controller for all running terminals and terminal programs. It supports
numerous configuration options and can also be called with the --kill switch
to kill all running terminal programs (if using dtach--otherwise they die on
their own when gateone.py is stopped).</p>
<div class="section" id="dependencies">
<h3>Dependencies<a class="headerlink" href="#dependencies" title="Permalink to this headline">¶</a></h3>
<p>Gate One requires Python 2.6+ but runs best with Python 2.7+. It also depends
on the following 3rd party Python modules:</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="http://www.tornadoweb.org/">Tornado</a> 2.1+ - Non-blocking web server framework that powers FriendFeed.</li>
</ul>
</div></blockquote>
<p>The following modules are optional and can provide Gate One with additional
functionality:</p>
<blockquote>
<div><ul class="simple">
<li><a class="reference external" href="https://launchpad.net/pyopenssl">pyOpenSSL</a> 0.10+ - OpenSSL wrapper for Python. Only used to generate self-signed SSL keys and certificates.</li>
<li><a class="reference external" href="http://pypi.python.org/pypi/kerberos">kerberos</a> 1.0+ - A high-level Kerberos interface for Python. Only necessary if you plan to use the Kerberos authentication module.</li>
</ul>
</div></blockquote>
<p>On most platforms both the required and optional modules can be installed via one of these commands:</p>
<blockquote>
<div><pre class="ansi-block literal-block">
<span class="ansi-bold ansi-blue">user</span>@modern-host<span class="ansi-bold ansi-blue">:~ $</span> sudo pip install tornado pyopenssl kerberos
</pre>
</div></blockquote>
<p>...or:</p>
<blockquote>
<div><pre class="ansi-block literal-block">
<span class="ansi-bold ansi-blue">user</span>@legacy-host<span class="ansi-bold ansi-blue">:~ $</span> sudo easy_install tornado pyopenssl kerberos
</pre>
</div></blockquote>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">The use of pip is recommended. See <a class="reference external" href="http://www.pip-installer.org/en/latest/installing.html">http://www.pip-installer.org/en/latest/installing.html</a> if you don't have it.</p>
</div>
</div>
<div class="section" id="settings">
<h3>Settings<a class="headerlink" href="#settings" title="Permalink to this headline">¶</a></h3>
<p>All of Gate One's configurable options can be controlled either via command line
switches or by settings in the server.conf file (they match up 1-to-1). If no
server.conf exists one will be created using defaults (i.e. when Gate One is run
for the first time). Settings in the server.conf file use the following format:</p>
<div class="highlight-python"><pre><setting> = <value></pre>
</div>
<p>Here's an example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">address</span> <span class="o">=</span> <span class="s">"127.0.0.1;::1;10.1.1.4"</span> <span class="c"># Strings are surrounded by quotes</span>
<span class="n">port</span> <span class="o">=</span> <span class="mi">443</span> <span class="c"># Numbers don't need quotes</span>
</pre></div>
</div>
<p>There are a few important differences between the configuration file and
command line switches in regards to boolean values (True/False). A switch such
as --debug evaluates to "debug = True" and this is exactly how it would be
configured in server.conf:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">debug</span> <span class="o">=</span> <span class="bp">True</span> <span class="c"># Booleans don't need quotes either</span>
</pre></div>
</div>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">server.conf is case sensitive for "True", "False" and "None".</p>
</div>
<p>Running gateone.py with the --help switch will print the usage information as
well as descriptions of what each configurable option does:</p>
<pre class="ansi-block literal-block">
<span class="ansi-bold ansi-red">root</span>@host<span class="ansi-bold ansi-blue">:~ $</span> ./gateone.py --help
Usage: ./gateone.py [OPTIONS]
Options:
--help show this help information
--log_file_max_size max size of log files before rollover
--log_file_num_backups number of log files to keep
--log_file_prefix=PATH Path prefix for log files. Note that if you are running multiple tornado processes, log_file_prefix must be different for each of them (e.g. include the port number)
--log_to_stderr Send log output to stderr (colorized if possible). By default use stderr if --log_file_prefix is not set and no other logging is configured.
--logging=info|warning|error|none Set the Python log level. If 'none', tornado won't touch the logging configuration.
--address Run on the given address. Default is all addresses (IPv6 included). Multiple address can be specified using a semicolon as a separator (e.g. '127.0.0.1;::1;10.1.1.100').
--auth Authentication method to use. Valid options are: none, kerberos, google
--certificate Path to the SSL certificate. Will be auto-generated if none is provided.
--command Run the given command when a user connects (e.g. 'nethack').
--cookie_secret Use the given 45-character string for cookie encryption.
--debug Enable debugging features such as auto-restarting when files are modified.
--disable_ssl If enabled, Gate One will run without SSL (generally not a good idea).
--dtach Wrap terminals with dtach. Allows sessions to be resumed even if Gate One is stopped and started (which is a sweet feature =).
--embedded Run Gate One in Embedded Mode (no toolbar, only one terminal allowed, etc. See docs).
--keyfile Path to the SSL keyfile. Will be auto-generated if none is provided.
--kill Kill any running Gate One terminal processes including dtach'd processes.
--pam_realm Basic auth REALM to display when authenticating clients. Default to hostname. Only relevant if PAM authentication is enabled.
--pam_service PAM service to use. Defaults to 'login'. Only relevant if PAM authentication is enabled.
--port Run on the given port.
--session_dir Path to the location where session information will be stored.
--session_logging If enabled, logs of user sessions will be saved in <user_dir>/logs. Default: Enabled
--session_timeout Amount of time that a session should be kept alive after the client has logged out. Accepts <num>X where X could be one of s, m, h, or d for seconds, minutes, hours, and days. Default is '5d' (5 days).
--sso_realm Kerberos REALM (aka DOMAIN) to use when authenticating clients. Only relevant if Kerberos authentication is enabled.
--sso_service Kerberos service (aka application) to use. Defaults to HTTP. Only relevant if Kerberos authentication is enabled.
--syslog_facility Syslog facility to use when logging to syslog (if syslog_session_logging is enabled). Must be one of: auth, cron, daemon, kern, local0, local1, local2, local3, local4, local5, local6, local7, lpr, mail, news, syslog, user, uucp. Default: daemon
--syslog_session_logging If enabled, logs of user sessions will be written to syslog.
--user_dir Path to the location where user files will be stored.
</pre>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">Some of these options (e.g. log_file_prefix) are inherent to the Tornado framework. You won't find them anywhere in gateone.py.</p>
</div>
</div>
<div class="section" id="file-paths">
<h3>File Paths<a class="headerlink" href="#file-paths" title="Permalink to this headline">¶</a></h3>
<p>Gate One stores its files, temporary session information, and persistent user
data in the following locations (Note: Many of these are configurable):</p>
<table border="1" class="docutils">
<colgroup>
<col width="17%" />
<col width="83%" />
</colgroup>
<thead valign="bottom">
<tr class="row-odd"><th class="head">File/Directory</th>
<th class="head">Description</th>
</tr>
</thead>
<tbody valign="top">
<tr class="row-even"><td>gateone.py</td>
<td>Gate One's primary executable/script. Also, the file containing this documentation</td>
</tr>
<tr class="row-odd"><td>auth.py</td>
<td>Authentication classes</td>
</tr>
<tr class="row-even"><td>logviewer.py</td>
<td>A utility to view Gate One session logs</td>
</tr>
<tr class="row-odd"><td>server.conf</td>
<td>Gate One's configuration file</td>
</tr>
<tr class="row-even"><td>sso.py</td>
<td>A Kerberos Single Sign-on module for Tornado (used by auth.py)</td>
</tr>
<tr class="row-odd"><td>terminal.py</td>
<td>A Pure Python terminal emulator module</td>
</tr>
<tr class="row-even"><td>termio.py</td>
<td>Terminal input/output control module</td>
</tr>
<tr class="row-odd"><td>utils.py</td>
<td>Various supporting functions</td>
</tr>
<tr class="row-even"><td>docs/</td>
<td>Gate One documentation</td>
</tr>
<tr class="row-odd"><td>static/</td>
<td>Non-dynamic files that get served to clients (e.g. gateone.js, gateone.css, etc)</td>
</tr>
<tr class="row-even"><td>templates/</td>
<td>Tornado template files such as index.html</td>
</tr>
<tr class="row-odd"><td>tests/</td>
<td>Gate One-specific automated unit/acceptance tests</td>
</tr>
<tr class="row-even"><td>plugins/</td>
<td>Plugins go here in the form of ./plugins/<plugin name>/<plugin files|directories></td>
</tr>
<tr class="row-odd"><td>users/</td>
<td>Persistent user data in the form of ./users/<username>/<user-specific files></td>
</tr>
<tr class="row-even"><td>users/<user>/logs</td>
<td>This is where session logs get stored if session_logging is set.</td>
</tr>
<tr class="row-odd"><td>/tmp/gateone</td>
<td>Temporary session data in the form of /tmp/gateone/<session ID>/<files></td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="running">
<h3>Running<a class="headerlink" href="#running" title="Permalink to this headline">¶</a></h3>
<p>Executing Gate One is as simple as:</p>
<pre class="ansi-block literal-block">
<span class="ansi-bold ansi-red">root</span>@host<span class="ansi-bold ansi-blue">:~ $</span> ./gateone.py
</pre>
<p>NOTE: By default Gate One will run on port 443 which requires root on most
systems. Use --port=<something greater than 1024> for non-root users.</p>
</div>
<div class="section" id="plugins">
<h3>Plugins<a class="headerlink" href="#plugins" title="Permalink to this headline">¶</a></h3>
<p>Gate One includes support for any combination of the following types of plugins:</p>
<blockquote>
<div><ul class="simple">
<li>Python</li>
<li>JavaScript</li>
<li>CSS</li>
</ul>
</div></blockquote>
<p>Python plugins can integrate with Gate One in three ways:</p>
<blockquote>
<div><ul class="simple">
<li>Adding or overriding tornado.web.RequestHandlers (with a given regex).</li>
<li>Adding or overriding methods (aka "commands") in TerminalWebSocket.</li>
<li>Adding special plugin-specific escape sequence handlers (see the plugin development documentation for details on what/how these are/work).</li>
</ul>
</div></blockquote>
<p>JavaScript plugins will be added to the <body> tag of Gate One's base index.html
template like so:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="c"><!-- Begin JS files from plugins --></span>
{% for jsplugin in jsplugins %}
<span class="nt"><script </span><span class="na">type=</span><span class="s">"text/javascript"</span> <span class="na">src=</span><span class="s">"{{jsplugin}}"</span><span class="nt">></script></span>
{% end %}
<span class="c"><!-- End JS files from plugins --></span>
</pre></div>
</div>
<p>CSS plugins are similar to JavaScript but instead of being appended to the
<body> they are added to the <head>:</p>
<div class="highlight-html"><div class="highlight"><pre><span class="c"><!-- Begin CSS files from plugins --></span>
{% for cssplugin in cssplugins %}
<span class="nt"><link</span> <span class="na">rel=</span><span class="s">"stylesheet"</span> <span class="na">href=</span><span class="s">"{{cssplugin}}"</span> <span class="na">type=</span><span class="s">"text/css"</span> <span class="na">media=</span><span class="s">"screen"</span> <span class="nt">/></span>
{% end %}
<span class="c"><!-- End CSS files from plugins --></span>
</pre></div>
</div>
<p>There are also hooks throughout Gate One's code for plugins to add or override
Gate One's functionality. Documentation on how to write plugins can be found in
the Plugin Development docs. From the perspective of gateone.py, it performs
the following tasks in relation to plugins:</p>
<blockquote>
<div><ul class="simple">
<li>Imports Python plugins and connects their hooks.</li>
<li>Creates symbolic links inside ./static/ that point to each plugin's respective /static/ directory and serves them to clients.</li>
<li>Serves the index.html that includes plugins' respective .js and .css files.</li>
</ul>
</div></blockquote>
</div>
</div>
<div class="section" id="class-docstrings">
<h2>Class Docstrings<a class="headerlink" href="#class-docstrings" title="Permalink to this headline">¶</a></h2>
<dl class="function">
<dt id="gateone.require_auth">
<tt class="descclassname">gateone.</tt><tt class="descname">require_auth</tt><big>(</big><em>method</em><big>)</big><a class="reference internal" href="../_modules/gateone.html#require_auth"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.require_auth" title="Permalink to this definition">¶</a></dt>
<dd><p>An equivalent to tornado.web.authenticated for WebSockets
(TerminalWebSocket, specifically).</p>
</dd></dl>
<dl class="class">
<dt id="gateone.HTTPSRedirectHandler">
<em class="property">class </em><tt class="descclassname">gateone.</tt><tt class="descname">HTTPSRedirectHandler</tt><big>(</big><em>application</em>, <em>request</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/gateone.html#HTTPSRedirectHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.HTTPSRedirectHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>A handler to redirect clients from HTTP to HTTPS.</p>
<dl class="method">
<dt id="gateone.HTTPSRedirectHandler.get">
<tt class="descname">get</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/gateone.html#HTTPSRedirectHandler.get"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.HTTPSRedirectHandler.get" title="Permalink to this definition">¶</a></dt>
<dd><p>Just redirects the client from HTTP to HTTPS</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="gateone.BaseHandler">
<em class="property">class </em><tt class="descclassname">gateone.</tt><tt class="descname">BaseHandler</tt><big>(</big><em>application</em>, <em>request</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/gateone.html#BaseHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.BaseHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>A base handler that all Gate One RequestHandlers will inherit methods from.</p>
<dl class="method">
<dt id="gateone.BaseHandler.get_current_user">
<tt class="descname">get_current_user</tt><big>(</big><big>)</big><a class="reference internal" href="../_modules/gateone.html#BaseHandler.get_current_user"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.BaseHandler.get_current_user" title="Permalink to this definition">¶</a></dt>
<dd><p>Tornado standard method--implemented our way.</p>
</dd></dl>
</dd></dl>
<dl class="class">
<dt id="gateone.MainHandler">
<em class="property">class </em><tt class="descclassname">gateone.</tt><tt class="descname">MainHandler</tt><big>(</big><em>application</em>, <em>request</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/gateone.html#MainHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.MainHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders index.html which loads Gate One.</p>
<p>Will include the minified version of gateone.js if available as
gateone.min.js.</p>
<p>Will encode GATEONE_DIR/static/bell.ogg as a <a class="reference external" href="data:URI">data:URI</a> and put it as the
<source> of the <audio> tag inside the index.html template. Gate One
administrators can replace bell.ogg with whatever they like but the file
size should be less than 32k when encoded to Base64.</p>
</dd></dl>
<dl class="class">
<dt id="gateone.StyleHandler">
<em class="property">class </em><tt class="descclassname">gateone.</tt><tt class="descname">StyleHandler</tt><big>(</big><em>application</em>, <em>request</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/gateone.html#StyleHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.StyleHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>Serves up our CSS templates (themes, colors, etc) and enumerates what's
available depending on the given arguments:</p>
<p>If 'enumerate' is given, returna JSON-encoded object containing lists of
our themes/colors in the form of:</p>
<blockquote>
<div>{'themes': themes, 'colors': colors}</div></blockquote>
<p>NOTE: The .css part of filenames will be stripped when sent to the client.</p>
<p>If 'theme' or 'colors' are provided (along with the requisite 'container'
and 'prefix' arguments), returns the content of the requested CSS file.</p>
</dd></dl>
<dl class="class">
<dt id="gateone.PluginCSSTemplateHandler">
<em class="property">class </em><tt class="descclassname">gateone.</tt><tt class="descname">PluginCSSTemplateHandler</tt><big>(</big><em>application</em>, <em>request</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/gateone.html#PluginCSSTemplateHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.PluginCSSTemplateHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>Renders plugin CSS template files, passing them the same <em>prefix</em> and
<em>container</em> variables used by the StyleHandler. This is so we don't need a
CSS template rendering function in every plugin that needs to use {{prefix}}
or {{container}}.</p>
<p>gateone.js will automatically load all *.css files in plugin template
directories using this method.</p>
</dd></dl>
<dl class="class">
<dt id="gateone.JSPluginsHandler">
<em class="property">class </em><tt class="descclassname">gateone.</tt><tt class="descname">JSPluginsHandler</tt><big>(</big><em>application</em>, <em>request</em>, <em>**kwargs</em><big>)</big><a class="reference internal" href="../_modules/gateone.html#JSPluginsHandler"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.JSPluginsHandler" title="Permalink to this definition">¶</a></dt>
<dd><p>Combines all JavaScript plugins into a single file to keep things simple and
speedy.</p>
</dd></dl>
<dl class="class">
<dt id="gateone.TidyThread">
<em class="property">class </em><tt class="descclassname">gateone.</tt><tt class="descname">TidyThread</tt><big>(</big><em>session</em><big>)</big><a class="reference internal" href="../_modules/gateone.html#TidyThread"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.TidyThread" title="Permalink to this definition">¶</a></dt>
<dd><p>Kills a user's termio session if the client hasn't updated the keepalive
within <em>TIMEOUT</em> (global). Also, tidies up sessions, logs, and whatnot based
on Gate One's settings (when the time is right).</p>
<p>NOTE: This is necessary to prevent shells from running eternally in the
background.</p>
<p><em>session</em> - 45-character string containing the user's session ID</p>
<dl class="method">
<dt id="gateone.TidyThread.keepalive">
<tt class="descname">keepalive</tt><big>(</big><em>datetime_obj=None</em><big>)</big><a class="reference internal" href="../_modules/gateone.html#TidyThread.keepalive"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#gateone.TidyThread.keepalive" title="Permalink to this definition">¶</a></dt>
<dd><p>Resets the keepalive timer. Typically called when the user performs a new action.</p>
<p><em>datetime_obj</em> - A datetime object that will be used to measure <em>TIMEOUT</em> against. Will end up defaulting to datetime.now() (if None) which is what you'd want 99% of the time.</p>
</dd></dl>
</dd></dl>
</div>
</div>
</div>
</div>
</div>
<div class="sphinxsidebar">
<div class="sphinxsidebarwrapper">
<h3><a href="../index.html">Table Of Contents</a></h3>
<ul>
<li><a class="reference internal" href="#"><tt class="docutils literal"><span class="pre">gateone.py</span></tt> - Gate One's Main Script</a><ul>
<li><a class="reference internal" href="#gate-one">Gate One</a><ul>
<li><a class="reference internal" href="#dependencies">Dependencies</a></li>
<li><a class="reference internal" href="#settings">Settings</a></li>
<li><a class="reference internal" href="#file-paths">File Paths</a></li>
<li><a class="reference internal" href="#running">Running</a></li>
<li><a class="reference internal" href="#plugins">Plugins</a></li>
</ul>
</li>
<li><a class="reference internal" href="#class-docstrings">Class Docstrings</a></li>
</ul>
</li>
</ul>
<h4>Previous topic</h4>
<p class="topless"><a href="authpam.html"
title="previous chapter"><tt class="docutils literal"><span class="pre">authpam.py</span></tt> - A PAM Authentication Module</a></p>
<h4>Next topic</h4>
<p class="topless"><a href="logviewer.html"
title="next chapter"><tt class="docutils literal"><span class="pre">logviewer.py</span></tt> - Session Log Viewer</a></p>
<h3>This Page</h3>
<ul class="this-page-menu">
<li><a href="../_sources/Developer/gateone.txt"
rel="nofollow">Show Source</a></li>
</ul>
<div id="searchbox" style="display: none">
<h3>Quick search</h3>
<form class="search" action="../search.html" method="get">
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
<p class="searchtip" style="font-size: 90%">
Enter search terms or a module, class or function name.
</p>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
</div>
<div class="clearer"></div>
</div>
<div class="related">
<h3>Navigation</h3>
<ul>
<li class="right" style="margin-right: 10px">
<a href="../genindex.html" title="General Index"
>index</a></li>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="right" >
<a href="logviewer.html" title="logviewer.py - Session Log Viewer"
>next</a> |</li>
<li class="right" >
<a href="authpam.html" title="authpam.py - A PAM Authentication Module"
>previous</a> |</li>
<li><a href="../index.html">Gate One Documentation</a> »</li>
<li><a href="index.html" >Developer Documentation</a> »</li>
</ul>
</div>
<div class="footer">
© Copyright 2011, Liftoff Software Corporation.
Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.2.
</div>
</body>
</html>