/
config.class.inc.php
2211 lines (2089 loc) · 70.8 KB
/
config.class.inc.php
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
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
// Copyright (C) 2010-2018 Combodo SARL
//
// This file is part of iTop.
//
// iTop is free software; you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// iTop is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with iTop. If not, see <http://www.gnu.org/licenses/>
define('ITOP_APPLICATION', 'iTop');
define('ITOP_APPLICATION_SHORT', 'iTop');
define('ITOP_VERSION', '2.6.2');
define('ITOP_REVISION', 'svn');
define('ITOP_BUILD_DATE', '$WCNOW$');
define('ACCESS_USER_WRITE', 1);
define('ACCESS_ADMIN_WRITE', 2);
define('ACCESS_FULL', ACCESS_USER_WRITE | ACCESS_ADMIN_WRITE);
define('ACCESS_READONLY', 0);
/**
* Configuration read/write
*
* @copyright Copyright (C) 2010-2018 Combodo SARL
* @license http://opensource.org/licenses/AGPL-3.0
*/
require_once('coreexception.class.inc.php');
require_once('attributedef.class.inc.php'); // For the defines
require_once('simplecrypt.class.inc.php');
class ConfigException extends CoreException
{
}
// was utf8 but it only supports BMP chars (https://dev.mysql.com/doc/refman/5.5/en/charset-unicode-utf8mb4.html)
// so we switched to utf8mb4 in iTop 2.5, adding dependency to MySQL 5.5.3
// The config params db_character_set and db_collation were introduced as a temporary workaround and removed in iTop 2.5
// now everything uses those fixed value !
define('DEFAULT_CHARACTER_SET', 'utf8mb4');
define('DEFAULT_COLLATION', 'utf8mb4_unicode_ci');
define('DEFAULT_LOG_GLOBAL', true);
define('DEFAULT_LOG_NOTIFICATION', true);
define('DEFAULT_LOG_ISSUE', true);
define('DEFAULT_LOG_WEB_SERVICE', true);
define('DEFAULT_QUERY_CACHE_ENABLED', true);
define('DEFAULT_MIN_DISPLAY_LIMIT', 10);
define('DEFAULT_MAX_DISPLAY_LIMIT', 15);
define('DEFAULT_STANDARD_RELOAD_INTERVAL', 5 * 60);
define('DEFAULT_FAST_RELOAD_INTERVAL', 1 * 60);
define('DEFAULT_SECURE_CONNECTION_REQUIRED', false);
define('DEFAULT_ALLOWED_LOGIN_TYPES', 'form|basic|external');
define('DEFAULT_EXT_AUTH_VARIABLE', '$_SERVER[\'REMOTE_USER\']');
define('DEFAULT_ENCRYPTION_KEY', '@iT0pEncr1pti0n!'); // We'll use a random generated key later (if possible)
define('DEFAULT_ENCRYPTION_LIB', 'Mcrypt'); // We'll define the best encryption available later
/**
* Config
* configuration data (this class cannot not be localized, because it is responsible for loading the dictionaries)
*
* @package iTopORM
*
* @see \MetaModel::GetConfig() to get the config, if the metamodel was already loaded
* @see utils::GetConfig() to load config from the current env, if metamodel is not loaded
*/
class Config
{
//protected $m_bIsLoaded = false;
protected $m_sFile = '';
protected $m_aAppModules;
protected $m_aDataModels;
protected $m_aWebServiceCategories;
protected $m_aAddons;
protected $m_aModuleSettings;
/**
* New way to store the settings !
*
* @var array
* @since 2.5 db* variables
*/
protected $m_aSettings = array(
'app_env_label' => array(
'type' => 'string',
'description' => 'Label displayed to describe the current application environment, defaults to the environment name (e.g. "production")',
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'app_root_url' => array(
'type' => 'string',
'description' => 'Root URL used for navigating within the application, or from an email to the application (you can put $SERVER_NAME$ as a placeholder for the server\'s name)',
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'app_icon_url' => array(
'type' => 'string',
'description' => 'Hyperlink to redirect the user when clicking on the application icon (in the main window, or login/logoff pages)',
'default' => 'http://www.combodo.com/itop',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'db_host' => array(
'type' => 'string',
'default' => null,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'db_user' => array(
'type' => 'string',
'default' => null,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'db_pwd' => array(
'type' => 'string',
'default' => null,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'db_name' => array(
'type' => 'string',
'default' => null,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'db_subname' => array(
'type' => 'string',
'default' => null,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'db_tls.enabled' => array(
'type' => 'bool',
'description' => 'If true then the connection to the DB will be encrypted',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'db_tls.ca' => array(
'type' => 'string',
'description' => 'Path to certificate authority file for SSL',
'default' => null,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'db_character_set' => array( // @deprecated to remove in 2.7 ? N°1001 utf8mb4 switch
'type' => 'string',
'description' => 'Deprecated since iTop 2.5 : now using utf8mb4',
'default' => 'DEPRECATED_2.5',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'db_collation' => array( // @deprecated to remove in 2.7 ? N°1001 utf8mb4 switch
'type' => 'string',
'description' => 'Deprecated since iTop 2.5 : now using utf8mb4_unicode_ci',
'default' => 'DEPRECATED_2.5',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'skip_check_to_write' => array(
'type' => 'bool',
'description' => 'Disable data format and integrity checks to boost up data load (insert or update)',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'skip_check_ext_keys' => array(
'type' => 'bool',
'description' => 'Disable external key check when checking the value of attributes',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'skip_strong_security' => array(
'type' => 'bool',
'description' => 'Disable strong security - TEMPORARY: this flag should be removed when we are more confident in the recent change in security',
'default' => true,
'value' => true,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'query_optimization_enabled' => array(
'type' => 'bool',
'description' => 'The queries are optimized based on the assumption that the DB integrity has been preserved. By disabling the optimization one can ensure that the fetched data is clean... but this can be really slower or not usable at all (some queries will exceed the allowed number of joins in MySQL: 61!)',
'default' => true,
'value' => true,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'query_indentation_enabled' => array(
'type' => 'bool',
'description' => 'For developers: format the SQL queries for human analysis',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'disable_mandatory_ext_keys' => array(
'type' => 'bool',
'description' => 'For developers: allow every external keys to be undefined',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'graphviz_path' => array(
'type' => 'string',
'description' => 'Path to the Graphviz "dot" executable for graphing objects lifecycle',
'default' => '/usr/bin/dot',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'php_path' => array(
'type' => 'string',
'description' => 'Path to the php executable in CLI mode',
'default' => 'php',
'value' => 'php',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'session_name' => array(
'type' => 'string',
'description' => 'The name of the cookie used to store the PHP session id',
'default' => 'iTop',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'max_combo_length' => array(
'type' => 'integer',
'description' => 'The maximum number of elements in a drop-down list. If more then an autocomplete will be used',
'default' => 50,
'value' => 50,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'min_autocomplete_chars' => array(
'type' => 'integer',
'description' => 'The minimum number of characters to type in order to trigger the "autocomplete" behavior',
'default' => 2,
'value' => 2,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'allow_menu_on_linkset' => array(
'type' => 'bool',
'description' => 'Display Action menus in view mode on any LinkedSet with edit_mode != none',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'allow_target_creation' => array(
'type' => 'bool',
'description' => 'Displays the + button on external keys to create target objects',
'default' => true,
'value' => true,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
// Levels that trigger a confirmation in the CSV import/synchro wizard
'csv_import_min_object_confirmation' => array(
'type' => 'integer',
'description' => 'Minimum number of objects to check for the confirmation percentages',
'default' => 3,
'value' => 3,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'csv_import_errors_percentage' => array(
'type' => 'integer',
'description' => 'Percentage of errors that trigger a confirmation in the CSV import',
'default' => 50,
'value' => 50,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'csv_import_modifications_percentage' => array(
'type' => 'integer',
'description' => 'Percentage of modifications that trigger a confirmation in the CSV import',
'default' => 50,
'value' => 50,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'csv_import_creations_percentage' => array(
'type' => 'integer',
'description' => 'Percentage of creations that trigger a confirmation in the CSV import',
'default' => 50,
'value' => 50,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'csv_import_history_display' => array(
'type' => 'bool',
'description' => 'Display the history tab in the import wizard',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'access_mode' => array(
'type' => 'integer',
'description' => 'Access mode: ACCESS_READONLY = 0, ACCESS_ADMIN_WRITE = 2, ACCESS_FULL = 3',
'default' => ACCESS_FULL,
'value' => ACCESS_FULL,
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'access_message' => array(
'type' => 'string',
'description' => 'Message displayed to the users when there is any access restriction',
'default' => 'iTop is temporarily frozen, please wait... (the admin team)',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'online_help' => array(
'type' => 'string',
'description' => 'Hyperlink to the online-help web page',
'default' => 'http://www.combodo.com/itop-help',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'log_usage' => array(
'type' => 'bool',
'description' => 'Log the usage of the application (i.e. the date/time and the user name of each login)',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'log_rest_service' => array(
'type' => 'bool',
'description' => 'Log the usage of the REST/JSON service',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'synchro_trace' => array(
'type' => 'string',
'description' => 'Synchronization details: none, display, save (includes \'display\')',
'default' => 'none',
'value' => 'none',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'link_set_item_separator' => array(
'type' => 'string',
'description' => 'Link set from string: line separator',
'default' => '|',
'value' => '|',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'link_set_attribute_separator' => array(
'type' => 'string',
'description' => 'Link set from string: attribute separator',
'default' => ';',
'value' => ';',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'link_set_value_separator' => array(
'type' => 'string',
'description' => 'Link set from string: value separator (between the attcode and the value itself',
'default' => ':',
'value' => ':',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'link_set_attribute_qualifier' => array(
'type' => 'string',
'description' => 'Link set from string: attribute qualifier (encloses both the attcode and the value)',
'default' => "'",
'value' => "'",
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'tag_set_item_separator' => array(
'type' => 'string',
'description' => 'Tag set from string: tag label separator',
'default' => '|',
'value' => '|',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'cron_max_execution_time' => array(
'type' => 'integer',
'description' => 'Duration (seconds) of the page cron.php, must be shorter than php setting max_execution_time and shorter than the web server response timeout',
'default' => 600,
'value' => 600,
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'cron_sleep' => array(
'type' => 'integer',
'description' => 'Duration (seconds) before cron.php checks again if something must be done',
'default' => 2,
'value' => 2,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'async_task_retries' => array(
'type' => 'array',
'description' => 'Automatic retries of asynchronous tasks in case of failure (per class)',
'default' => array('AsyncSendEmail' => array('max_retries' => 0, 'retry_delay' => 600)),
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'email_asynchronous' => array(
'type' => 'bool',
'description' => 'If set, the emails are sent off line, which requires cron.php to be activated. Exception: some features like the email test utility will force the serialized mode',
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'email_transport' => array(
'type' => 'string',
'description' => 'Mean to send emails: PHPMail (uses the function mail()) or SMTP (implements the client protocol)',
'default' => "PHPMail",
'value' => "PHPMail",
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'email_transport_smtp.host' => array(
'type' => 'string',
'description' => 'host name or IP address (optional)',
'default' => "localhost",
'value' => "localhost",
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'email_transport_smtp.port' => array(
'type' => 'integer',
'description' => 'port number (optional)',
'default' => 25,
'value' => 25,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'email_transport_smtp.encryption' => array(
'type' => 'string',
'description' => 'tls or ssl (optional)',
'default' => "",
'value' => "",
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'email_transport_smtp.username' => array(
'type' => 'string',
'description' => 'Authentication user (optional)',
'default' => "",
'value' => "",
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'email_transport_smtp.password' => array(
'type' => 'string',
'description' => 'Authentication password (optional)',
'default' => "",
'value' => "",
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'email_css' => array(
'type' => 'string',
'description' => 'CSS that will override the standard stylesheet used for the notifications',
'default' => "",
'value' => "",
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'email_default_sender_address' => array(
'type' => 'string',
'description' => 'Default address provided in the email from header field.',
'default' => "",
'value' => "",
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'email_default_sender_label' => array(
'type' => 'string',
'description' => 'Default label provided in the email from header field.',
'default' => "",
'value' => "",
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'apc_cache.enabled' => array(
'type' => 'bool',
'description' => 'If set, the APC cache is allowed (the PHP extension must also be active)',
'default' => true,
'value' => true,
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'apc_cache.query_ttl' => array(
'type' => 'integer',
'description' => 'Time to live set in APC for the prepared queries (seconds - 0 means no timeout)',
'default' => 3600,
'value' => 3600,
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'apc_cache_emulation.max_entries' => array(
'type' => 'integer',
'description' => 'Maximum number of cache entries (0 means no limit)',
'default' => 1000,
'value' => 1000,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'timezone' => array(
'type' => 'string',
'description' => 'Timezone (reference: http://php.net/manual/en/timezones.php). If empty, it will be left unchanged and MUST be explicitly configured in PHP',
// examples... not used (nor 'description')
'examples' => array(
'America/Sao_Paulo',
'America/New_York (standing for EDT)',
'America/Los_Angeles (standing for PDT)',
'Asia/Istanbul',
'Asia/Singapore',
'Africa/Casablanca',
'Australia/Sydney'
),
'default' => 'Europe/Paris',
'value' => 'Europe/Paris',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'cas_include_path' => array(
'type' => 'string',
'description' => 'The path where to find the phpCAS library',
// examples... not used (nor 'description')
'default' => '/usr/share/php',
'value' => '/usr/share/php',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'cas_version' => array(
'type' => 'string',
'description' => 'The CAS protocol version to use: "1.0" (CAS v1), "2.0" (CAS v2) or "S1" (SAML V1) )',
// examples... not used (nor 'description')
'default' => '2.0',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_host' => array(
'type' => 'string',
'description' => 'The name of the CAS host',
// examples... not used (nor 'description')
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_port' => array(
'type' => 'integer',
'description' => 'The port used by the CAS server',
// examples... not used (nor 'description')
'default' => 443,
'value' => 443,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_context' => array(
'type' => 'string',
'description' => 'The CAS context',
// examples... not used (nor 'description')
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_server_ca_cert_path' => array(
'type' => 'string',
'description' => 'The path where to find the certificate of the CA for validating the certificate of the CAS server',
// examples... not used (nor 'description')
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_logout_redirect_service' => array(
'type' => 'string',
'description' => 'The redirect service (URL) to use when logging-out with CAS',
// examples... not used (nor 'description')
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_memberof' => array(
'type' => 'string',
'description' => 'A semicolon separated list of group names that the user must be member of (works only with SAML - e.g. cas_version=> "S1")',
// examples... not used (nor 'description')
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_user_synchro' => array(
'type' => 'bool',
'description' => 'Whether or not to synchronize users with CAS/LDAP',
// examples... not used (nor 'description')
'default' => 0,
'value' => 0,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_update_profiles' => array(
'type' => 'bool',
'description' => 'Whether or not to update the profiles of an existing user from the CAS information',
// examples... not used (nor 'description')
'default' => 0,
'value' => 0,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_profile_pattern' => array(
'type' => 'string',
'description' => 'A regular expression pattern to extract the name of the iTop profile from the name of an LDAP/CAS group',
// examples... not used (nor 'description')
'default' => '/^cn=([^,]+),/',
'value' => '/^cn=([^,]+),/',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_default_profiles' => array(
'type' => 'string',
'description' => 'A semi-colon separated list of iTop Profiles to use when creating a new user if no profile is retrieved from CAS',
// examples... not used (nor 'description')
'default' => 'Portal user',
'value' => 'Portal user',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'cas_debug' => array(
'type' => 'bool',
'description' => 'Activate the CAS debug',
// examples... not used (nor 'description')
'default' => false,
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'forgot_password' => array(
'type' => 'bool',
'description' => 'Enable the "Forgot password" feature',
// examples... not used (nor 'description')
'default' => true,
'value' => true,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'forgot_password_from' => array(
'type' => 'string',
'description' => 'Sender email address for the "forgot password" feature. If empty, defaults to the recipient\'s email address.',
// examples... not used (nor 'description')
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'deadline_format' => array(
'type' => 'string',
'description' => 'The format used for displaying "deadline" attributes: any string with the following placeholders: $date$, $difference$',
// examples... $date$ ($deadline$)
'default' => '$difference$',
'value' => '$difference$',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'buttons_position' => array(
'type' => 'string',
'description' => 'Position of the forms buttons: bottom | top | both',
// examples... not used
'default' => 'both',
'value' => 'both',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'shortcut_actions' => array(
'type' => 'string',
'description' => 'Actions that are available as direct buttons next to the "Actions" menu',
// examples... not used
'default' => 'UI:Menu:Modify,UI:Menu:New',
'value' => 'UI:Menu:Modify',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'complex_actions_limit' => array(
'type' => 'integer',
'description' => 'Display the "actions" menu items that require long computation only if the list of objects is contains less objects than this number (0 means no limit)',
// examples... not used
'default' => 50,
'value' => 50,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'synchro_prevent_delete_all' => array(
'type' => 'bool',
'description' => 'Stop the synchro if all the replicas of a data source become obsolete at the same time.',
// examples... not used
'default' => true,
'value' => true,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'source_dir' => array(
'type' => 'string',
'description' => 'Source directory for the datamodel files. (which gets compiled to env-production).',
// examples... not used
'default' => '',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'csv_file_default_charset' => array(
'type' => 'string',
'description' => 'Character set used by default for downloading and uploading data as a CSV file. Warning: it is case sensitive (uppercase is preferable).',
// examples... not used
'default' => 'ISO-8859-1',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'debug_report_spurious_chars' => array(
'type' => 'bool',
'description' => 'Report, in the error log, the characters found in the output buffer, echoed by mistake in the loaded modules, and potentially corrupting the output',
// examples... not used
'default' => false,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'impact_analysis_first_tab' => array(
'type' => 'string',
'description' => 'Which tab to display first in the impact analysis view: list or graphics. Graphics are nicer but slower to display when there are many objects',
// examples... not used
'default' => 'graphics',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'url_validation_pattern' => array(
'type' => 'string',
'description' => 'Regular expression to validate/detect the format of an URL (URL attributes and Wiki formatting for Text attributes)',
'default' => '(https?|ftp)\://([a-zA-Z0-9+!*(),;?&=\$_.-]+(\:[a-zA-Z0-9+!*(),;?&=\$_.-]+)?@)?([a-zA-Z0-9-.]{3,})(\:[0-9]{2,5})?(/([a-zA-Z0-9%+\$_-]\.?)+)*/?(\?[a-zA-Z+&\$_.-][a-zA-Z0-9;:[\]@&%=+/\$_.-]*)?(#[a-zA-Z_.-][a-zA-Z0-9+\$_.-]*)?',
// SHEME.......... USER....................... PASSWORD.......................... HOST/IP........... PORT.......... PATH........................ GET............................................ ANCHOR............................
// Example: http://User:passWord@127.0.0.1:8888/patH/Page.php?arrayArgument[2]=something:blah20#myAnchor
// Origin of this regexp: http://www.php.net/manual/fr/function.preg-match.php#93824
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'email_validation_pattern' => array(
'type' => 'string',
'description' => 'Regular expression to validate/detect the format of an eMail address',
'default' => "[a-zA-Z0-9._&'-]+@[a-zA-Z0-9.-]+\.[a-zA-Z0-9-]{2,}",
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'email_decoration_class' => array(
'type' => 'string',
'description' => 'CSS class(es) to use as decoration for the HTML rendering of the attribute. eg. "fa fa-envelope" will put a mail icon.',
'default' => 'fa fa-envelope',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'phone_number_validation_pattern' => array(
'type' => 'string',
'description' => 'Regular expression to validate/detect the format of a phone number',
'default' => "[0-9.\-\ \+\(\)]+",
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'phone_number_url_pattern' => array(
'type' => 'string',
'description' => 'Format for phone number url, use %1$s as a placeholder for the value. eg. "tel:%1$s" for regular phone applications or "callto:%1$s" for Skype. Default is "tel:%1$s".',
'default' => 'tel:%1$s',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'phone_number_decoration_class' => array(
'type' => 'string',
'description' => 'CSS class(es) to use as decoration for the HTML rendering of the attribute. eg. "fa fa-phone" will put a phone icon.',
'default' => 'fa fa-phone',
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'log_kpi_duration' => array(
'type' => 'integer',
'description' => 'Level of logging for troubleshooting performance issues (1 to enable, 2 +blame callers)',
// examples... not used
'default' => 0,
'value' => 0,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'log_kpi_memory' => array(
'type' => 'integer',
'description' => 'Level of logging for troubleshooting memory limit issues',
// examples... not used
'default' => 0,
'value' => 0,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'log_kpi_user_id' => array(
'type' => 'string',
'description' => 'Limit the scope of users to the given user id (* means no limit)',
// examples... not used
'default' => '*',
'value' => '*',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'max_linkset_output' => array(
'type' => 'integer',
'description' => 'Maximum number of items shown when getting a list of related items in an email, using the form $this->some_list$. 0 means no limit.',
'default' => 100,
'value' => 100,
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'demo_mode' => array(
'type' => 'bool',
'description' => 'Set to true to prevent users from changing passwords/languages',
'default' => false,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'portal_tickets' => array(
'type' => 'string',
'description' => 'CSV list of classes supported in the portal',
// examples... not used
'default' => 'UserRequest',
'value' => 'UserRequest',
'source_of_value' => '',
'show_in_conf_sample' => true,
),
'portal_dispatch_urls' => array(
'type' => 'array',
'description' => 'Associative array of sPortalId => Home page URL (relatively to the application root)',
// examples... not used
'default' => array(),
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'max_execution_time_per_loop' => array(
'type' => 'integer',
'description' => 'Maximum execution time requested, per loop, during bulk operations. Zero means no limit.',
// examples... not used
'default' => 30,
'value' => 30,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'max_history_length' => array(
'type' => 'integer',
'description' => 'Maximum length of the history table (in the "History" tab on each object) before it gets truncated. Latest modifications are displayed first.',
// examples... not used
'default' => 50,
'value' => 50,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'max_history_case_log_entry_length' => array(
'type' => 'integer',
'description' => 'The length (in number of characters) at which to truncate the (expandable) display (in the history) of a case log entry. If zero, the display in the history is not truncated.',
// examples... not used
'default' => 60,
'value' => 60,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'full_text_chunk_duration' => array(
'type' => 'integer',
'description' => 'Delay after which the results are displayed.',
// examples... not used
'default' => 2,
'value' => 2,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'full_text_accelerators' => array(
'type' => 'array',
'description' => 'Specifies classes to be searched at first (and the subset of data) when running the full text search.',
'default' => array(),
'value' => false,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'full_text_needle_min' => array(
'type' => 'integer',
'description' => 'Minimum size of the full text needle.',
'default' => 3,
'value' => 3,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'tracking_level_linked_set_default' => array(
'type' => 'integer',
'description' => 'Default tracking level if not explicitly set at the attribute level, for AttributeLinkedSet (defaults to NONE in case of a fresh install, LIST otherwise - this to preserve backward compatibility while upgrading from a version older than 2.0.3 - see TRAC #936)',
'default' => LINKSET_TRACKING_LIST,
'value' => LINKSET_TRACKING_LIST,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'tracking_level_linked_set_indirect_default' => array(
'type' => 'integer',
'description' => 'Default tracking level if not explicitly set at the attribute level, for AttributeLinkedSetIndirect',
'default' => LINKSET_TRACKING_ALL,
'value' => LINKSET_TRACKING_ALL,
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'user_rights_legacy' => array(
'type' => 'bool',
'description' => 'Set to true to restore the buggy algorithm for the computation of user rights (within the same profile, ALLOW on the class itself has precedence on DENY of a parent class)',
'default' => false,
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'xlsx_exporter_memory_limit' => array(
'type' => 'string',
'description' => 'Memory limit to use when (interactively) exporting data to Excel',
'default' => '2048M', // Huuuuuuge 2GB!
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'min_reload_interval' => array(
'type' => 'integer',
'description' => 'Minimum refresh interval (seconds) for dashboards, shortcuts, etc. Even if the interval is set programmatically, it is forced to that minimum',
'default' => 5, // In iTop 2.0.3, this was the hardcoded value
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'relations_max_depth' => array(
'type' => 'integer',
'description' => 'Maximum number of successive levels (depth) to explore when displaying the impact/depends on relations.',
'default' => 20, // In iTop 2.0.3, this was the hardcoded value
'value' => '',
'source_of_value' => '',
'show_in_conf_sample' => false,
),
'transaction_storage' => array(
'type' => 'string',
'description' => 'The type of mechanism to use for storing the unique identifiers for transactions (Session|File).',
'default' => 'File',
'value' => '',