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")." {$serverdeleted} ".
86
				gettext("deleted")."<br />";
87
	write_config($savemsg);
88
}
89

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

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

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

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

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

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

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

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

    
143
		}
144
	}
145
}
146

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

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

    
159
	/* input validation */
160

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

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

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

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

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

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

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

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

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

    
220
	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))))
221
		$input_errors[] = gettext("RADIUS Timeout value must be numeric and positive.");
222

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

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

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

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

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

    
263

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

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

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

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

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

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

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

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

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

    
306
		write_config();
307

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

    
312
include("head.inc");
313

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
470
$group = new Form_Group('Authentication containers');
471
$group->add(new Form_Input(
472
	'ldapauthcontainers',
473
	'Containers',
474
	'text',
475
	$pconfig['ldap_authcn']
476
))->setHelp('Note: Semi-Colon separated. This will be prepended to the search '.
477
	'base dn above or you can specify full container path containing a dc= '.
478
	'component.<br/>Example: CN=Users;DC=example,DC=com or OU=Staff;OU=Freelancers');
479
#FIXME
480
$group->add(new Form_Button(
481
	'Select',
482
	'Select a container',
483
	'/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='
484
));
485
$section->add($group);
486

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    
639
include("foot.inc");
(208-208/252)