Subversion Repositories oidplus

Rev

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

Rev Author Line No. Line
1207 daniel-mar 1
 
2
Overview of all config.inc.php settings
3
=======================================
4
 
1208 daniel-mar 5
The file **userdata/baseconfig/config.inc.php** contains various settings
1207 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.
9
Other settings are stored in the database (table "config")
10
and can be accessed using the admin login area.
11
 
12
The setup assistant (/setup/) will lead you through
1208 daniel-mar 13
the creation of the most important settings of **config.inc.php**.
1207 daniel-mar 14
 
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
 
20
(1) Config settings provided by the setup assistant
21
---------------------------------------------------
22
 
1209 daniel-mar 23
### CONFIG_VERSION
1208 daniel-mar 24
 
1207 daniel-mar 25
    OIDplus::baseConfig()->setValue('CONFIG_VERSION',           2.1);
26
 
27
Always set to 2.1 in the latest format.
28
 
1209 daniel-mar 29
### ADMIN_PASSWORD
1208 daniel-mar 30
 
1207 daniel-mar 31
    OIDplus::baseConfig()->setValue('ADMIN_PASSWORD',           '<BCrypt hash, or base64 encoded SHA3-512 hash>');
32
 
33
If you want to have multiple valid administrator passwords
34
(e.g. if you want multiple users), then this value can
35
also be an array containing hashes.
36
 
1209 daniel-mar 37
### DATABASE_PLUGIN
1208 daniel-mar 38
 
1207 daniel-mar 39
    OIDplus::baseConfig()->setValue('DATABASE_PLUGIN',          '');
40
 
41
Valid values: see plugins (setup/).
42
 
1209 daniel-mar 43
### OCI_CONN_STR
1208 daniel-mar 44
 
1207 daniel-mar 45
    OIDplus::baseConfig()->setValue('OCI_CONN_STR',             'localhost/orcl');
46
 
1209 daniel-mar 47
### OCI_*
1208 daniel-mar 48
 
1207 daniel-mar 49
Can be a Oracle connection string/TNS or a hostname like.
50
 
51
    OIDplus::baseConfig()->setValue('OCI_USERNAME',             'hr');
52
    OIDplus::baseConfig()->setValue('OCI_PASSWORD',             'oracle');
53
 
54
Used by the Oracle database plugin.
55
 
1209 daniel-mar 56
### ODBC_*
1208 daniel-mar 57
 
1207 daniel-mar 58
    OIDplus::baseConfig()->setValue('ODBC_DSN',                 'DRIVER={SQL Server};SERVER=localhost;DATABASE=oidplus;CHARSET=UTF8');
59
    OIDplus::baseConfig()->setValue('ODBC_USERNAME',            'sa');
60
    OIDplus::baseConfig()->setValue('ODBC_PASSWORD',            base64_decode('<base64_encoded_password>')); // alternatively as plaintext
61
 
62
Used by the ODBC database plugin.
63
 
64
The base64 encoding protects your password from being read if someone
65
"looks over your shoulder" at your display while you have the configuration file opened.
66
(Obviously, it doesn't protect you if they can make a photo or screenshot)
67
 
1209 daniel-mar 68
### PDO_*
1208 daniel-mar 69
 
1207 daniel-mar 70
    OIDplus::baseConfig()->setValue('PDO_DSN',                  'pgsql:host=localhost;dbname=oidplus');
71
    OIDplus::baseConfig()->setValue('PDO_USERNAME',             'postgres');
72
    OIDplus::baseConfig()->setValue('PDO_PASSWORD',             base64_decode('<base64_encoded_password>')); // alternatively as plaintext
73
 
74
Used by the PDO datbase plugin.
75
 
76
The base64 encoding protects your password from being read if someone
77
"looks over your shoulder" at your display while you have the configuration file opened.
78
(Obviously, it doesn't protect you if they can make a photo or screenshot)
79
 
1209 daniel-mar 80
### MYSQL_*
1208 daniel-mar 81
 
1207 daniel-mar 82
    OIDplus::baseConfig()->setValue('MYSQL_HOST',               'localhost:3306');
83
 
84
The hostname to connect to. Port (:3306) is optional.
85
 
86
    OIDplus::baseConfig()->setValue('MYSQL_SOCKET',             '');
87
 
88
In case you connect via MySQL through a socket, use this setting.
89
(It is currently not included in setup/ and needs to be set manually).
90
 
91
    OIDplus::baseConfig()->setValue('MYSQL_USERNAME',           'root');
92
    OIDplus::baseConfig()->setValue('MYSQL_PASSWORD',           base64_decode('<base64_encoded_password>')); // alternatively as plaintext
93
    OIDplus::baseConfig()->setValue('MYSQL_DATABASE',           'oidplus');
94
 
95
Used by the MySQL database plugin.
96
 
97
The base64 encoding protects your password from being read if someone
98
"looks over your shoulder" at your display while you have the configuration file opened.
99
(Obviously, it doesn't protect you if they can make a photo or screenshot)
100
 
1209 daniel-mar 101
### PGSQL_*
1208 daniel-mar 102
 
1207 daniel-mar 103
    OIDplus::baseConfig()->setValue('PGSQL_HOST',               'localhost:5432');
104
    OIDplus::baseConfig()->setValue('PGSQL_SOCKET',             '');
105
    OIDplus::baseConfig()->setValue('PGSQL_USERNAME',           'postgres');
106
    OIDplus::baseConfig()->setValue('PGSQL_PASSWORD',           base64_decode('<base64_encoded_password>')); // alternatively as plaintext
107
    OIDplus::baseConfig()->setValue('PGSQL_DATABASE',           'oidplus');
108
 
109
Used by the PgSQL databse plugin.
110
 
111
The hostname to connect to. Port (:5432) is optional.
112
 
113
In case you connect via PostgreSQL through a socket, use this setting.
114
(It is currently not included in setup/ and needs to be set manually).
115
 
116
The base64 encoding protects your password from being read if someone
117
"looks over your shoulder" at your display while you have the configuration file opened.
118
(Obviously, it doesn't protect you if they can make a photo or screenshot)
119
 
1209 daniel-mar 120
### SQLITE3_*
1208 daniel-mar 121
 
1207 daniel-mar 122
    OIDplus::baseConfig()->setValue('SQLITE3_FILE',             'userdata/database/oidplus.db');
123
    OIDplus::baseConfig()->setValue('SQLITE3_ENCRYPTION',       '');
124
 
125
Attention: This file must be located in a location that is not world-readable/downloadable!
126
 
127
The encryption is optional.
128
 
1209 daniel-mar 129
### TABLENAME_PREFIX
1208 daniel-mar 130
 
1207 daniel-mar 131
    OIDplus::baseConfig()->setValue('TABLENAME_PREFIX',         'oidplus_');
132
 
133
Every table has this prefix, e.g. oidplus_config.
134
 
1209 daniel-mar 135
### SERVER_SECRET
1208 daniel-mar 136
 
1207 daniel-mar 137
    OIDplus::baseConfig()->setValue('SERVER_SECRET',            'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx');
138
 
139
It is very very important that you choose a long sequence of
140
random characters. OIDplus uses this secret for various
141
security related purposes. If someone accidently received this secret,
142
please change the sequence.
143
 
1209 daniel-mar 144
### CAPTCHA_PLUGIN
1208 daniel-mar 145
 
1207 daniel-mar 146
    OIDplus::baseConfig()->setValue('CAPTCHA_PLUGIN',           'None');
147
 
148
Alternative Values (installed plugins)
1209 daniel-mar 149
- `reCAPTCHA`
150
- `hCaptcha`
151
- `ViaThinkSoft Client Challenge`
1207 daniel-mar 152
 
1209 daniel-mar 153
Please note that the value is case-sensitive.
1207 daniel-mar 154
 
1209 daniel-mar 155
### RECAPTCHA_VERSION
156
 
1207 daniel-mar 157
    OIDplus::baseConfig()->setValue('RECAPTCHA_VERSION',        \ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_CHECKBOX);
158
 
159
Possible values:
160
- `\ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_CHECKBOX`
161
- `\ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V2_INVISIBLE`
162
- `\ViaThinkSoft\OIDplus\OIDplusCaptchaPluginRecaptcha::RECAPTCHA_V3`
163
 
1209 daniel-mar 164
### RECAPTCHA_ENABLED
1207 daniel-mar 165
 
166
    OIDplus::baseConfig()->setValue('RECAPTCHA_ENABLED',        true);
167
 
168
Deprecated!
169
- `RECAPTCHA_ENABLED=true`  becomes `CAPTCHA_PLUGIN=reCAPTCHA`
170
- `RECAPTCHA_ENABLED=false` becomes `CAPTCHA_PLUGIN=None`
171
 
1209 daniel-mar 172
### RECAPTCHA_*
1207 daniel-mar 173
 
174
    OIDplus::baseConfig()->setValue('RECAPTCHA_PUBLIC',         '');
175
    OIDplus::baseConfig()->setValue('RECAPTCHA_PRIVATE',        '');
176
 
1209 daniel-mar 177
Only used if `CAPTCHA_PLUGIN=reCAPTCHA`.
1207 daniel-mar 178
 
1209 daniel-mar 179
### HCAPTCHA_*
1208 daniel-mar 180
 
1207 daniel-mar 181
    OIDplus::baseConfig()->setValue('HCAPTCHA_SITEKEY',         '');
182
    OIDplus::baseConfig()->setValue('HCAPTCHA_SECRET',          '');
183
 
184
Only used if `CAPTCHA_PLUGIN=hCaptcha`.
185
 
1209 daniel-mar 186
### VTS_CAPTCHA_*
1208 daniel-mar 187
 
188
    OIDplus::baseConfig()->setValue('VTS_CAPTCHA_COMPLEXITY',   50000);
189
    OIDplus::baseConfig()->setValue('VTS_CAPTCHA_AUTOSOLVE',    true);
190
    OIDplus::baseConfig()->setValue('VTS_CAPTCHA_MAXTIME',      10*60/*10 minutes*/);
191
 
192
Only used if `CAPTCHA_PLUGIN=ViaThinkSoft Client Challenge`.
193
 
1209 daniel-mar 194
### ENFORCE_SSL
1208 daniel-mar 195
 
1207 daniel-mar 196
    OIDplus::baseConfig()->setValue('ENFORCE_SSL',              OIDplus::ENFORCE_SSL_AUTO);
197
 
198
Values are:
199
- `OIDplus::ENFORCE_SSL_NO` (0) = (off)
200
- `OIDplus::ENFORCE_SSL_YES` (1) = (on)
201
- `OIDplus::ENFORCE_SSL_AUTO` (2) = (auto detect SSL)
202
 
203
 
204
(2) System limitations 
205
----------------------
206
 
207
The system limitations are defined and documented in includes/oidplus_limits.inc.php
208
and can be overwritten by config.inc.php.
209
 
1209 daniel-mar 210
### LIMITS_MAX_ID_LENGTH
1208 daniel-mar 211
 
1207 daniel-mar 212
    OIDplus::baseConfig()->setValue('LIMITS_MAX_ID_LENGTH',     255);
213
 
214
Example: OID 2.999.123.456 has a length of 13 characters in dot notation.
215
OIDplus adds the prefix "oid:" in front of every OID,
216
so the overal length of the ID would be 17.
217
 
218
Default value: 255 digits (OIDs 251 digits)
219
 
220
Which value is realistic? In the oid-info.com database (April 2020), the OID with the greatest size is 65 characters (dot notation)
221
 
222
Maximum value: OIDs may only have a size of max 251 characters in dot notation.
223
Reason: The field defintion of *_objects.oid is defined as varchar(255),
224
and the OID will have the prefix 'oid:' (4 bytes).
225
You can increase the limit by changing the field definition in the database.
226
 
1209 daniel-mar 227
### LIMITS_MAX_OID_ASN1_ID_LEN
1208 daniel-mar 228
 
1207 daniel-mar 229
    OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_ASN1_ID_LEN',  255);
230
 
231
Default value: 255 characters
232
 
233
Maximum value: 255, as defined in the database fields *_asn1id.name
234
You can change the database field definition if you really need more.
235
 
1209 daniel-mar 236
### LIMITS_MAX_OID_UNICODE_LABEL_LEN
1208 daniel-mar 237
 
1207 daniel-mar 238
    OIDplus::baseConfig()->setValue('LIMITS_MAX_OID_UNICODE_LABEL_LEN',  255);
239
 
240
Default value: 255 bytes (UTF-8 encoded!)
241
 
242
Maximum value: 255, as defined in the database fields *_iri.name
243
You can change the database field definition if you really need more.
244
 
245
 
246
(3) "Hidden"/undocumented config settings
247
-----------------------------------------
248
 
1209 daniel-mar 249
### OFFLINE_MODE
1208 daniel-mar 250
 
1207 daniel-mar 251
    OIDplus::baseConfig()->setValue('OFFLINE_MODE', false);
252
 
253
If set to true, OIDplus will not contact other servers. No system registration,
254
no hCaptcha, no reCAPTCHA, no system updates, etc.
255
 
1209 daniel-mar 256
### OIDINFO_API_URL
1208 daniel-mar 257
 
1207 daniel-mar 258
    OIDplus::baseConfig()->setValue('OIDINFO_API_URL', '<url>');
259
 
260
Currently only internal use for development utilities (dev/).
261
The API to oid-info.com is currently not public.
262
 
1209 daniel-mar 263
### REGISTRATION_HIDE_SYSTEM
1208 daniel-mar 264
 
1207 daniel-mar 265
    OIDplus::baseConfig()->setValue('REGISTRATION_HIDE_SYSTEM', true);
266
 
267
Set this if you have a clone of a productive system and you want
268
to avoid that the clone registers at the ViaThinkSoft directory
269
(which would overwrite the URL of the productive system and reveal
270
the URL of your testing system)
271
 
1209 daniel-mar 272
### MYSQL_FORCE_MYSQLND_SUPPLEMENT
1208 daniel-mar 273
 
1207 daniel-mar 274
    OIDplus::baseConfig()->setValue('MYSQL_FORCE_MYSQLND_SUPPLEMENT',         false);
275
 
276
The MySQLi plugin contains a supplement code to handle
277
prepared statements on servers which do not have the MySQLnd extension
278
installed. Set this flag to force the supplement to be used,
279
even if MySQLnd is available. (For testing purposes only)
280
 
1209 daniel-mar 281
### QUERY_LOGFILE
1208 daniel-mar 282
 
1207 daniel-mar 283
    OIDplus::baseConfig()->setValue('QUERY_LOGFILE',          '');
284
 
285
Set this setting to a filename where all queries including timestamps would be written.
286
This is used for performance analysis.
287
Please choose a directory that cannot be accessed by world-wide.
288
 
1209 daniel-mar 289
### SESSION_LIFETIME
1208 daniel-mar 290
 
1207 daniel-mar 291
    OIDplus::baseConfig()->setValue('SESSION_LIFETIME', 30*60);
292
 
293
Session lifetime in seconds.
294
 
1209 daniel-mar 295
### OBJECT_CACHING
1208 daniel-mar 296
 
1207 daniel-mar 297
    OIDplus::baseConfig()->setValue('OBJECT_CACHING',         true);
298
 
299
Object caching reads all objects in the memory. This increases performance
300
performance but also increases memory usage on large databases.
301
 
1209 daniel-mar 302
### FORCE_DBMS_SLANG
1208 daniel-mar 303
 
1207 daniel-mar 304
    OIDplus::baseConfig()->setValue('FORCE_DBMS_SLANG', '');
305
 
306
Currently valid values:
307
- `access`
308
- `mssql`
309
- `mysql`
310
- `oracle`
311
- `pgsql`
312
- `sqlite`
313
 
1209 daniel-mar 314
### PREPARED_STATEMENTS_EMULATION
1207 daniel-mar 315
 
316
    OIDplus::baseConfig()->setValue('PREPARED_STATEMENTS_EMULATION', 'auto');
317
 
318
Currently only for ODBC database plugin.
1209 daniel-mar 319
- `auto` = Auto detect if prepared statements should be emulated
320
- `on` = Always emulate prepared statements
321
- `off` = Never emulate prepared statements
1207 daniel-mar 322
 
1209 daniel-mar 323
### MINIFY_CSS
1207 daniel-mar 324
 
325
    OIDplus::baseConfig()->setValue('MINIFY_CSS', true);
326
 
327
This enables the compression of CSS definitions. 
328
- Compressed approx:   220 KB
329
- Uncompressed approx: 224 KB
330
 
1209 daniel-mar 331
### MINIFY_JS
1207 daniel-mar 332
 
333
    OIDplus::baseConfig()->setValue('MINIFY_JS',  true);
334
 
335
This enables the compression of JavaScript code.
336
Please only disable this, if you want to debug
337
the code! You should not disable it on a productive
338
system, because otherwise the JavaScript code
339
would be several Megabytes large. 
340
- Compressed approx:  1133 KB
341
- Unompressed approx: 2761 KB
342
 
1209 daniel-mar 343
### DISABLE_PLUGIN_*
1207 daniel-mar 344
 
345
    OIDplus::baseConfig()->setValue('DISABLE_PLUGIN_...', true);
346
 
347
This gives you the possibility to disable a plugin without
348
requiring it to be removed from the file system.
349
(Removing a plugin from the file system can result in various
350
problems, e.g. they can be re-added during a SVN/software update.)
351
Replace "..." with the main PHP class of the plugin you want to disable.
352
The namespace must be included.
353
Example:
354
`"DISABLE_PLUGIN_ViaThinkSoft\OIDplus\OIDplusLoggerPluginUserdataLogfile"`
355
disables the plugin "logger/300_userdata_logfile".
356
 
1209 daniel-mar 357
### DISABLE_AJAX_TRANSACTIONS
1208 daniel-mar 358
 
1207 daniel-mar 359
    OIDplus::baseConfig()->setValue('DISABLE_AJAX_TRANSACTIONS', false);
360
 
361
This will disable the usage of database transactions in ajax.php
362
Do only use this if you have severe problems with the system running.
363
It might result in inconsistent data e.g. if you update an OID
364
and an error occurs in the middle of that process.
365
 
1209 daniel-mar 366
### CANONICAL_SYSTEM_URL
1208 daniel-mar 367
 
1207 daniel-mar 368
    OIDplus::baseConfig()->setValue('CANONICAL_SYSTEM_URL', '');
369
 
370
Setting this value to a system URL will override the absolute system URL detection.
371
It has the following effects:
372
1. The "canonical" metatag will use this explicit system URL
373
instead of the one the PHP script is detecting.
374
(This is important to avoid duplicate content at search indexes)
375
2. CLI WHOIS and other CLI (Command-line-interface) tools
376
will use this address when they need to output an URL.
377
Otherwise, the CLI tools would need to use the last known
378
URL that was detected when a webpage visitor has last visited the
379
page.
380
3. While most resources (images, CSS files, scripts, etc.) are loaded
381
via relative URLs, sometimes an absolute URL is required
382
(e.g., if an email is sent with an activation link).
383
The explicit absolute system URL will then be used rather
384
than the automatically detected one.
385
Note that setting an absolute system URL can be very useful if
386
OIDplus runs on a system (which detects itself as "X"),
387
while the canonical URL "Y" is a reverse-proxy.
388
 
1209 daniel-mar 389
### DEBUG
1207 daniel-mar 390
 
391
    OIDplus::baseConfig()->setValue('DEBUG', false);
392
 
393
Enables some special checks for plugins (e.g. a self-test for auth plugins).
394
It is highly recommended that you enable DEBUG if you are developing
395
plugins!
396
It is recommended to disable this switch in productive systems,
397
because the self-tests decrease the performance.
398
However, after installing a new plugin, you might want to enable
399
it for a few minutes, to make sure the plugin is working correctly.
400
 
1209 daniel-mar 401
### COOKIE_SAMESITE_POLICY
1208 daniel-mar 402
 
1207 daniel-mar 403
    OIDplus::baseConfig()->setValue('COOKIE_SAMESITE_POLICY', 'Strict');
404
 
405
Defined which "SameSite" policy should be used for the cookies OIDplus uses.
406
Can be "None", "Lax" or "Strict".
407
"Strict" is the most secure setting.
408
"Lax" allows that people stay logged in if they follow a link pointing
409
to your OIDplus installation.
410
"None" is not recommended and is deprecated by modern web browsers.
411
However, OIDplus itself provides an Anti-CSRF mechanism, so you should be
412
still safe.
413
 
1209 daniel-mar 414
### COOKIE_DOMAIN
1208 daniel-mar 415
 
1207 daniel-mar 416
    OIDplus::baseConfig()->setValue('COOKIE_DOMAIN', '');
417
 
418
Can be used to increase security by setting an explicit domain-name in the cookies.
419
Set to '' (empty string) to allow all (sub)domains.
420
Set to '(auto)' to automatically detect the domain based on the absolute canonical path.
421
 
1209 daniel-mar 422
### COOKIE_PATH
1208 daniel-mar 423
 
1207 daniel-mar 424
    OIDplus::baseConfig()->setValue('COOKIE_PATH', '/');
425
 
426
Can be used to increase security by setting an explicit pathname in the cookies.
427
Set to '/' to allow all paths.
428
Set to '(auto)' to automatically detect the path based on the absolute canonical path.
429
Note: If supported, you can use Apache's "ProxyPassReverseCookiePath" to translate
430
the cookie path in a reverse-proxy setting.
431
 
1209 daniel-mar 432
### RA_PASSWORD_PEPPER
1208 daniel-mar 433
 
1207 daniel-mar 434
    OIDplus::baseConfig()->getValue('RA_PASSWORD_PEPPER', '');
435
 
436
The pepper is stored inside the base configuration file
437
It prevents that an attacker with SQL write rights can
438
create accounts.
1208 daniel-mar 439
 
1207 daniel-mar 440
ATTENTION!!! If a pepper is used, then the
441
hashes are bound to that pepper. If you change the pepper,
442
then ALL passwords of RAs become INVALID!
443
 
1209 daniel-mar 444
### RA_PASSWORD_PEPPER_ALGO
1208 daniel-mar 445
 
1207 daniel-mar 446
    OIDplus::baseConfig()->getValue('RA_PASSWORD_PEPPER_ALGO', 'sha512');
447
 
448
The pepper is stored inside the base configuration file
449
It prevents that an attacker with SQL write rights can
450
create accounts.
451
ATTENTION!!! If a pepper is used, then the
452
hashes are bound to that pepper. If you change the pepper,
453
then ALL passwords of RAs become INVALID!
454
 
1209 daniel-mar 455
### DEFAULT_LANGUAGE
1208 daniel-mar 456
 
1207 daniel-mar 457
    OIDplus::baseConfig()->setValue('DEFAULT_LANGUAGE', 'enus');
458
 
459
Default language of the system. This is the language
460
a new visitor will see if no "lang=" parameter is used
461
and no cookie is set.
462
Must be a valid language in the plugins directory.
463
Currently available:
464
- `enus` = English USA (default)
465
- `dede` = German Germany
466
 
467
(4) LDAP settings
468
-----------------
469
 
470
(see also document ldap_installation.md)
471
 
1209 daniel-mar 472
### LDAP_ENABLED
1208 daniel-mar 473
 
1207 daniel-mar 474
    OIDplus::baseConfig()->setValue('LDAP_ENABLED',                true);
475
 
476
Set to true if you want to enable that users can log-in using LDAP / ActiveDirectory.
477
 
1209 daniel-mar 478
### LDAP_NUM_DOMAINS
1208 daniel-mar 479
 
1207 daniel-mar 480
    OIDplus::baseConfig()->setValue('LDAP_NUM_DOMAINS',            1);
481
 
482
Contains the number of domains/servers which are used.
483
For 2nd, 3rd, 4th, ... domain use the fields LDAP_xxx__2, LDAP_xxx__3, ...
484
e.g.   LDAP_SERVER__2
485
LDAP_PORT__2
486
LDAP_BASE_DN__2
487
...
488
 
1209 daniel-mar 489
### LDAP_SERVER
1208 daniel-mar 490
 
1207 daniel-mar 491
    OIDplus::baseConfig()->setValue('LDAP_SERVER',                 'ldap://server1.contoso.local');
492
 
493
The LDAP server of your company.
494
 
1209 daniel-mar 495
### LDAP_PORT
1208 daniel-mar 496
 
1207 daniel-mar 497
    OIDplus::baseConfig()->setValue('LDAP_PORT',                   389);
498
 
499
The port of the LDAP server.
500
 
1209 daniel-mar 501
### LDAP_BASE_DN
1208 daniel-mar 502
 
1207 daniel-mar 503
    OIDplus::baseConfig()->setValue('LDAP_BASE_DN',                'DC=CONTOSO,DC=local');
504
 
505
The base Distinguished Name (DN) of your directory.
506
 
1209 daniel-mar 507
### LDAP_UPN_SUFFIX
1208 daniel-mar 508
 
1207 daniel-mar 509
    OIDplus::baseConfig()->setValue('LDAP_UPN_SUFFIX',             '@contoso.local');
510
 
511
The UPN suffix of this domain.
512
 
1209 daniel-mar 513
### LDAP_AUTHENTICATE_UPN
1208 daniel-mar 514
 
1207 daniel-mar 515
    OIDplus::baseConfig()->setValue('LDAP_AUTHENTICATE_UPN',       true);
516
 
517
In the login mask, the users will log in using the UPN ("principal name") e.g. username@contoso.local,
518
and in OIDplus, a RA account with an email equal to the UPN will be created.
519
 
1209 daniel-mar 520
### LDAP_AUTHENTICATE_EMAIL
1208 daniel-mar 521
 
1207 daniel-mar 522
    OIDplus::baseConfig()->setValue('LDAP_AUTHENTICATE_EMAIL',     false);
523
 
524
In the login mask, the users will log in using the UPN ("principal name") e.g. username@contoso.local,
525
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.
526
Note: If you did not set an email address to the user in the LDAP/ActiveDirectory, then the login will not be possible,
527
except if LDAP_AUTHENTICATE_UPN is additionally enabled.
528
Attention: Depending on your domain configuration, users might be able to change their own data,
529
e.g. email address. If this is the case, you must not enable this setting, otherwise,
530
users could authenticate with any address!
531
 
1209 daniel-mar 532
### LDAP_ADMIN_GROUP
1208 daniel-mar 533
 
1207 daniel-mar 534
    OIDplus::baseConfig()->setValue('LDAP_ADMIN_GROUP',            '');
535
 
536
If set to an empty string, the OIDplus administrator account cannot be accessed using LDAP authentication.
537
Otherwise, the user will be authenticated as administrator, if the LDAP user is a
538
member of the group specified in this setting.
539
Example values:
540
- `CN=Administrators,CN=Builtin,DC=CONTOSO,DC=local`
541
makes every domain administrator also an OIDplus administrator
542
- `CN=OIDplus Administrators,CN=Users,DC=CONTOSO,DC=local`
543
makes every user of the group (OIDplus Administrators) to OIDplus administrators
544
 
1209 daniel-mar 545
### LDAP_RA_GROUP
1207 daniel-mar 546
 
547
    OIDplus::baseConfig()->setValue('LDAP_RA_GROUP',               '');
548
 
549
If set to an empty string, every LDAP user can authenticate as RA, depending
550
on whether `LDAP_AUTHENTICATE_UPN` and/or `LDAP_AUTHENTICATE_EMAIL` is set.
551
Otherwise, the LDAP users must be a member of the group specified in this setting.
552
 
553
 
554
(5) Google OAuth2 settings 
555
--------------------------
556
 
557
(see also document google_oauth2_installation.md)
558
 
1209 daniel-mar 559
### GOOGLE_OAUTH2_*
1208 daniel-mar 560
 
1207 daniel-mar 561
    OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_ENABLED',       true);
562
    OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_CLIENT_ID',     '..............apps.googleusercontent.com');
563
    OIDplus::baseConfig()->setValue('GOOGLE_OAUTH2_CLIENT_SECRET', '.............');
564
 
565
 
566
(6) Facebook OAuth2 settings
567
----------------------------
568
 
569
(see also document facebook_oauth2_installation.md)
570
 
1209 daniel-mar 571
### FACEBOOK_OAUTH2_*
1208 daniel-mar 572
 
1207 daniel-mar 573
    OIDplus::baseConfig()->setValue('FACEBOOK_OAUTH2_ENABLED',       true);
574
    OIDplus::baseConfig()->setValue('FACEBOOK_OAUTH2_CLIENT_ID',     '.............'); // Your App ID
575
    OIDplus::baseConfig()->setValue('FACEBOOK_OAUTH2_CLIENT_SECRET', '.............'); // Your App Secret
576
 
577
 
578
(7) JWT authentication settings
579
-------------------------------
580
 
581
If a web request contains the field "OIDPLUS_AUTH_JWT" containing a signed JWT token,
582
an automatic one-time login is performed in order to execute commands.
583
This feature is used in the plugins "Automated AJAX calls" for admins and RAs.
584
With these switches you can disable this feature.
585
 
1209 daniel-mar 586
### JWT_ALLOW_AJAX_ADMIN
1208 daniel-mar 587
 
1207 daniel-mar 588
    OIDplus::baseConfig()->setValue('JWT_ALLOW_AJAX_ADMIN', true);
589
 
590
Allow JWT tokens that were created using the admin-plugin
591
"Automated AJAX calls".
592
 
1209 daniel-mar 593
### JWT_ALLOW_AJAX_USER
1208 daniel-mar 594
 
1207 daniel-mar 595
    OIDplus::baseConfig()->setValue('JWT_ALLOW_AJAX_USER', true);
596
 
597
Allow JWT tokens that were created using the RA-plugin
598
"Automated AJAX calls".
1208 daniel-mar 599
 
1209 daniel-mar 600
### JWT_ALLOW_LOGIN_ADMIN
1208 daniel-mar 601
 
1207 daniel-mar 602
    OIDplus::baseConfig()->setValue('JWT_ALLOW_LOGIN_ADMIN', true);
603
 
604
Allow "Remember me" logins for the administrator account.
1208 daniel-mar 605
 
1209 daniel-mar 606
### JWT_ALLOW_LOGIN_USER
1207 daniel-mar 607
 
608
    OIDplus::baseConfig()->setValue('JWT_ALLOW_LOGIN_USER', true);
609
 
610
Allow "Remember me" logins for a RA.
1208 daniel-mar 611
 
1209 daniel-mar 612
### JWT_ALLOW_MANUAL
1208 daniel-mar 613
 
1207 daniel-mar 614
    OIDplus::baseConfig()->setValue('JWT_ALLOW_MANUAL', false);
615
 
616
Allow JWT tokens which were manually created "by hand".
617
These can have any content you like, but they must
618
contain the claim "oidplus_generator" with value "2".
1208 daniel-mar 619
 
1209 daniel-mar 620
### JWT_TTL_LOGIN_USER
1207 daniel-mar 621
 
622
    OIDplus::baseConfig()->setValue('JWT_TTL_LOGIN_USER', 10*365*24*60*60);
623
 
624
How many seconds will a "remember me" login JWT token be valid?
625
(RA login)
1208 daniel-mar 626
 
1209 daniel-mar 627
### JWT_TTL_LOGIN_ADMIN
1208 daniel-mar 628
 
1207 daniel-mar 629
    OIDplus::baseConfig()->setValue('JWT_TTL_LOGIN_ADMIN', 10*365*24*60*60);
630
 
631
How many seconds will a "remember me" login JWT token be valid?
632
(Administrator login)
633
 
634
 
635
(8) Third-party plugins
636
-----------------------
637
 
1209 daniel-mar 638
### FrdlWeb RDAP plugin
1208 daniel-mar 639
 
1207 daniel-mar 640
    OIDplus::baseConfig()->setValue('RDAP_CACHE_ENABLED',   false );
641
    OIDplus::baseConfig()->setValue('RDAP_CACHE_DIRECTORY', OIDplus::localpath().'userdata/cache/' );
642
    OIDplus::baseConfig()->setValue('RDAP_BASE_URI',        OIDplus::webpath() );
643
    OIDplus::baseConfig()->setValue('RDAP_CACHE_EXPIRES',   60 * 3 );