Project

General

Profile

Download (17.7 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/*
3
	system_authservers.php
4

    
5
	Copyright (C) 2008 Shrew Soft Inc.
6
	Copyright (C) 2010 Ermal Luçi
7
	Copyright (C) 2013-2015 Electric Sheep Fencing, LP
8
	All rights reserved.
9

    
10
	Redistribution and use in source and binary forms, with or without
11
	modification, are permitted provided that the following conditions are met:
12

    
13
	1. Redistributions of source code must retain the above copyright notice,
14
	   this list of conditions and the following disclaimer.
15

    
16
	2. Redistributions in binary form must reproduce the above copyright
17
	   notice, this list of conditions and the following disclaimer in the
18
	   documentation and/or other materials provided with the distribution.
19

    
20
	THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
21
	INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
22
	AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
23
	AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
24
	OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25
	SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26
	INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27
	CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28
	ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29
	POSSIBILITY OF SUCH DAMAGE.
30
*/
31
/*
32
	pfSense_MODULE:	auth
33
*/
34

    
35
##|+PRIV
36
##|*IDENT=page-system-authservers
37
##|*NAME=System: Authentication Servers
38
##|*DESCR=Allow access to the 'System: Authentication Servers' page.
39
##|*MATCH=system_authservers.php*
40
##|-PRIV
41

    
42
require("guiconfig.inc");
43
require_once("auth.inc");
44

    
45
$pgtitle = array(gettext("System"), gettext("Authentication Servers"));
46
$shortcut_section = "authentication";
47

    
48
if (is_numericint($_GET['id']))
49
	$id = $_GET['id'];
50
if (isset($_POST['id']) && is_numericint($_POST['id']))
51
	$id = $_POST['id'];
52

    
53
if (!is_array($config['system']['authserver']))
54
	$config['system']['authserver'] = array();
55

    
56
$a_servers = auth_get_authserver_list();
57
foreach ($a_servers as $servers)
58
	$a_server[] = $servers;
59

    
60
if (!is_array($config['ca']))
61
	$config['ca'] = array();
62
$a_ca =& $config['ca'];
63

    
64
$act = $_GET['act'];
65
if ($_POST['act'])
66
	$act = $_POST['act'];
67

    
68
if ($act == "del") {
69

    
70
	if (!$a_server[$_GET['id']]) {
71
		pfSenseHeader("system_authservers.php");
72
		exit;
73
	}
74

    
75
	/* Remove server from main list. */
76
	$serverdeleted = $a_server[$_GET['id']]['name'];
77
	foreach ($config['system']['authserver'] as $k => $as) {
78
		if ($config['system']['authserver'][$k]['name'] == $serverdeleted)
79
			unset($config['system']['authserver'][$k]);
80
	}
81

    
82
	/* Remove server from temp list used later on this page. */
83
	unset($a_server[$_GET['id']]);
84

    
85
	$savemsg = gettext("Authentication Server")." ". htmlspecialchars($serverdeleted) ." ".
86
				gettext("deleted")."<br />";
87
				
88
	write_config($savemsg);
89
}
90

    
91
if ($act == "edit") {
92
	if (isset($id) && $a_server[$id]) {
93

    
94
		$pconfig['type'] = $a_server[$id]['type'];
95
		$pconfig['name'] = $a_server[$id]['name'];
96

    
97
		if ($pconfig['type'] == "ldap") {
98
			$pconfig['ldap_caref'] = $a_server[$id]['ldap_caref'];
99
			$pconfig['ldap_host'] = $a_server[$id]['host'];
100
			$pconfig['ldap_port'] = $a_server[$id]['ldap_port'];
101
			$pconfig['ldap_urltype'] = $a_server[$id]['ldap_urltype'];
102
			$pconfig['ldap_protver'] = $a_server[$id]['ldap_protver'];
103
			$pconfig['ldap_scope'] = $a_server[$id]['ldap_scope'];
104
			$pconfig['ldap_basedn'] = $a_server[$id]['ldap_basedn'];
105
			$pconfig['ldap_authcn'] = $a_server[$id]['ldap_authcn'];
106
			$pconfig['ldap_extended_enabled'] = $a_server[$id]['ldap_extended_enabled'];
107
			$pconfig['ldap_extended_query'] = $a_server[$id]['ldap_extended_query'];
108
			$pconfig['ldap_binddn'] = $a_server[$id]['ldap_binddn'];
109
			$pconfig['ldap_bindpw'] = $a_server[$id]['ldap_bindpw'];
110
			$pconfig['ldap_attr_user'] = $a_server[$id]['ldap_attr_user'];
111
			$pconfig['ldap_attr_group'] = $a_server[$id]['ldap_attr_group'];
112
			$pconfig['ldap_attr_member'] = $a_server[$id]['ldap_attr_member'];
113
			$pconfig['ldap_utf8'] = isset($a_server[$id]['ldap_utf8']);
114
			$pconfig['ldap_nostrip_at'] = isset($a_server[$id]['ldap_nostrip_at']);
115

    
116
			if (!$pconfig['ldap_binddn'] || !$pconfig['ldap_bindpw'])
117
				$pconfig['ldap_anon'] = true;
118
		}
119

    
120
		if ($pconfig['type'] == "radius") {
121
			$pconfig['radius_host'] = $a_server[$id]['host'];
122
			$pconfig['radius_auth_port'] = $a_server[$id]['radius_auth_port'];
123
			$pconfig['radius_acct_port'] = $a_server[$id]['radius_acct_port'];
124
			$pconfig['radius_secret'] = $a_server[$id]['radius_secret'];
125
			$pconfig['radius_timeout'] = $a_server[$id]['radius_timeout'];
126

    
127
			if ($pconfig['radius_auth_port'] &&
128
				$pconfig['radius_acct_port'] ) {
129
				$pconfig['radius_srvcs'] = "both";
130
			}
131

    
132
			if ( $pconfig['radius_auth_port'] &&
133
				!$pconfig['radius_acct_port'] ) {
134
				$pconfig['radius_srvcs'] = "auth";
135
				$pconfig['radius_acct_port'] = 1813;
136
			}
137

    
138
			if (!$pconfig['radius_auth_port'] &&
139
				 $pconfig['radius_acct_port'] ) {
140
				$pconfig['radius_srvcs'] = "acct";
141
				$pconfig['radius_auth_port'] = 1812;
142
			}
143

    
144
		}
145
	}
146
}
147

    
148
if ($act == "new") {
149
	$pconfig['ldap_protver'] = 3;
150
	$pconfig['ldap_anon'] = true;
151
	$pconfig['radius_srvcs'] = "both";
152
	$pconfig['radius_auth_port'] = "1812";
153
	$pconfig['radius_acct_port'] = "1813";
154
}
155

    
156
if ($_POST) {
157
	unset($input_errors);
158
	$pconfig = $_POST;
159

    
160
	/* input validation */
161

    
162
	if ($pconfig['type'] == "ldap") {
163
		$reqdfields = explode(" ", "name type ldap_host ldap_port ".
164
						"ldap_urltype ldap_protver ldap_scope ".
165
						"ldap_attr_user ldap_attr_group ldap_attr_member ldapauthcontainers");
166
		$reqdfieldsn = array(
167
			gettext("Descriptive name"),
168
			gettext("Type"),
169
			gettext("Hostname or IP"),
170
			gettext("Port value"),
171
			gettext("Transport"),
172
			gettext("Protocol version"),
173
			gettext("Search level"),
174
			gettext("User naming Attribute"),
175
			gettext("Group naming Attribute"),
176
			gettext("Group member attribute"),
177
			gettext("Authentication container"));
178

    
179
		if (!$pconfig['ldap_anon']) {
180
			$reqdfields[] = "ldap_binddn";
181
			$reqdfields[] = "ldap_bindpw";
182
			$reqdfieldsn[] = gettext("Bind user DN");
183
			$reqdfieldsn[] = gettext("Bind Password");
184
		}
185
	}
186

    
187
	if ($pconfig['type'] == "radius") {
188
		$reqdfields = explode(" ", "name type radius_host radius_srvcs");
189
		$reqdfieldsn = array(
190
			gettext("Descriptive name"),
191
			gettext("Type"),
192
			gettext("Hostname or IP"),
193
			gettext("Services"));
194

    
195
		if ($pconfig['radisu_srvcs'] == "both" ||
196
			$pconfig['radisu_srvcs'] == "auth") {
197
			$reqdfields[] = "radius_auth_port";
198
			$reqdfieldsn[] = gettext("Authentication port value");
199
		}
200

    
201
		if ($pconfig['radisu_srvcs'] == "both" ||
202
			$pconfig['radisu_srvcs'] == "acct") {
203
			$reqdfields[] = "radius_acct_port";
204
			$reqdfieldsn[] = gettext("Accounting port value");
205
		}
206

    
207
		if (!isset($id)) {
208
			$reqdfields[] = "radius_secret";
209
			$reqdfieldsn[] = gettext("Shared Secret");
210
		}
211
	}
212

    
213
	do_input_validation($_POST, $reqdfields, $reqdfieldsn, $input_errors);
214

    
215
	if (preg_match("/[^a-zA-Z0-9\.\-_]/", $_POST['host']))
216
		$input_errors[] = gettext("The host name contains invalid characters.");
217

    
218
	if (auth_get_authserver($pconfig['name']) && !isset($id))
219
		$input_errors[] = gettext("An authentication server with the same name already exists.");
220

    
221
	if (($pconfig['type'] == "radius") && isset($_POST['radius_timeout']) && !empty($_POST['radius_timeout']) && (!is_numeric($_POST['radius_timeout']) || (is_numeric($_POST['radius_timeout']) && ($_POST['radius_timeout'] <= 0))))
222
		$input_errors[] = gettext("RADIUS Timeout value must be numeric and positive.");
223

    
224
	/* if this is an AJAX caller then handle via JSON */
225
	if (isAjax() && is_array($input_errors)) {
226
		input_errors2Ajax($input_errors);
227
		exit;
228
	}
229

    
230
	if (!$input_errors) {
231
		$server = array();
232
		$server['refid'] = uniqid();
233
		if (isset($id) && $a_server[$id])
234
			$server = $a_server[$id];
235

    
236
		$server['type'] = $pconfig['type'];
237
		$server['name'] = $pconfig['name'];
238

    
239
		if ($server['type'] == "ldap") {
240

    
241
			if (!empty($pconfig['ldap_caref']))
242
				$server['ldap_caref'] = $pconfig['ldap_caref'];
243
			$server['host'] = $pconfig['ldap_host'];
244
			$server['ldap_port'] = $pconfig['ldap_port'];
245
			$server['ldap_urltype'] = $pconfig['ldap_urltype'];
246
			$server['ldap_protver'] = $pconfig['ldap_protver'];
247
			$server['ldap_scope'] = $pconfig['ldap_scope'];
248
			$server['ldap_basedn'] = $pconfig['ldap_basedn'];
249
			$server['ldap_authcn'] = $pconfig['ldapauthcontainers'];
250
			$server['ldap_extended_enabled'] = $pconfig['ldap_extended_enabled'];
251
			$server['ldap_extended_query'] = $pconfig['ldap_extended_query'];
252
			$server['ldap_attr_user'] = $pconfig['ldap_attr_user'];
253
			$server['ldap_attr_group'] = $pconfig['ldap_attr_group'];
254
			$server['ldap_attr_member'] = $pconfig['ldap_attr_member'];
255
			if ($pconfig['ldap_utf8'] == "yes")
256
				$server['ldap_utf8'] = true;
257
			else
258
				unset($server['ldap_utf8']);
259
			if ($pconfig['ldap_nostrip_at'] == "yes")
260
				$server['ldap_nostrip_at'] = true;
261
			else
262
				unset($server['ldap_nostrip_at']);
263

    
264

    
265
			if (!$pconfig['ldap_anon']) {
266
				$server['ldap_binddn'] = $pconfig['ldap_binddn'];
267
				$server['ldap_bindpw'] = $pconfig['ldap_bindpw'];
268
			} else {
269
				unset($server['ldap_binddn']);
270
				unset($server['ldap_bindpw']);
271
			}
272
		}
273

    
274
		if ($server['type'] == "radius") {
275

    
276
			$server['host'] = $pconfig['radius_host'];
277

    
278
			if ($pconfig['radius_secret'])
279
				$server['radius_secret'] = $pconfig['radius_secret'];
280

    
281
			if ($pconfig['radius_timeout'])
282
				$server['radius_timeout'] = $pconfig['radius_timeout'];
283
			else
284
				$server['radius_timeout'] = 5;
285

    
286
			if ($pconfig['radius_srvcs'] == "both") {
287
				$server['radius_auth_port'] = $pconfig['radius_auth_port'];
288
				$server['radius_acct_port'] = $pconfig['radius_acct_port'];
289
			}
290

    
291
			if ($pconfig['radius_srvcs'] == "auth") {
292
				$server['radius_auth_port'] = $pconfig['radius_auth_port'];
293
				unset($server['radius_acct_port']);
294
			}
295

    
296
			if ($pconfig['radius_srvcs'] == "acct") {
297
				$server['radius_acct_port'] = $pconfig['radius_acct_port'];
298
				unset($server['radius_auth_port']);
299
			}
300
		}
301

    
302
		if (isset($id) && $config['system']['authserver'][$id])
303
			$config['system']['authserver'][$id] = $server;
304
		else
305
			$config['system']['authserver'][] = $server;
306

    
307
		write_config();
308

    
309
		pfSenseHeader("system_authservers.php");
310
	}
311
}
312

    
313
include("head.inc");
314

    
315
if ($input_errors)
316
	print_input_errors($input_errors);
317
if ($savemsg)
318
	print_info_box($savemsg);
319

    
320
$tab_array = array();
321
$tab_array[] = array(gettext("Users"), false, "system_usermanager.php");
322
$tab_array[] = array(gettext("Groups"), false, "system_groupmanager.php");
323
$tab_array[] = array(gettext("Settings"), false, "system_usermanager_settings.php");
324
$tab_array[] = array(gettext("Servers"), true, "system_authservers.php");
325
display_top_tabs($tab_array);
326

    
327
if (!($act == "new" || $act == "edit" || $input_errors))
328
{
329
	?>
330
	<div class="table-responsive">
331
		<table class="table table-striped table-hover">
332
			<thead>
333
				<tr>
334
					<th><?=gettext("Server Name")?></th>
335
					<th><?=gettext("Type")?></th>
336
					<th><?=gettext("Host Name")?></th>
337
					<th></th>
338
				</tr>
339
			</thead>
340
			<tbody>
341
		<?php foreach($a_server as $i => $server): ?>
342
				<tr>
343
					<td><?=htmlspecialchars($server['name'])?></td>
344
					<td><?=htmlspecialchars($auth_server_types[$server['type']])?></td>
345
					<td><?=htmlspecialchars($server['host'])?></td>
346
					<td>
347
					<?php if ($i < (count($a_server) - 1)): ?>
348
						<a href="system_authservers.php?act=edit&amp;id=<?=$i?>" class="btn btn-xs btn-primary">edit</a>
349
						<a href="system_authservers.php?act=del&amp;id=<?=$i?>" class="btn btn-xs btn-danger">delete</a>
350
					<?php endif?>
351
					</td>
352
				</tr>
353
		<?php endforeach; ?>
354
			</tbody>
355
		</table>
356
	</div>
357

    
358
	<nav class="action-buttons">
359
		<a href="?act=new" class="btn btn-success">add new</a>
360
	</nav>
361
<?php
362
	include("foot.inc");
363
	exit;
364
}
365

    
366
require('classes/Form.class.php');
367
$form = new Form;
368
$form->setAction('system_authservers.php?act=edit');
369
$form->addGlobal(new Form_Input(
370
	'userid',
371
	null,
372
	'hidden',
373
	$id
374
));
375

    
376
$section = new Form_Section('Server settings');
377

    
378
$section->addInput($input = new Form_Input(
379
	'name',
380
	'Descriptive name',
381
	'text',
382
	$pconfig['name']
383
));
384

    
385
if ($act == 'edit')
386
	$input->setReadonly();
387

    
388
$section->addInput($input = new Form_Select(
389
	'type',
390
	'Type',
391
	$pconfig['type'],
392
	$auth_server_types
393
))->toggles();
394

    
395
if ($act == 'edit')
396
	$input->setDisabled();
397

    
398
$form->add($section);
399
$section = new Form_Section('LDAP Server Settings');
400
$section->addClass('toggle-ldap collapse');
401

    
402
if (!isset($pconfig['type']) || $pconfig['type'] == 'ldap')
403
	$section->addClass('in');
404

    
405
$section->addInput(new Form_Input(
406
	'ldap_host',
407
	'Hostname or IP address',
408
	'text',
409
	$pconfig['ldap_host']
410
))->setHelp('NOTE: When using SSL, this hostname MUST match the Common Name '.
411
	'(CN) of the LDAP server"s SSL Certificate.');
412

    
413
$section->addInput(new Form_Input(
414
	'ldap_port',
415
	'Port value',
416
	'number',
417
	$pconfig['ldap_port']
418
));
419

    
420
$section->addInput(new Form_Select(
421
	'ldap_urltype',
422
	'Transport',
423
	$pconfig['ldap_urltype'],
424
	array_combine(array_keys($ldap_urltypes), array_keys($ldap_urltypes))
425
));
426

    
427
if (empty($a_ca))
428
{
429
	$section->addInput(new Form_StaticText(
430
		'Peer Certificate Authority',
431
		'No Certificate Authorities defined.<br/>Create one under <a href="system_camanager.php">System &gt; Cert Manager</a>.'
432
	));
433
}
434
else
435
{
436
	$ldapCaRef = [];
437
	foreach ($a_ca as $ca)
438
		$ldapCaRef[ $ca['refid'] ] = $ca['descr'];
439

    
440
	$section->addInput(new Form_Select(
441
		'ldap_caref',
442
		'Peer Certificate Authority',
443
		$pconfig['ldap_caref'],
444
		$ldapCaRef
445
	))->setHelp('This option is used if \'SSL Encrypted\' option is choosen. '.
446
		'It must match with the CA in the AD otherwise problems will arise.');
447
}
448

    
449
$section->addInput(new Form_Select(
450
	'ldap_protver',
451
	'Protocol version',
452
	$pconfig['ldap_protver'],
453
	array_combine($ldap_protvers, $ldap_protvers)
454
));
455

    
456
$group = new Form_Group('Search scope');
457
$group->add(new Form_Select(
458
	'ldap_scope',
459
	'Level',
460
	$pconfig['ldap_scope'],
461
	$ldap_scopes
462
));
463
$group->add(new Form_Input(
464
	'ldap_basedn',
465
	'Base DN',
466
	'text',
467
	$pconfig['ldap_basedn']
468
));
469
$section->add($group);
470

    
471
$group = new Form_Group('Authentication containers');
472
$group->add(new Form_Input(
473
	'ldapauthcontainers',
474
	'Containers',
475
	'text',
476
	$pconfig['ldap_authcn']
477
))->setHelp('Note: Semi-Colon separated. This will be prepended to the search '.
478
	'base dn above or you can specify full container path containing a dc= '.
479
	'component.<br/>Example: CN=Users;DC=example,DC=com or OU=Staff;OU=Freelancers');
480
#FIXME
481
$group->add(new Form_Button(
482
	'Select',
483
	'Select a container',
484
	'/system_usermanager_settings_ldapacpicker.php?port=389&host=192.168.1.1&scope=one&basedn=CN=pfsense&binddn=&bindpw=&urltype=TCP%20-%20Standard&proto=3&authcn=OU=Staff&cert='
485
));
486
$section->add($group);
487

    
488
$section->addInput(new Form_Checkbox(
489
	'ldap_extended_enabled',
490
	'Extended query',
491
	'Enable extended query',
492
	$pconfig['ldap_extended_enabled']
493
))->toggles('.toggle-extended');
494

    
495
$group = new Form_Group('Query');
496
$group->addClass('toggle-extended collapse');
497
$group->add(new Form_Input(
498
	'ldap_extended_query',
499
	'Query',
500
	'text',
501
	$pconfig['ldap_extended_query']
502
))->setHelp('Example: &amp;(objectClass=inetOrgPerson)(mail=*@example.com)');
503

    
504
$section->add($group);
505

    
506
$section->addInput(new Form_Checkbox(
507
	'ldap_anon',
508
	'Bind anonymous',
509
	'Use anonymous binds to resolve distinguished names',
510
	$pconfig['ldap_anon']
511
))->toggles('.toggle-anon');
512

    
513
$group = new Form_Group('Bind credentials');
514
$group->addClass('toggle-anon collapse');
515
$group->add(new Form_Input(
516
	'ldap_binddn',
517
	'User DN:',
518
	'text',
519
	$pconfig['ldap_binddn']
520
));
521
$group->add(new Form_Input(
522
	'ldap_bindpw',
523
	'Password',
524
	'text',
525
	$pconfig['ldap_bindpw']
526
));
527
$section->add($group);
528

    
529
if ($act == 'add')
530
{
531
	$ldap_templates = array_map($ldap_templates, function($t){ return $t['desc']; });
532

    
533
	$section->addInput(new Form_Select(
534
		'ldap_tmpltype',
535
		'Initial Template',
536
		$pconfig['ldap_template'],
537
		$ldap_templates
538
	));
539
}
540

    
541
$section->addInput(new Form_Input(
542
	'ldap_attr_user',
543
	'User naming attribute',
544
	'text',
545
	$pconfig['ldap_attr_user']
546
));
547

    
548
$section->addInput(new Form_Input(
549
	'ldap_attr_group',
550
	'Group naming attribute',
551
	'text',
552
	$pconfig['ldap_attr_group']
553
));
554

    
555
$section->addInput(new Form_Input(
556
	'ldap_attr_member',
557
	'Group member attribute',
558
	'text',
559
	$pconfig['ldap_attr_member']
560
));
561

    
562
$section->addInput(new Form_Checkbox(
563
	'ldap_utf8',
564
	'UTF8 Encode',
565
	'UTF8 encode LDAP parameters before sending them to the server.',
566
	$pconfig['ldap_utf8']
567
))->setHelp('Required to support international characters, but may not be '.
568
	'supported by every LDAP server.');
569

    
570
$section->addInput(new Form_Checkbox(
571
	'ldap_nostrip_at',
572
	'Username Alterations',
573
	'Do not strip away parts of the username after the @ symbol',
574
	$pconfig['ldap_nostrip_at']
575
))->setHelp('e.g. user@host becomes user when unchecked.');
576

    
577
$form->add($section);
578
$section = new Form_Section('Radius Server Settings');
579
$section->addClass('toggle-radius collapse');
580

    
581
$section->addInput(new Form_Input(
582
	'radius_host',
583
	'Hostname or IP address',
584
	'text',
585
	$pconfig['radius_host']
586
));
587

    
588
$section->addInput(new Form_Input(
589
	'radius_secret',
590
	'Shared Secret',
591
	'text',
592
	$pconfig['radius_secret']
593
));
594

    
595
$section->addInput(new Form_Select(
596
	'radius_srvcs',
597
	'Services offered',
598
	$pconfig['radius_srvcs'],
599
	$radius_srvcs
600
));
601

    
602
$section->addInput(new Form_Input(
603
	'radius_auth_port',
604
	'Authentication port value',
605
	'number',
606
	$pconfig['radius_secret']
607
));
608

    
609
$section->addInput(new Form_Input(
610
	'radius_acct_port',
611
	'Authentication Timeout',
612
	'number',
613
	$pconfig['radius_acct_port']
614
));
615

    
616
$section->addInput(new Form_Input(
617
	'radius_timeout',
618
	'Authentication Timeout',
619
	'number',
620
	$pconfig['radius_timeout']
621
))->setHelp('This value controls how long, in seconds, that the RADIUS '.
622
	'server may take to respond to an authentication request. If left blank, the '.
623
	'default value is 5 seconds. NOTE: If you are using an interactive two-factor '.
624
	'authentication system, increase this timeout to account for how long it will '.
625
	'take the user to receive and enter a token.');
626

    
627
if (isset($id) && $a_server[$id])
628
{
629
	$section->addInput(new Form_Input(
630
		'id',
631
		null,
632
		'hidden',
633
		$id
634
	));
635
}
636

    
637
$form->add($section);
638
print $form;
639

    
640
include("foot.inc");
(193-193/237)