Subversion Repositories oidplus

Rev

Rev 624 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
261 daniel-mar 1
 
2
OVERVIEW OF ALL CONFIG.INC.PHP SETTINGS
3
=======================================
4
 
294 daniel-mar 5
The file userdata/baseconfig/config.inc.php contains various settings
261 daniel-mar 6
which are essential to connect to your database and other
7
things that should be known before the database connection
8
is opened.
294 daniel-mar 9
Other settings are stored in the database (table "config")
261 daniel-mar 10
and can be accessed using the admin login area.
11
 
294 daniel-mar 12
The setup assistant (/setup/) will lead you through
13
the creation of the most important settings of config.inc.php.
261 daniel-mar 14
 
294 daniel-mar 15
Below you will find a list of all possible config settings
16
of the default OIDplus installation/plugins.
17
Please note that a plugin can define any key.
18
 
19
 
261 daniel-mar 20
-------------------------------------
21
(1) CONFIG SETTINGS PROVIDED BY SETUP
22
-------------------------------------
23
 
24
OIDplus::baseConfig()->setValue('CONFIG_VERSION',           2.1);
25
Old 2.0 format:          define('OIDPLUS_CONFIG_VERSION',   2.0);
26
 
471 daniel-mar 27
OIDplus::baseConfig()->setValue('ADMIN_PASSWORD',           '<BCrypt hash, or base64 encoded SHA3-512 hash>');
28
Old 2.0 format:          define('OIDPLUS_ADMIN_PASSWORD',   '<BCrypt hash, or base64 encoded SHA3-512 hash>');
609 daniel-mar 29
                         If you want to have multiple valid administrator passwords
30
                         (e.g. if you want multiple users), then this value can
31
                         also be an array containing hashes.
261 daniel-mar 32
 
33
OIDplus::baseConfig()->setValue('DATABASE_PLUGIN',          '');
34
Old 2.0 format:          define('OIDPLUS_DATABASE_PLUGIN',  '');
35
 
36
OIDplus::baseConfig()->setValue('ODBC_DSN',                 'DRIVER={SQL Server};SERVER=localhost;DATABASE=oidplus;CHARSET=UTF8');
37
Old 2.0 format:          define('OIDPLUS_ODBC_DSN',         'DRIVER={SQL Server};SERVER=localhost;DATABASE=oidplus;CHARSET=UTF8');
38
 
39
OIDplus::baseConfig()->setValue('ODBC_USERNAME',            'sa');
40
Old 2.0 format:          define('OIDPLUS_ODBC_USERNAME',    'sa');
41
 
42
OIDplus::baseConfig()->setValue('ODBC_PASSWORD',            base64_decode('<base64_encoded_password>')); // alternatively as plaintext
43
Old 2.0 format:          define('OIDPLUS_ODBC_PASSWORD',    '<base64_encoded_password>'); // must be base64 encoded
44
Information:             The base64 encoding "protects" your password from being read if
45
                         someone quickly looks at your display while you have the configuration file opened.
46
 
47
OIDplus::baseConfig()->setValue('PDO_DSN',                  'pgsql:host=localhost;dbname=oidplus');
48
Old 2.0 format:          define('OIDPLUS_PDO_DSN',          'pgsql:host=localhost;dbname=oidplus');
49
 
50
OIDplus::baseConfig()->setValue('PDO_USERNAME',             'postgres');
51
Old 2.0 format:          define('OIDPLUS_PDO_USERNAME',     'postgres');
52
 
53
OIDplus::baseConfig()->setValue('PDO_PASSWORD',             base64_decode('<base64_encoded_password>')); // alternatively as plaintext
54
Old 2.0 format:          define('OIDPLUS_PDO_PASSWORD',     '<base64_encoded_password>'); // must be base64 encoded
55
Information:             The base64 encoding "protects" your password from being read if
56
                         someone quickly looks at your display while you have the configuration file opened.
57
 
58
OIDplus::baseConfig()->setValue('MYSQL_HOST',               'localhost:3306');
59
Old 2.0 format:          define('OIDPLUS_MYSQL_HOST',       'localhost:3306');
60
Information:             Port is optional
61
 
62
OIDplus::baseConfig()->setValue('MYSQL_USERNAME',           'root');
63
Old 2.0 format:          define('OIDPLUS_MYSQL_USERNAME',   'root');
64
 
65
OIDplus::baseConfig()->setValue('MYSQL_PASSWORD',           base64_decode('<base64_encoded_password>')); // alternatively as plaintext
66
Old 2.0 format:          define('OIDPLUS_MYSQL_PASSWORD',   '<base64_encoded_password>'); // must be base64 encoded
67
Information:             The base64 encoding "protects" your password from being read if
68
                         someone quickly looks at your display while you have the configuration file opened.
69
 
70
OIDplus::baseConfig()->setValue('MYSQL_DATABASE',           'oidplus');
71
Old 2.0 format:          define('OIDPLUS_MYSQL_DATABASE',   'oidplus');
72
 
73
OIDplus::baseConfig()->setValue('PGSQL_HOST',               'localhost:5432');
74
Old 2.0 format:          define('OIDPLUS_PGSQL_HOST',       'localhost:5432');
75
Information:             Port is optional
76
 
77
OIDplus::baseConfig()->setValue('PGSQL_USERNAME',           'postgres');
78
Old 2.0 format:          define('OIDPLUS_PGSQL_USERNAME',   'postgres');
79
 
80
OIDplus::baseConfig()->setValue('PGSQL_PASSWORD',           base64_decode('<base64_encoded_password>')); // alternatively as plaintext
81
Old 2.0 format:          define('OIDPLUS_PGSQL_PASSWORD',   '<base64_encoded_password>'); // must be base64 encoded
82
Information:             The base64 encoding "protects" your password from being read if
83
                         someone quickly looks at your display while you have the configuration file opened.
84
 
85
OIDplus::baseConfig()->setValue('PGSQL_DATABASE',           'oidplus');
86
Old 2.0 format:          define('OIDPLUS_PGSQL_DATABASE',   'oidplus');
87
 
264 daniel-mar 88
 
294 daniel-mar 89
OIDplus::baseConfig()->setValue('SQLITE3_FILE',           'userdata/database/oidplus.db');
90
Old 2.0 format:          define('OIDPLUS_SQLITE3_FILE',   'userdata/database/oidplus.db');
264 daniel-mar 91
Attention:               This file must be located in a location that is not world-readable/downloadable!
92
 
93
OIDplus::baseConfig()->setValue('SQLITE3_ENCRYPTION',           '');
94
Old 2.0 format:          define('OIDPLUS_SQLITE3_ENCRYPTION',   '');
95
Note:                    Options
96
 
261 daniel-mar 97
OIDplus::baseConfig()->setValue('TABLENAME_PREFIX',         'oidplus_');
98
Old 2.0 format:          define('OIDPLUS_TABLENAME_PREFIX', 'oidplus_');
99
 
100
OIDplus::baseConfig()->setValue('SERVER_SECRET',            'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
101
Old 2.0 format:          define('OIDPLUS_SESSION_SECRET',   'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
102
Information:             It is very very important that you choose a long sequence of
103
                         random characters. OIDplus uses this secret for various
104
                         security related purposes. If someone accidently received this secret,
105
                         please change the sequence.
106
 
107
OIDplus::baseConfig()->setValue('RECAPTCHA_ENABLED',        true);
108
Old 2.0 format:          define('RECAPTCHA_ENABLED',        0);
109
 
110
OIDplus::baseConfig()->setValue('RECAPTCHA_PUBLIC',         '');
111
Old 2.0 format:          define('RECAPTCHA_PUBLIC',         '');
112
 
113
OIDplus::baseConfig()->setValue('RECAPTCHA_PRIVATE',        '');
114
Old 2.0 format:          define('RECAPTCHA_PRIVATE',        '');
115
 
116
OIDplus::baseConfig()->setValue('ENFORCE_SSL',              2);
117
Old 2.0 format:          define('OIDPLUS_ENFORCE_SSL',      2);
118
Information:             Values 0 (off), 1 (on), 2 (auto detect)
119
 
120
 
121
----------------------
374 daniel-mar 122
(2) SYSTEM LIMITATIONS (defined and documented in includes/oidplus_limits.inc.php , can be overwritten by config.inc.php)
261 daniel-mar 123
----------------------
124
 
125
OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_DEPTH',  30);
126
Old 2.0 format:          define('OIDPLUS_MAX_OID_DEPTH', 30);
374 daniel-mar 127
Information:             Please read the documentation in the file includes/oidplus_limits.inc.php
261 daniel-mar 128
 
129
OIDplus::baseConfig()->setValue('LIMITS_MAX_ID_LENGTH',     255);
130
Old 2.0 format:          define('OIDPLUS_MAX_OID_ARC_SIZE', 255);
374 daniel-mar 131
Information:             Please read the documentation in the file includes/oidplus_limits.inc.php
261 daniel-mar 132
 
133
OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_ARC_SIZE',  50);
134
Old 2.0 format:          define('OIDPLUS_MAX_OID_ARC_SIZE', 50);
374 daniel-mar 135
Information:             Please read the documentation in the file includes/oidplus_limits.inc.php
261 daniel-mar 136
 
137
OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_ASN1_ID_LEN',  255);
138
Old 2.0 format:          define('OIDPLUS_MAX_OID_ASN1_ID_LEN', 255);
374 daniel-mar 139
Information:             Please read the documentation in the file includes/oidplus_limits.inc.php
261 daniel-mar 140
 
141
OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_UNICODE_LABEL_LEN',  255);
142
Old 2.0 format:          define('OIDPLUS_MAX_OID_UNICODE_LABEL_LEN', 255);
374 daniel-mar 143
Information:             Please read the documentation in the file includes/oidplus_limits.inc.php
261 daniel-mar 144
 
145
 
146
-----------------------------------------
147
(3) "HIDDEN"/UNDOCUMENTED CONFIG SETTINGS
148
-----------------------------------------
149
 
150
OIDplus::baseConfig()->setValue('OIDINFO_API_URL', '<url>');
151
Old 2.0 format:          define('OIDINFO_API_URL', '<url>');
152
Information:             Currently only internal use for development utilities (dev/).
502 daniel-mar 153
                         The API to oid-info.com is currently not public.
261 daniel-mar 154
 
155
OIDplus::baseConfig()->setValue('REGISTRATION_HIDE_SYSTEM', true);
156
Old 2.0 format:          define('REGISTRATION_HIDE_SYSTEM', true);
157
Information:             Set this if you have a clone of a productive system and you want
158
                         to avoid that the clone registers at the ViaThinkSoft directory
159
                         (which would overwrite the URL of the productive system and reveal
160
                         the URL of your testing system)
161
 
162
OIDplus::baseConfig()->setValue('MYSQL_FORCE_MYSQLND_SUPPLEMENT',         false);
163
Old 2.0 format:          define('OIDPLUS_MYSQL_FORCE_MYSQLND_SUPPLEMENT', false);
164
Information:             The MySQLi plugin contains a supplement code to handle
165
                         prepared statements on servers which do not have the MySQLnd extension
166
                         installed. Set this flag to force the supplement to be used,
167
                         even if MySQLnd is available. (For testing purposes only)
168
 
169
OIDplus::baseConfig()->setValue('QUERY_LOGFILE',          '');
170
Old 2.0 format:          define('OIDPLUS_MYSQL_QUERYLOG', false);
171
Information:             Set this setting to a filename where all queries including timestamps would be written.
172
                         This is used for performance analysis.
173
                         Please choose a directory that cannot be accessed by world-wide.
174
 
175
OIDplus::baseConfig()->setValue('SESSION_LIFETIME', 30*60);
176
Old 2.0 format:          define('SESSION_LIFETIME', 30*60);
177
Information:             Session lifetime in seconds.
178
 
179
OIDplus::baseConfig()->setValue('OBJECT_CACHING',         true);
180
Old 2.0 format:          define('OIDPLUS_OBJECT_CACHING', true);
181
 
182
OIDplus::baseConfig()->setValue('FORCE_DBMS_SLANG', '');
183
Old 2.0 format:          define('DBMS_SLANG',       '');
264 daniel-mar 184
Information:             Currently valid values: mysql, mssql, pgsql, sqlite
261 daniel-mar 185
 
502 daniel-mar 186
OIDplus::baseConfig()->setValue('PREPARED_STATEMENTS_EMULATION', 'auto');
187
Old 2.0 format:          define('PREPARED_STATEMENTS_EMULATION', 'auto');
188
Information:             Currently only for ODBC database plugin.
189
                         'auto' = Auto detect if prepared statements should be emulated
190
                         'on' = Always emulate prepared statements
191
                         'off' = Never emulate prepared statements
192
 
261 daniel-mar 193
OIDplus::baseConfig()->setValue('MINIFY_CSS', true);
194
Old 2.0 format:          define('DO_MINIFY',  true);
417 daniel-mar 195
                         This enables the compression of CSS definitions.
196
                         Compressed approx:   220 KB
197
                         Uncompressed approx: 224 KB
261 daniel-mar 198
 
199
OIDplus::baseConfig()->setValue('MINIFY_JS',  true);
200
Old 2.0 format:          (Not available)
417 daniel-mar 201
                         This enables the compression of JavaScript code.
202
                         Please only disable this, if you want to debug
203
                         the code! You should not disable it on a productive
204
                         system, because otherwise the JavaScript code
205
                         would be several Megabytes large.
206
                         Compressed approx:  1133 KB
207
                         Unompressed approx: 2761 KB
261 daniel-mar 208
 
297 daniel-mar 209
OIDplus::baseConfig()->setValue('DISABLE_PLUGIN_...', true);
210
Old 2.0 format:          define('OIDPLUS_DISABLE_PLUGIN_...', true);
211
Information:             This gives you the possibility to disable a plugin without
212
                         requiring it to be removed from the file system.
213
                         (Removing a plugin from the file system can result in various
214
                         problems, e.g. they can be re-added during a SVN/software update.)
215
                         Replace "..." with the main PHP class of the plugin you want to disable
216
                         Example:
217
                         "DISABLE_PLUGIN_OIDplusLoggerPluginUserdataLogfile"
218
                         disables the plugin "logger/300_userdata_logfile".
316 daniel-mar 219
 
220
OIDplus::baseConfig()->setValue('DISABLE_AJAX_TRANSACTIONS', false);
221
Old 2.0 format:          define('OIDPLUS_DISABLE_AJAX_TRANSACTIONS', false);
222
                         This will disable the usage of database transactions in ajax.php
223
                         Do only use this if you have severe problems with the system running.
224
                         It might result in inconsistent data e.g. if you update an OID
225
                         and an error occurs in the middle of that process.
326 daniel-mar 226
 
227
OIDplus::baseConfig()->setValue('EXPLICIT_ABSOLUTE_SYSTEM_URL', '');
228
Old 2.0 format:          define('OIDPLUS_EXPLICIT_ABSOLUTE_SYSTEM_URL', '');
229
                         This setting can override the absolute system URL, which is used at CLI WHOIS
230
                         and possibly other modules. It has no effect on relative URLs.
231
                         If this setting is not set, the last known absolute URL
232
                         will be remembered and used when a CLI call is made.
430 daniel-mar 233
 
456 daniel-mar 234
OIDplus::baseConfig()->setValue('DEBUG', false);
235
Old 2.0 format:          (Not available)
236
                         Enables some special checks for plugins (e.g. a self-test for auth plugins).
237
                         It is highly recommended that you enable DEBUG if you are developing
238
                         plugins!
470 daniel-mar 239
                         It is recommended to disable this switch in productive systems,
240
                         because the self-tests decrease the performance.
241
                         However, after installing a new plugin, you might want to enable
242
                         it for a few minutes, to make sure the plugin is working correctly.
430 daniel-mar 243
 
557 daniel-mar 244
OIDplus::baseConfig()->setValue('COOKIE_SAMESITE_POLICY', 'Strict');
245
Old 2.0 format:          (Not available)
246
                         Defined which "SameSite" policy should be used for the cookies OIDplus uses.
247
                         Can be "None", "Lax" or "Strict".
248
                         "Strict" is the most secure setting.
249
                         "Lax" allows that people stay logged in if they follow a link pointing
250
                         to your OIDplus installation.
251
                         "None" is not recommended and is deprecated by modern web browsers.
252
                         However, OIDplus itself provides an Anti-CSRF mechanism, so you should be
253
                         still safe.
456 daniel-mar 254
 
617 daniel-mar 255
OIDplus::baseConfig()->getValue('RA_PASSWORD_PEPPER','');
256
Old 2.0 format:          (Not available)
257
                         The pepper is stored inside the base configuration file
258
                         It prevents that an attacker with SQL write rights can
259
                         create accounts.
260
                         ATTENTION!!! If a pepper is used, then the
261
                         hashes are bound to that pepper. If you change the pepper,
262
                         then ALL passwords of RAs become INVALID!
557 daniel-mar 263
 
617 daniel-mar 264
 
430 daniel-mar 265
----------------------------------------------------
266
(4) LDAP FIELDS (see document ldap_installation.txt)
267
----------------------------------------------------
268
 
620 daniel-mar 269
OIDplus::baseConfig()->setValue('LDAP_ENABLED',                true);
270
                         Set to true if you want to enable that users can log-in using LDAP / ActiveDirectory.
432 daniel-mar 271
 
625 daniel-mar 272
OIDplus::baseConfig()->setValue('LDAP_NUM_DOMAINS',            1);
273
                         Contains the number of domains/servers which are used.
274
                         For 2nd, 3rd, 4th, ... domain use the fields LDAP_xxx__2, LDAP_xxx__3, ...
275
                         e.g.   LDAP_SERVER__2
276
                                LDAP_PORT__2
277
                                LDAP_BASE_DN__2
278
                                ...
279
 
620 daniel-mar 280
OIDplus::baseConfig()->setValue('LDAP_SERVER',                 'ldap://server1.contoso.local');
281
                         The LDAP server of your company.
432 daniel-mar 282
 
620 daniel-mar 283
OIDplus::baseConfig()->setValue('LDAP_PORT',                   389);
284
                         The port of the LDAP server
285
 
286
OIDplus::baseConfig()->setValue('LDAP_BASE_DN',                'DC=CONTOSO,DC=local');
287
                         The base Distinguished Name (DN) of your directory.
288
 
625 daniel-mar 289
OIDplus::baseConfig()->setValue('LDAP_UPN_SUFFIX',             '@contoso.local');
290
                         The UPN suffix of this domain.
291
 
292
OIDplus::baseConfig()->setValue('LDAP_AUTHENTICATE_UPN',       true);
620 daniel-mar 293
                         In the login mask, the users will log in using the UPN ("principal name") e.g. username@contoso.local,
294
                         and in OIDplus, a RA account with an email equal to the UPN will be created.
295
 
296
OIDplus::baseConfig()->setValue('LDAP_AUTHENTICATE_EMAIL',     false);
297
                         In the login mask, the users will log in using the UPN ("principal name") e.g. username@contoso.local,
298
                         and in OIDplus, a RA account with an email equal to the "E-Mail-Address" field of the user in the directory will be created.
299
                         Note: If you did not set an email address to the user in the LDAP/ActiveDirectory, then the login will not be possible,
300
                         except if LDAP_AUTHENTICATE_UPN is additionally enabled.
301
                         Attention: Depending on your domain configuration, users might be able to change their own data,
302
                         e.g. email address. If this is the case, you must not enable this setting, otherwise,
303
                         users could authenticate with any address!
304
 
623 daniel-mar 305
OIDplus::baseConfig()->setValue('LDAP_ADMIN_GROUP',            '');
306
                         If set to an empty string, the OIDplus administrator account cannot be accessed using LDAP authentication.
307
                         Otherwise, the user will be authenticated as administrator, if the LDAP user is a
624 daniel-mar 308
                         member of the group specified in this setting.
623 daniel-mar 309
                         Example values: CN=Administrators,CN=Builtin,DC=CONTOSO,DC=local
310
                                         makes every domain administrator also an OIDplus administrator
311
                                         CN=OIDplus Administrators,CN=Users,DC=CONTOSO,DC=local
312
                                         makes every user of the group (OIDplus Administrators) to OIDplus administrators
313
 
314
OIDplus::baseConfig()->setValue('LDAP_RA_GROUP',               '');
315
                         If set to an empty string, every LDAP user can authenticate as RA, depending
316
                         on whether LDAP_AUTHENTICATE_UPN and/or LDAP_AUTHENTICATE_EMAIL is set.
624 daniel-mar 317
                         Otherwise, the LDAP users must be a member of the group specified in this setting.
620 daniel-mar 318
 
319
 
432 daniel-mar 320
----------------------------------------------------------------------
321
(5) GOOGLE OAUTH2 FIELDS (see document google_oauth2_installation.txt)
322
----------------------------------------------------------------------
323
 
324
OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_ENABLED',       true);
325
OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_CLIENT_ID',     '..............apps.googleusercontent.com');
326
OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_CLIENT_SECRET', '.............');
436 daniel-mar 327
 
328
 
329
-------------------------------------------------------------------------
330
(6) FACEBOOK OAUTH2 FIELDS (see document facebook_oauth2_installation.txt)
331
-------------------------------------------------------------------------
332
 
333
OIDplus::baseConfig()->setValue('FACEBOOK_OAUTH2_ENABLED',       true);
334
OIDplus::baseConfig()->setValue('FACEBOOK_OAUTH2_CLIENT_ID',     '.............'); // Your App ID
335
OIDplus::baseConfig()->setValue('FACEBOOK_OAUTH2_CLIENT_SECRET', '.............'); // Your App Secret
572 daniel-mar 336
 
337
 
338
----------------------------------------------------
339
(7) JWT AUTHENTICATION FIELDS
340
----------------------------------------------------
341
 
342
If a web request contains the field "OIDPLUS_AUTH_JWT" containing a signed JWT token,
343
an automatic one-time login is performed in order to execute commands.
344
This feature is used in the plugins "Automated AJAX calls" for admins and RAs.
345
With these switches you can disable this feature.
346
 
347
OIDplus::baseConfig()->setValue('JWT_ALLOW_AJAX_ADMIN', true);
348
Old 2.0 format:          (Not available)
349
                         Allow JWT tokens that were created using the admin-plugin
350
                         "Automated AJAX calls".
351
 
352
OIDplus::baseConfig()->setValue('JWT_ALLOW_AJAX_USER', true);
353
Old 2.0 format:          (Not available)
354
                         Allow JWT tokens that were created using the RA-plugin
355
                         "Automated AJAX calls".
356
 
357
OIDplus::baseConfig()->setValue('JWT_ALLOW_LOGIN_ADMIN', true);
358
Old 2.0 format:          (Not available)
579 daniel-mar 359
                         Allow "Remember me" logins for the administrator account.
572 daniel-mar 360
 
361
OIDplus::baseConfig()->setValue('JWT_ALLOW_LOGIN_USER', true);
362
Old 2.0 format:          (Not available)
579 daniel-mar 363
                         Allow "Remember me" logins for a RA.
572 daniel-mar 364
 
585 daniel-mar 365
OIDplus::baseConfig()->setValue('JWT_ALLOW_MANUAL', false);
572 daniel-mar 366
Old 2.0 format:          (Not available)
367
                         Allow JWT tokens which were manually created "by hand".
368
                         These can have any content you like, but they must
369
                         contain the claim "oidplus_generator" with value "2".
583 daniel-mar 370
 
371
OIDplus::baseConfig()->setValue('JWT_TTL_LOGIN_USER', 10*365*24*60*60);
372
Old 2.0 format:          (Not available)
373
                         How many seconds will a "remember me" login JWT token be valid?
374
                         (RA login)
375
 
376
OIDplus::baseConfig()->setValue('JWT_TTL_LOGIN_ADMIN', 10*365*24*60*60);
377
Old 2.0 format:          (Not available)
378
                         How many seconds will a "remember me" login JWT token be valid?
379
                         (Administrator login)