Subversion Repositories oidplus

Rev

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