blib/lib/Lemonldap/NG/Manager/Build/Attributes.pm

filter: Statementstmt 20.2% 31 / 153 Branchbran 0.0% 0 / 38 Conditioncond 0.0% 0 / 18 MC/DCmcdc 0.0% 0 / 12 Subroutinesub 7.4% 7 / 94 Podpod 0.0% 0 / 3 totaltotal 11.9% 38 / 318 CC 29 SCAR 22.0
CC
29
Cov
15%
perlExpr
42.0
__ANON__
42.0
__ANON__
42.0
CRAP 9.1
« blib/lib/Lemonldap/NG/Manager/Api/Menu/App.pm ↑ Summary blib/lib/Lemonldap/NG/Manager/Api/Misc.pm »
1 # This file contains the description of all configuration parameters
2 # It may be included only by batch files, never in portal or handler chain
3 # for performances reasons
4  
5 # DON'T FORGET TO RUN "make json" AFTER EACH CHANGE
6  
7 package Lemonldap::NG::Manager::Build::Attributes;
8  
9 32 our $VERSION = '2.23.3';
10 32 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 32 ▶use Regexp::Common qw/URI/;
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 0 ▶sub perlExpr {
Subroutine perlExpr: not called CC=6 SCAR=37.4
Pod undocumented
14 0 my ( $val, $conf ) = @_;
15 0 my $cpt = new Safe;
16 0 $cpt->share_from( 'MIME::Base64', ['&encode_base64'] );
17 0 $cpt->share_from(
18 'Lemonldap::NG::Handler::Main::Jail',
19 [
20 '&encrypt', '&token',
21 @Lemonldap::NG::Handler::Main::Jail::builtCustomFunctions
22 ]
23 );
24 0 $cpt->share_from( 'Lemonldap::NG::Common::Safelib',
25 $Lemonldap::NG::Common::Safelib::functions );
26 0 $cpt->reval("local *_;$val");
27 my $err = join( '',
28 0 ▶ grep { $_ =~ /(?:Undefined subroutine|Devel::StackTrace)/ ? () : $_ }
Branch: 1 branch
BranchTrueFalseTotal
$_ =~ /(?:Undefined subroutine|Devel::StackTrace)/ ? : 0 0 0
29 split( /\n/, $@ ) );
30 return ( -1, "__badExpression__: $err" )
31 0 ▶ if ( $err && $conf->{useSafeJail} );
Branch: 1 branch
BranchTrueFalseTotal
if $err and $conf->{"useSafeJail"} 0 0 0
Condition0%0/3
$err and $conf->{"useSafeJail"}
!ll&&!rl&&r
000
MC/DC0%0/2
$err and $conf->{"useSafeJail"}
$err $conf->{"useSafeJail"}
Truth table0%0/3
A and B
A= $errB= $conf->{"useSafeJail"}
ABresult
0X0
100
111
32 return ( $val =~ qr/(?<=[^=<!>\|\?])=(?![>=~])/
33 && $conf->{avoidAssignment} )
34 0 ▶ ? ( 1, "__badExpressionAssignment__" )
Branch: 1 branch
BranchTrueFalseTotal
$val =~ qr/(?<=[^=<!>\|\?])=(?![>=~])/ && $conf->{'avoidAssignment'} ? : 0 0 0
Condition0%0/3
$val =~ qr/(?<=[^=<!>\|\?])=(?![>=~])/ and $conf->{"avoidAssignment"}
!ll&&!rl&&r
000
MC/DC0%0/2
$val =~ qr/(?<=[^=<!>\|\?])=(?![>=~])/ and $conf->{"avoidAssignment"}
$val =~ qr/(?<=[^=<!>\|\?])=(?![>=~])/ $conf->{"avoidAssignment"}
Truth table0%0/3
A and B
A= $val =~ qr/(?<=[^=<!>\|\?])=(?![>=~])/B= $conf->{"avoidAssignment"}
ABresult
0X0
100
111
35 : 1;
36 }
37  
38 32 my $url_re = $RE{URI}{HTTP}{ -scheme => "https?" };
39 32 $url_re =~ s/(?<=[^\\])\$/\\\$/g;
40 32 my $url = qr/$url_re/;
41 32 my $urlOrEmpty = qr/(?:^$|$url_re)/;
42  
43 1 ▶sub types {
Subroutine types: called CC=1 SCAR=6.7
Pod undocumented
44 return {
45  
46 # Simple text types
47 text => {
48 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
49 msgFail => '__malformedValue__',
50 },
51 password => {
52 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
53 msgFail => '__malformedValue__',
54 },
55 longtext => {
56 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
57 },
58 url => {
59 form => 'text',
60 test => $urlOrEmpty,
61 msgFail => '__badUrl__',
62 },
63 PerlModule => {
64 form => 'text',
65 test => qr/^(?:[a-zA-Z][a-zA-Z0-9]*)*(?:::[a-zA-Z][a-zA-Z0-9]*)*$/,
66 msgFail => '__badPerlPackageName__',
67 },
68 hostname => {
69 form => 'text',
70 test => qr/^(?:$Regexp::Common::URI::RFC2396::host)?$/,
71 msgFail => '__badHostname__',
72 },
73 pcre => {
74 form => 'text',
75 0 ▶ test => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
76 0 eval { qr/$_[0]/ };
77 0 ▶ return $@ ? ( 0, "__badRegexp__: $@" ) : (1);
Branch: 1 branch
BranchTrueFalseTotal
$@ ? : 0 0 0
78 },
79 },
80 lmAttrOrMacro => {
81 form => 'text',
82 0 ▶ test => sub {
Subroutine __ANON__: not called CC=6 SCAR=37.4
83 0 my ( $val, $conf ) = @_;
84 return 1
85 0 ▶ if ( defined $conf->{macros}->{$val}
Branch: 1 branch
BranchTrueFalseTotal
if defined $conf->{"macros"}{$val} or $val =~ /^_/ 0 0 0
Condition0%0/3
defined $conf->{"macros"}{$val} or $val =~ /^_/
l!l&&r!l&&!r
000
MC/DC0%0/2
defined $conf->{"macros"}{$val} or $val =~ /^_/
defined $conf->{"macros"}{$val} $val =~ /^_/
Truth table0%0/3
A or B
A= defined $conf->{"macros"}{$val}B= $val =~ /^_/
ABresult
1X1
011
000
86 or $val =~ m/^_/ );
87 0 foreach ( keys %$conf ) {
88 return 1
89 if ( $_ =~ /exportedvars$/i
90 0 ▶ and defined $conf->{$_}->{$val} );
Branch: 1 branch
BranchTrueFalseTotal
if $_ =~ /exportedvars$/i and defined $conf->{$_}{$val} 0 0 0
Condition0%0/3
$_ =~ /exportedvars$/i and defined $conf->{$_}{$val}
!ll&&!rl&&r
000
MC/DC0%0/2
$_ =~ /exportedvars$/i and defined $conf->{$_}{$val}
$_ =~ /exportedvars$/i defined $conf->{$_}{$val}
Truth table0%0/3
A and B
A= $_ =~ /exportedvars$/iB= defined $conf->{$_}{$val}
ABresult
0X0
100
111
91 }
92 0 return ( 1, "__unknownAttrOrMacro__: $val" );
93 },
94 },
95  
96 # Other types
97 int => {
98 test => qr/^\-?\d+$/,
99 msgFail => '__notAnInteger__',
100 },
101 intOrNull => {
102 test => qr/^\-?\d*$/,
103 msgFail => '__notAnInteger__',
104 },
105 bool => {
106 test => qr/^[01]$/,
107 msgFail => '__notABoolean__',
108 },
109 trool => {
110 test => qr/^(?:-1|0|1)$/,
111 msgFail => '__authorizedValues__: -1, 0, 1',
112 },
113 boolOrExpr => {
114 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
115 msgFail => '__notAValidPerlExpression__',
116 },
117 keyTextContainer => {
118 test => qr/./,
119 msgFail => '__emptyValueNotAllowed__',
120 keyTest => qr/^\w[\w\.\-]*$/,
121 keyMsgFail => '__badKeyName__',
122 },
123 subContainer => {
124 keyTest => qr/\w/,
125 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
126 },
127 select => {
128 0 ▶ test => sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
129 0 ▶ return ( 0, "Value is not a scalar" ) if ref( $_[0] );
Branch: 1 branch
BranchTrueFalseTotal
if ref $_[0] 0 0 0
130 0 my $test = grep ( { $_ eq $_[0] }
131 0 map ( { $_->{k} } @{ $_[2]->{select} } ) );
132 0 ▶ return $test
Branch: 1 branch
BranchTrueFalseTotal
$test ? : 0 0 0
133 ? 1
134 : ( 1, "Invalid value '$_[0]' for this select" );
135 },
136 },
137  
138 # Files type (long text)
139 file => {
140 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
141 },
142 RSAPublicKey => {
143 0 ▶ test => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
144 return (
145 0 ▶ $_[0] =~
Branch: 1 branch
BranchTrueFalseTotal
$_[0] =~ m[^(?:(?:\-+\s*BEGIN\s+PUBLIC\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+PUBLIC\s+KEY\s*\-+)?[\r\n]*)?$]s ? : 0 0 0
146 /^(?:(?:\-+\s*BEGIN\s+PUBLIC\s+KEY\s*\-+\r?\n)?[a-zA-Z0-9\/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+PUBLIC\s+KEY\s*\-+)?[\r\n]*)?$/s
147 ? (1)
148 : ( 1, '__badPemEncoding__' )
149 );
150 },
151 },
152 'RSAPublicKeyOrCertificate' => {
153 0 ▶ 'test' => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
154 return (
155 0 ▶ $_[0] =~
Branch: 1 branch
BranchTrueFalseTotal
$_[0] =~ m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+)?[\r\n]*)?$]s ? : 0 0 0
156 /^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9\/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+)?[\r\n]*)?$/s
157 ? (1)
158 : ( 1, '__badPemEncoding__' )
159 );
160 },
161 },
162 RSAPrivateKey => {
163 0 ▶ test => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
164 return (
165 0 ▶ $_[0] =~
Branch: 1 branch
BranchTrueFalseTotal
$_[0] =~ m[^(?:(?:\-+\s*BEGIN\s+(?:(?:RSA|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\nDEK-Info:.*\r?\n[\r\n]*)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:(?:RSA|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$]s ? : 0 0 0
166 /^(?:(?:\-+\s*BEGIN\s+(?:(?:RSA|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\nDEK-Info:.*\r?\n[\r\n]*)?[a-zA-Z0-9\/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:(?:RSA|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$/s
167 ? (1)
168 : ( 1, '__badPemEncoding__' )
169 );
170 },
171 },
172 'EcOrRSAPublicKeyOrCertificate' => {
173 0 ▶ 'test' => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
174 return (
175 0 ▶ $_[0] =~
Branch: 1 branch
BranchTrueFalseTotal
$_[0] =~ m[^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+)?[\r\n]*)?$]s ? : 0 0 0
176 /^(?:(?:\-+\s*BEGIN\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+\r?\n)?[a-zA-Z0-9\/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:PUBLIC\s+KEY|CERTIFICATE)\s*\-+)?[\r\n]*)?$/s
177 ? (1)
178 : ( 1, '__badPemEncoding__' )
179 );
180 },
181 },
182 EcOrRSAPrivateKey => {
183 0 ▶ test => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
184 return (
185 0 ▶ $_[0] =~
Branch: 1 branch
BranchTrueFalseTotal
$_[0] =~ m[^(?:(?:\-+\s*BEGIN\s+(?:(?:RSA|EC|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\nDEK-Info:.*\r?\n[\r\n]*)?[a-zA-Z0-9/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:(?:RSA|EC|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$]s ? : 0 0 0
186 /^(?:(?:\-+\s*BEGIN\s+(?:(?:RSA|EC|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+\r?\n)?(?:Proc-Type:.*\r?\nDEK-Info:.*\r?\n[\r\n]*)?[a-zA-Z0-9\/\+\r\n]+={0,2}(?:\r?\n\-+\s*END\s+(?:(?:RSA|EC|ENCRYPTED)\s+)?PRIVATE\s+KEY\s*\-+)?[\r\n]*)?$/s
187 ? (1)
188 : ( 1, '__badPemEncoding__' )
189 );
190 },
191 },
192  
193 authParamsText => {
194 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
195 },
196 blackWhiteList => {
197 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
198 },
199 catAndAppList => {
200 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
201 },
202 keyText => {
203 keyTest => qr/^[a-zA-Z0-9_]+$/,
204 test => qr/^.*$/,
205 msgFail => '__badValue__',
206 },
207 menuApp => {
208 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
209 },
210 menuCat => {
211 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
212 },
213 oidcAttribute => {
214 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
215 },
216 oidcOPMetaDataNode => {
217 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
218 },
219 oidcRPMetaDataNode => {
220 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
221 },
222 oidcmetadatajson => {
223 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
224 },
225 oidcmetadatajwks => {
226 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
227 },
228 portalskin => {
229 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
230 },
231 portalskinbackground => {
232 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
233 },
234 post => {
235 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
236 },
237 rule => {
238 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
239 },
240 samlAssertion => {
241 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
242 },
243 samlAttribute => {
244 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
245 },
246 samlIDPMetaDataNode => {
247 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
248 },
249 samlSPMetaDataNode => {
250 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
251 },
252 samlService => {
253 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
254 },
255 array => {
256 0 ▶ test => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
257 },
258 1 };
259 }
260  
261 32 ▶use constant oidcEncAlgorithmEnc => [
Subroutine BEGIN: called CC=1 SCAR=0.0
262 { k => 'A256CBC-HS512', v => 'A256CBC-HS512' },
263 { k => 'A256GCM', v => 'A256GCM' },
264 { k => 'A192CBC-HS384', v => 'A192CBC-HS384' },
265 { k => 'A192GCM', v => 'A192GCM' },
266 { k => 'A128CBC-HS256', v => 'A128CBC-HS256' },
267 { k => 'A128GCM', v => 'A128GCM' },
268 32 ];
269  
270 32 ▶use constant oidcEncAlgorithmAlg => [
Subroutine BEGIN: called CC=1 SCAR=0.0
271  
272 # Symetric encryption not supported
273 #{ k => 'A128KW', v => 'A128KW' },
274 #{ k => 'A192KW', v => 'A192KW' },
275 #{ k => 'A256KW', v => 'A256KW' },
276 #{ k => 'A128GCMKW', v => 'A128GCMKW' },
277 #{ k => 'A192GCMKW', v => 'A192GCMKW' },
278 #{ k => 'A256GCMKW', v => 'A256GCMKW' },
279 #{ k => 'PBES2-HS256+A128KW', v => 'PBES2-HS256+A128KW' },
280 #{ k => 'PBES2-HS384+A192KW', v => 'PBES2-HS384+A192KW' },
281 #{ k => 'PBES2-HS512+A256KW', v => 'PBES2-HS512+A256KW' },
282 { k => 'RSA-OAEP', v => 'RSA-OAEP' },
283 { k => 'RSA-OAEP-256', v => 'RSA-OAEP-256' },
284 { k => 'RSA1_5', v => 'RSA1_5' },
285 { k => 'ECDH-ES', v => 'ECDH-ES' },
286 { k => 'ECDH-ES+A128KW', v => 'ECDH-ES+A128KW' },
287 { k => 'ECDH-ES+A192KW', v => 'ECDH-ES+A192KW' },
288 { k => 'ECDH-ES+A256KW', v => 'ECDH-ES+A256KW' },
289 32 ];
290  
291 32 ▶use constant oidcSigAlgorithmAlg => [
Subroutine BEGIN: called CC=1 SCAR=0.0
292 { k => 'HS256', v => 'HS256' },
293 { k => 'HS384', v => 'HS384' },
294 { k => 'HS512', v => 'HS512' },
295 { k => 'RS256', v => 'RS256' },
296 { k => 'RS384', v => 'RS384' },
297 { k => 'RS512', v => 'RS512' },
298 { k => 'PS256', v => 'PS256' },
299 { k => 'PS384', v => 'PS384' },
300 { k => 'PS512', v => 'PS512' },
301 { k => 'ES256', v => 'ES256' },
302 { k => 'ES384', v => 'ES384' },
303 { k => 'ES512', v => 'ES512' },
304 { k => 'EdDSA', v => 'EdDSA' },
305 32 ];
306  
307 23 ▶sub attributes {
Subroutine attributes: called CC=1 SCAR=5.5
Pod undocumented
308 return {
309  
310 # Other
311 checkTime => {
312 type => 'int',
313 documentation =>
314 'Timeout to check new configuration in local cache',
315 default => 600,
316 flags => 'hp',
317 },
318 checkMsg => {
319 type => 'int',
320 documentation => 'Timeout to check new evant',
321 default => 5,
322 flags => 'hp',
323 },
324 defaultAuthnLevel => { type => 'intOrNull' },
325 defaultNewKeySize => {
326 type => 'int',
327 documentation => 'Default size for new RSA key helper',
328 default => 2048,
329 flags => 'm',
330 },
331 mySessionAuthorizedRWKeys => {
332 type => 'array',
333 documentation => 'Alterable session keys by user itself',
334 default => [
335 '_appsListOrder', '_oidcConnectedRP',
336 '_oidcConnectedRPIDs', '_oidcConsents'
337 ],
338 },
339 configStorage => {
340 type => 'text',
341 documentation => 'Configuration storage',
342 flags => 'hmp',
343 },
344 localStorage => {
345 type => 'text',
346 documentation => 'Local cache',
347 flags => 'hmp',
348 },
349 localStorageOptions => {
350 type => 'keyTextContainer',
351 documentation => 'Local cache parameters',
352 flags => 'hmp',
353 },
354 cfgNum => {
355 type => 'int',
356 default => 0,
357 documentation => 'Enable Cross Domain Authentication',
358 },
359 cfgAuthor => {
360 type => 'text',
361 documentation => 'Name of the author of the current configuration',
362 },
363 cfgAuthorIP => {
364 type => 'text',
365 documentation => 'Uploader IP address of the current configuration',
366 },
367 cfgDate => {
368 type => 'int',
369 documentation => 'Timestamp of the current configuration',
370 },
371 cfgLog => {
372 type => 'longtext',
373 documentation => 'Configuration update log',
374 },
375 cfgVersion => {
376 type => 'text',
377 documentation => 'Version of LLNG which build configuration',
378 },
379 eventStatus => {
380 type => 'bool',
381 documentation => 'Push status into message broker',
382 flags => 'h',
383 },
384 statusQueueName => {
385 type => 'text',
386 default => 'llng_status',
387 flags => 'h',
388 documentation => 'Status channel name',
389 },
390 confirmFormMethod => {
391 type => "select",
392 select =>
393 [ { k => 'get', v => 'GET' }, { k => 'post', v => 'POST' }, ],
394 default => 'post',
395 documentation => 'HTTP method for confirm page form',
396 },
397 customFunctions => {
398 type => 'text',
399 test => qr/^(?:\w+(?:::\w+)*(?:\s+\w+(?:::\w+)*)*)?$/,
400 help => 'customfunctions.html',
401 msgFail => "__badCustomFuncName__",
402 documentation => 'List of custom functions',
403 flags => 'hmp',
404 },
405 https => {
406 default => -1,
407 type => 'trool',
408 documentation => 'Use HTTPS for redirection from portal',
409 flags => 'h',
410 },
411 infoFormMethod => {
412 type => "select",
413 select =>
414 [ { k => 'get', v => 'GET' }, { k => 'post', v => 'POST' }, ],
415 default => 'get',
416 documentation => 'HTTP method for info page form',
417 },
418 port => {
419 default => -1,
420 type => 'int',
421 documentation => 'Force port in redirection',
422 flags => 'h',
423 },
424 jsRedirect => {
425 type => 'boolOrExpr',
426 default => 0,
427 documentation => 'Use javascript for redirections',
428 },
429 externalMenu => {
430 type => 'text',
431 default => '',
432 documentation =>
433 'URL to redirect authenticated users to instead of showing menu. Supports session variables like $uid, $mail, etc.',
434 },
435 logoutServices => {
436 type => 'keyTextContainer',
437 help => 'logoutforward.html',
438 default => {},
439 documentation => 'Send logout trough GET request to these services',
440 },
441 maintenance => {
442 default => 0,
443 type => 'bool',
444 documentation => 'Maintenance mode for all virtual hosts',
445 flags => 'h',
446 },
447 nginxCustomHandlers => {
448 type => 'keyTextContainer',
449 keyTest => qr/^\w+$/,
450 test => qr/^[a-zA-Z][a-zA-Z0-9]*(?:::[a-zA-Z][a-zA-Z0-9]*)*$/,
451 help => 'handlerarch.html',
452 msgFail => '__badPerlPackageName__',
453 documentation => 'Custom Nginx handler (deprecated)',
454 },
455 noAjaxHook => {
456 default => 0,
457 type => 'bool',
458 documentation => 'Avoid replacing 302 by 401 for Ajax responses',
459 },
460 portal => {
461 type => 'url',
462 default => 'http://auth.example.com/',
463 documentation => 'Portal URL',
464 flags => 'hmp',
465 test => $url,
466 msgFail => '__badUrl__',
467 },
468 portalFavicon => {
469 type => 'text',
470 default => 'common/favicon.ico',
471 documentation => 'Path to favicon file',
472 },
473 portalCustomCss => {
474 type => 'text',
475 documentation => 'Path to custom CSS file',
476 },
477 portalCustomJs => {
478 type => 'text',
479 documentation => 'Path to custom JS file',
480 },
481 portalCustomTplParams => {
482 type => 'keyTextContainer',
483 documentation => 'Custom templates parameters',
484 },
485 portalStatus => {
486 type => 'bool',
487 default => 0,
488 help => 'status.html',
489 documentation => 'Enable portal status',
490 },
491 portalUserAttr => {
492 type => 'text',
493 default => '_user',
494 documentation =>
495 'Session parameter to display connected user in portal',
496 },
497 redirectFormMethod => {
498 type => "select",
499 select =>
500 [ { k => 'get', v => 'GET' }, { k => 'post', v => 'POST' }, ],
501 default => 'get',
502 documentation => 'HTTP method for redirect page form',
503 },
504 reloadTimeout => {
505 type => 'int',
506 default => 5,
507 documentation => 'Configuration reload timeout',
508 flags => 'm',
509 },
510 reloadUrls => {
511 type => 'keyTextContainer',
512 keyTest => qr/^$Regexp::Common::URI::RFC2396::host(?::\d+)?$/,
513 test => $url,
514 msgFail => '__badUrl__',
515 documentation => 'URL to call on reload',
516 },
517 compactConf => {
518 type => 'bool',
519 default => 0,
520 documentation => 'Compact configuration',
521 },
522 portalMainLogo => {
523 type => 'text',
524 default => 'common/logos/logo_llng_400px.png',
525 documentation => 'Portal main logo path',
526 },
527 showLanguages => {
528 type => 'bool',
529 default => 1,
530 documentation => 'Display langs icons',
531 },
532 scrollTop => {
533 type => 'int',
534 default => 400,
535 documentation => 'Display back to top button',
536 },
537 floatingCategoryName => {
538 type => 'text',
539 documentation => 'Name of the category displayed as floating menu',
540 },
541 staticPrefix => {
542 type => 'text',
543 documentation => 'Prefix of static files for HTML templates',
544 },
545 groupsBeforeMacros => {
546 type => 'bool',
547 default => 0,
548 documentation => 'Compute groups before macros',
549 },
550 multiValuesSeparator => {
551 type => 'authParamsText',
552 default => '; ',
553 documentation => 'Separator for multiple values',
554 flags => 'hmp',
555 },
556 rememberAuthChoiceForgetAtLogout => {
557 type => 'bool',
558 default => 0,
559 documentation => 'Forget Auth Choice at logout',
560 },
561 rememberAuthChoiceRule => {
562 type => 'boolOrExpr',
563 default => 0,
564 documentation => 'remember auth choice activation rule',
565 },
566 rememberCookieName => {
567 type => 'text',
568 test => qr/^[a-zA-Z][a-zA-Z0-9_-]*$/,
569 msgFail => '__badCookieName__',
570 default => 'llngrememberauthchoice',
571 documentation => 'Name of the remember auth choice cookie',
572 flags => 'p',
573 },
574 rememberCookieTimeout => {
575 type => 'int',
576 default => 31536000,
577 documentation => 'lifetime of the remember auth choice cookie',
578 flags => 'm',
579 },
580 rememberDefaultChecked => {
581 type => 'bool',
582 default => 0,
583 documentation =>
584 'Is remember auth choice checkbox enabled by default?',
585 },
586 rememberTimer => {
587 type => 'int',
588 default => 5,
589 documentation =>
590 'timer before automatic authentication with remembered choice',
591 flags => 'm',
592 },
593 stayConnected => {
594 type => 'boolOrExpr',
595 default => 0,
596 documentation => 'Stay connected activation rule',
597 },
598 stayConnectedBypassFG => {
599 type => 'bool',
600 default => 0,
601 documentation => 'Disable fingerprint checkng',
602 },
603 stayConnectedTimeout => {
604 type => 'int',
605 default => 2592000,
606 documentation =>
607 'StayConnected persistent connexion session timeout',
608 flags => 'm',
609 },
610 stayConnectedCookieName => {
611 type => 'text',
612 test => qr/^[a-zA-Z][a-zA-Z0-9_-]*$/,
613 msgFail => '__badCookieName__',
614 default => 'llngconnection',
615 documentation => 'Name of the stayConnected plugin cookie',
616 flags => 'p',
617 },
618 stayConnectedSingleSession => {
619 default => 0,
620 type => 'bool',
621 documentation => 'Allow only one permanent session per user',
622 },
623 checkState => {
624 type => 'bool',
625 default => 0,
626 documentation => 'Enable CheckState plugin',
627 },
628 checkStateSecret => {
629 type => 'text',
630 documentation => 'Secret token for CheckState plugin',
631 },
632 webCronSecret => {
633 type => 'text',
634 documentation => 'Secret token for webcron plugin',
635 },
636 checkDevOps => {
637 default => 0,
638 type => 'bool',
639 documentation => 'Enable check DevOps',
640 flags => 'p',
641 },
642 checkDevOpsDownload => {
643 default => 1,
644 type => 'bool',
645 documentation => 'Enable check DevOps download field',
646 flags => 'p',
647 },
648 checkDevOpsDisplayNormalizedHeaders => {
649 default => 1,
650 type => 'bool',
651 documentation => 'Display normalized headers',
652 flags => 'p',
653 },
654 checkDevOpsCheckSessionAttributes => {
655 default => 1,
656 type => 'bool',
657 documentation => 'Check if session attributes exist',
658 flags => 'p',
659 },
660 checkHIBP => {
661 default => 0,
662 type => 'bool',
663 documentation => 'Enable check HIBP',
664 flags => 'p',
665 },
666 checkHIBPURL => {
667 default => 'https://api.pwnedpasswords.com/range/',
668 type => 'url',
669 documentation => 'URL of Have I Been Pwned API',
670 flags => 'p',
671 },
672 checkHIBPRequired => {
673 default => 1,
674 type => 'bool',
675 documentation => 'Require HIBP check to pass',
676 flags => 'p',
677 },
678 checkEntropy => {
679 default => 0,
680 type => 'bool',
681 documentation => 'Enable entropy check of password',
682 flags => 'p',
683 },
684 checkEntropyRequired => {
685 default => 0,
686 type => 'bool',
687 documentation => 'Require entropy check to pass',
688 flags => 'p',
689 },
690 checkEntropyRequiredLevel => {
691 type => 'int',
692 documentation =>
693 'Minimal entropy required for the password to be accepted',
694 flags => 'p',
695 },
696 initializePasswordReset => {
697 default => 0,
698 type => 'bool',
699 documentation => 'Enable Password Reset API plugin',
700 flags => 'p',
701 },
702 initializePasswordResetSecret => {
703 type => 'password',
704 documentation => 'Secret key for the Initialize Password Reset API',
705 flags => 'p',
706 },
707 checkUser => {
708 default => 0,
709 type => 'bool',
710 documentation => 'Enable check user',
711 flags => 'p',
712 },
713 checkUserIdRule => {
714 type => 'text',
715 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
716 default => 1,
717 documentation => 'checkUser identities rule',
718 },
719 checkUserUnrestrictedUsersRule => {
720 type => 'text',
721 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
722 documentation => 'checkUser unrestricted users rule',
723 flags => 'p',
724 },
725 checkUserHiddenAttributes => {
726 type => 'text',
727 default => '_loginHistory, _session_id, hGroups',
728 documentation => 'Attributes to hide in CheckUser plugin',
729 flags => 'p',
730 },
731 checkUserSearchAttributes => {
732 type => 'text',
733 documentation =>
734 'Attributes used for retrieving sessions in user DataBase',
735 flags => 'p',
736 },
737 checkUserDisplayPersistentInfo => {
738 default => 0,
739 type => 'boolOrExpr',
740 documentation => 'Display persistent session info rule',
741 flags => 'p',
742 },
743 checkUserDisplayEmptyValues => {
744 default => 0,
745 type => 'boolOrExpr',
746 documentation => 'Display session empty values rule',
747 flags => 'p',
748 },
749 checkUserDisplayEmptyHeaders => {
750 default => 0,
751 type => 'boolOrExpr',
752 documentation => 'Display empty headers rule',
753 flags => 'p',
754 },
755 checkUserDisplayNormalizedHeaders => {
756 default => 0,
757 type => 'boolOrExpr',
758 documentation => 'Display normalized headers rule',
759 flags => 'p',
760 },
761 checkUserDisplayComputedSession => {
762 default => 1,
763 type => 'boolOrExpr',
764 documentation => 'Display empty headers rule',
765 flags => 'p',
766 },
767 checkUserDisplayHistory => {
768 default => 0,
769 type => 'boolOrExpr',
770 documentation => 'Display history rule',
771 flags => 'p',
772 },
773 checkUserDisplayHiddenAttributes => {
774 default => 0,
775 type => 'boolOrExpr',
776 documentation => 'Display hidden attributes rule',
777 flags => 'p',
778 },
779 checkUserHiddenHeaders => {
780 type => 'keyTextContainer',
781 keyTest => qr/^\S+$/,
782 keyMsgFail => '__badHostname__',
783 test => {
784 keyTest => qr/^(?=[^\-])[\w\-\s]+(?<=[^-])$/,
785 keyMsgFail => '__badHeaderName__',
786 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
787 },
788 documentation => 'Header values to hide if not empty',
789 },
790 findUser => {
791 default => 0,
792 type => 'bool',
793 documentation => 'Enable find user',
794 flags => 'p',
795 },
796 findUserSearchingAttributes => {
797 type => 'keyTextContainer',
798 keyTest => qr/^\S+$/,
799 documentation => 'Attributes used for searching accounts',
800 },
801 findUserExcludingAttributes => {
802 type => 'keyTextContainer',
803 keyTest => qr/^\S+$/,
804 documentation => 'Attributes used for excluding accounts',
805 },
806 findUserWildcard => {
807 type => 'text',
808 default => '*',
809 documentation => 'Character used as wildcard',
810 },
811 findUserControl => {
812 type => 'pcre',
813 default => '^[*\w]+$',
814 documentation => 'Regular expression to validate parameters',
815 },
816 newLocationWarning => {
817 default => 0,
818 type => 'bool',
819 documentation => 'Enable New Location Warning',
820 },
821 newLocationWarningLocationAttribute => {
822 type => 'text',
823 default => 'ipAddr',
824 documentation => 'New location session attribute',
825 },
826 newLocationWarningLocationDisplayAttribute => {
827 type => 'text',
828 default => '',
829 documentation => 'New location session attribute for user display',
830 },
831 newLocationWarningMaxValues => {
832 type => 'int',
833 default => '0',
834 documentation => 'How many previous locations should be compared',
835 },
836 newLocationWarningMailAttribute => {
837 type => 'text',
838 documentation => 'New location warning mail session attribute',
839 },
840 newLocationWarningMailBody => {
841 type => 'longtext',
842 documentation => 'Mail body for new location warning',
843 },
844 newLocationWarningMailSubject => {
845 type => 'text',
846 documentation => 'Mail subject for new location warning',
847 },
848 globalLogoutRule => {
849 type => 'boolOrExpr',
850 default => 0,
851 documentation => 'Global logout activation rule',
852 flags => 'p',
853 },
854 globalLogoutTimer => {
855 default => 1,
856 type => 'bool',
857 documentation => 'Global logout auto accept time',
858 flags => 'p',
859 },
860 globalLogoutCustomParam => {
861 type => 'text',
862 documentation => 'Custom session parameter to display',
863 flags => 'p',
864 },
865 impersonationMergeSSOgroups => {
866 default => 0,
867 type => 'boolOrExpr',
868 documentation => 'Merge spoofed and real SSO groups',
869 flags => 'p',
870 },
871 impersonationPrefix => {
872 type => 'text',
873 default => 'real_',
874 documentation => 'Prefix to rename real session attributes',
875 flags => 'p',
876 },
877 impersonationRule => {
878 type => 'boolOrExpr',
879 default => 0,
880 documentation => 'Impersonation activation rule',
881 flags => 'p',
882 },
883 impersonationIdRule => {
884 type => 'text',
885 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
886 default => 1,
887 documentation => 'Impersonation identities rule',
888 flags => 'p',
889 },
890 impersonationUnrestrictedUsersRule => {
891 type => 'text',
892 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
893 documentation => 'Impersonation unrestricted users rule',
894 flags => 'p',
895 },
896 impersonationHiddenAttributes => {
897 type => 'text',
898 default => '_2fDevices, _loginHistory',
899 documentation => 'Attributes to skip',
900 flags => 'p',
901 },
902 impersonationSkipEmptyValues => {
903 default => 1,
904 type => 'bool',
905 documentation => 'Skip session empty values',
906 flags => 'p',
907 },
908 contextSwitchingRule => {
909 type => 'boolOrExpr',
910 default => 0,
911 documentation => 'Context switching activation rule',
912 flags => 'p',
913 },
914 contextSwitchingIdRule => {
915 type => 'text',
916 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
917 default => 1,
918 documentation => 'Context switching identities rule',
919 flags => 'p',
920 },
921 contextSwitchingUnrestrictedUsersRule => {
922 type => 'text',
923 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
924 documentation => 'Context switching unrestricted users rule',
925 flags => 'p',
926 },
927 contextSwitchingStopWithLogout => {
928 type => 'bool',
929 default => 1,
930 documentation => 'Stop context switching by logout',
931 flags => 'p',
932 },
933 contextSwitchingAllowed2fModifications => {
934 type => 'bool',
935 default => 0,
936 documentation => 'Allowed SFA modifications',
937 flags => 'p',
938 },
939 contextSwitchingPrefix => {
940 type => 'text',
941 default => 'switching',
942 documentation => 'Prefix to store real session Id',
943 flags => 'p',
944 },
945 decryptValueRule => {
946 type => 'boolOrExpr',
947 default => 0,
948 documentation => 'Decrypt value activation rule',
949 flags => 'p',
950 },
951 decryptValueFunctions => {
952 type => 'text',
953 test => qr/^(?:\w+(?:::\w+)*(?:\s+\w+(?:::\w+)*)*)?$/,
954 msgFail => "__badCustomFuncName__",
955 documentation => 'Custom function used for decrypting values',
956 flags => 'p',
957 },
958 skipRenewConfirmation => {
959 type => 'bool',
960 default => 0,
961 documentation =>
962 'Avoid asking confirmation when an Issuer asks to renew auth',
963 },
964 skipUpgradeConfirmation => {
965 type => 'bool',
966 default => 0,
967 documentation =>
968 'Avoid asking confirmation during a session upgrade',
969 },
970 refreshSessions => {
971 type => 'bool',
972 help => "refreshsessionapi.html",
973 documentation => 'Refresh sessions plugin',
974 },
975 forceGlobalStorageIssuerOTT => {
976 type => 'bool',
977 documentation =>
978 'Force Issuer tokens to be stored into Global Storage',
979 },
980 handlerInternalCache => {
981 type => 'int',
982 default => 15,
983 documentation => 'Handler internal cache timeout',
984 flags => 'hp',
985 },
986 handlerServiceTokenTTL => {
987 type => 'int',
988 default => 30,
989 documentation => 'Handler ServiceToken timeout',
990 flags => 'hp',
991 },
992  
993 # Loggers (ini only)
994 logLevel => {
995 type => 'text',
996 documentation => 'Log level, must be set in .ini',
997 flags => 'hmp',
998 },
999 logger => {
1000 type => 'text',
1001 documentation => 'technical logger',
1002 flags => 'hmp',
1003 },
1004 userLogger => {
1005 type => 'text',
1006 documentation => 'User actions logger',
1007 flags => 'hmp',
1008 },
1009 log4perlConfFile => {
1010 type => 'text',
1011 documentation => 'Log4Perl logger configuration file',
1012 flags => 'hmp',
1013 },
1014 lokiUrl => {
1015 type => 'text',
1016 documentation => 'Loki API',
1017 flags => 'hmp',
1018 },
1019 lokiLabel => {
1020 type => 'text',
1021 documentation => 'Loki label, default llng',
1022 flags => 'hmp',
1023 },
1024 lokiInstance => {
1025 type => 'text',
1026 documentation => 'Loki instance, default `hostname` output',
1027 flags => 'hmp',
1028 },
1029 lokiEnv => {
1030 type => 'text',
1031 documentation => 'Loki env, default "prod"',
1032 flags => 'hmp',
1033 },
1034 lokiTenant => {
1035 type => 'text',
1036 documentation => 'Loki Tenant',
1037 flags => 'hmp',
1038 },
1039 lokiTenantHeader => {
1040 type => 'text',
1041 documentation => 'Loki Tenant Header name',
1042 flags => 'hmp',
1043 },
1044 lokiAuthorization => {
1045 type => 'text',
1046 documentation => 'Loki Authorization header value',
1047 flags => 'hmp',
1048 },
1049 lokiService => {
1050 type => 'text',
1051 documentation => 'Loki Service (technical context)',
1052 flags => 'hmp',
1053 },
1054 lokiUserService => {
1055 type => 'text',
1056 documentation => 'Loki (userLogger context)',
1057 flags => 'hmp',
1058 },
1059 sentryDsn => {
1060 type => 'text',
1061 documentation => 'Sentry logger DSN',
1062 flags => 'hmp',
1063 },
1064 syslogFacility => {
1065 type => 'text',
1066 documentation => 'Syslog logger technical facility',
1067 flags => 'hmp',
1068 },
1069 userSyslogFacility => {
1070 type => 'text',
1071 documentation => 'Syslog logger user-actions facility',
1072 flags => 'hmp',
1073 },
1074 syslogSockOptions => {
1075 type => 'keyTextContainer',
1076 documentation => 'Option to send to setlogsock()',
1077 flags => 'hmp',
1078 keyTest => qr/^(?:type|path|timeout|host|port)$/,
1079 },
1080  
1081 # Manager or PSGI protected apps
1082 protection => {
1083 type => 'text',
1084 test => qr/^(?:none|authenticate|manager|)$/,
1085 msgFail => '__authorizedValues__: none authenticate manager',
1086 documentation => 'Manager protection method',
1087 flags => 'hm',
1088 },
1089  
1090 # Menu
1091 activeTimer => {
1092 type => 'bool',
1093 default => 1,
1094 documentation => 'Enable timers on portal pages',
1095 },
1096 applicationList => {
1097 type => 'catAndAppList',
1098 keyTest => qr/\w/,
1099 help => 'portalmenu.html#categories-and-applications',
1100 default => {
1101 default => { catname => 'Default category', type => "category" }
1102 },
1103 documentation => 'Applications list',
1104 },
1105 portalErrorOnExpiredSession => {
1106 type => 'bool',
1107 default => 1,
1108 documentation => 'Show error if session is expired',
1109 },
1110 portalErrorOnMailNotFound => {
1111 type => 'bool',
1112 default => 0,
1113 documentation =>
1114 'Show error if mail is not found in password reset process',
1115 },
1116 portalOpenLinkInNewWindow => {
1117 type => 'bool',
1118 default => 0,
1119 documentation => 'Open applications in new windows',
1120 },
1121 portalPingInterval => {
1122 type => 'int',
1123 default => 60000,
1124 documentation => 'Interval in ms between portal Ajax pings',
1125 },
1126 portalSkin => {
1127 type => 'portalskin',
1128 default => 'bootstrap',
1129 documentation => 'Name of portal skin',
1130 select => [ { k => 'bootstrap', v => 'Bootstrap' }, ],
1131 },
1132 portalSkinBackground => {
1133 type => 'portalskinbackground',
1134 documentation => 'Background image of portal skin',
1135 select => [
1136 { k => "", v => 'None' },
1137 {
1138 k => "1280px-Anse_Source_d'Argent_2-La_Digue.jpg",
1139 v => 'Anse'
1140 },
1141 {
1142 k =>
1143 "1280px-Autumn-clear-water-waterfall-landscape_-_Virginia_-_ForestWander.jpg",
1144 v => 'Waterfall'
1145 },
1146 { k => "1280px-BrockenSnowedTrees.jpg", v => 'Snowed Trees' },
1147 {
1148 k => "1280px-Cedar_Breaks_National_Monument_partially.jpg",
1149 v => 'National Monument'
1150 },
1151 {
1152 k => "1280px-Parry_Peak_from_Winter_Park.jpg",
1153 v => 'Winter'
1154 },
1155 {
1156 k => "Aletschgletscher_mit_Pinus_cembra1.jpg",
1157 v => 'Pinus'
1158 },
1159 ],
1160 },
1161 portalSkinRules => {
1162 type => 'keyTextContainer',
1163 help => 'portalcustom.html',
1164 0 ▶ keyTest => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
1165 keyMsgFail => '__badSkinRule__',
1166 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
1167 msgFail => '__badValue__',
1168 documentation => 'Rules to choose portal skin',
1169 },
1170 cacheTagSalt => {
1171 type => 'text',
1172 documentation => 'Salt value for cache busting tag',
1173 },
1174  
1175 # Security
1176 formTimeout => {
1177 default => 120,
1178 type => 'int',
1179 documentation => 'Token timeout for forms',
1180 },
1181 shortTokenTTL => {
1182 default => 30,
1183 type => 'int',
1184 documentation => 'Short token timeout (for machines)',
1185 },
1186 issuersTimeout => {
1187 default => 120,
1188 type => 'int',
1189 documentation => 'Token timeout for issuers',
1190 },
1191 requireToken => {
1192 default => 1,
1193 type => 'boolOrExpr',
1194 documentation => 'Enable token for forms',
1195 },
1196 tokenUseGlobalStorage => {
1197 default => 0,
1198 type => 'bool',
1199 documentation => 'Enable global token storage',
1200 },
1201 cda => {
1202 default => 0,
1203 type => 'bool',
1204 documentation => 'Enable Cross Domain Authentication',
1205 flags => 'hp',
1206 },
1207 checkXSS => {
1208 default => 1,
1209 type => 'bool',
1210 documentation => 'Check XSS',
1211 },
1212 portalForceAuthn => {
1213 default => 0,
1214 help => 'forcereauthn.html',
1215 type => 'bool',
1216 documentation =>
1217 'Enable force to authenticate when displaying portal',
1218 },
1219 portalForceAuthnInterval => {
1220 default => 30,
1221 type => 'int',
1222 documentation =>
1223 'Maximum interval in seconds since last authentication to force reauthentication',
1224 },
1225 bruteForceProtection => {
1226 default => 0,
1227 help => 'bruteforceprotection.html',
1228 type => 'bool',
1229 documentation => 'Enable brute force attack protection',
1230 },
1231 bruteForceProtectionTempo => {
1232 default => 30,
1233 type => 'int',
1234 documentation => 'Lock time',
1235 },
1236 bruteForceProtectionMaxAge => {
1237 default => 300,
1238 type => 'int',
1239 documentation => 'Max age between current and first failed login',
1240 },
1241 bruteForceProtectionMaxFailed => {
1242 default => 3,
1243 type => 'int',
1244 documentation => 'Max allowed failed login',
1245 },
1246 bruteForceProtectionMaxLockTime => {
1247 default => 900,
1248 type => 'int',
1249 documentation => 'Max lock time',
1250 },
1251 bruteForceProtectionIncrementalTempo => {
1252 default => 0,
1253 help => 'bruteforceprotection.html',
1254 type => 'bool',
1255 documentation =>
1256 'Enable incremental lock time for brute force attack protection',
1257 },
1258 bruteForceProtectionLockTimes => {
1259 type => 'text',
1260 default => '15, 30, 60, 300, 600',
1261 documentation =>
1262 'Incremental lock time values for brute force attack protection',
1263 },
1264 grantSessionRules => {
1265 type => 'grantContainer',
1266 0 ▶ keyTest => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
1267 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
1268 documentation => 'Rules to grant sessions',
1269 default => {},
1270 },
1271 hiddenAttributes => {
1272 type => 'text',
1273 default => '_password _2fDevices',
1274 documentation => 'Name of attributes to hide in logs',
1275 },
1276 displaySessionId => {
1277 type => 'bool',
1278 default => 1,
1279 documentation => 'Display _session_id with sessions explorer',
1280 },
1281 persistentSessionAttributes => {
1282 type => 'text',
1283 default => '_loginHistory _2fDevices _oidcConsents notification_',
1284 documentation => 'Persistent session attributes to hide',
1285 },
1286 key => {
1287 type => 'password',
1288 documentation => 'Secret key',
1289 },
1290 corsEnabled => {
1291 default => 1,
1292 type => 'bool',
1293 documentation => 'Enable Cross-Origin Resource Sharing',
1294 },
1295 corsAllow_Credentials => {
1296 type => 'text',
1297 default => 'true',
1298 documentation =>
1299 'Allow credentials for Cross-Origin Resource Sharing',
1300 },
1301 corsAllow_Headers => {
1302 type => 'text',
1303 default => '*',
1304 documentation =>
1305 'Allowed headers for Cross-Origin Resource Sharing',
1306 },
1307 corsAllow_Methods => {
1308 type => 'text',
1309 default => 'POST,GET',
1310 documentation =>
1311 'Allowed methods for Cross-Origin Resource Sharing',
1312 },
1313 corsAllow_Origin => {
1314 type => 'text',
1315 default => '*',
1316 documentation =>
1317 'Allowed origine for Cross-Origin Resource Sharing',
1318 },
1319 corsExpose_Headers => {
1320 type => 'text',
1321 default => '*',
1322 documentation =>
1323 'Exposed headers for Cross-Origin Resource Sharing',
1324 },
1325 corsMax_Age => {
1326 type => 'text',
1327 default => '86400', # 24 hours
1328 documentation => 'Max-age for Cross-Origin Resource Sharing',
1329 },
1330 strictTransportSecurityMax_Age => {
1331 type => 'text',
1332 documentation => 'Max-age for Strict-Transport-Security',
1333 },
1334 cspDefault => {
1335 type => 'text',
1336 default => "'self'",
1337 documentation => 'Default value for Content-Security-Policy',
1338 },
1339 cspFormAction => {
1340 type => 'text',
1341 default => "*",
1342 documentation =>
1343 'Form action destination for Content-Security-Policy',
1344 },
1345 cspImg => {
1346 type => 'text',
1347 default => "'self' data:",
1348 documentation => 'Image source for Content-Security-Policy',
1349 },
1350 cspScript => {
1351 type => 'text',
1352 default => "'self'",
1353 documentation => 'Javascript source for Content-Security-Policy',
1354 },
1355 cspStyle => {
1356 type => 'text',
1357 default => "'self'",
1358 documentation => 'Style source for Content-Security-Policy',
1359 },
1360 cspConnect => {
1361 type => 'text',
1362 default => "'self'",
1363 documentation =>
1364 'Authorized Ajax destination for Content-Security-Policy',
1365 },
1366 cspFont => {
1367 type => 'text',
1368 default => "'self'",
1369 documentation => 'Font source for Content-Security-Policy',
1370 },
1371 cspFrameAncestors => {
1372 type => 'text',
1373 default => '',
1374 documentation => 'Frame-Ancestors for Content-Security-Policy',
1375 },
1376 portalAntiFrame => {
1377 default => 1,
1378 type => 'bool',
1379 documentation => 'Avoid portal to be displayed inside frames',
1380 },
1381 portalCheckLogins => {
1382 default => 1,
1383 type => 'bool',
1384 documentation => 'Display login history checkbox in portal',
1385 },
1386 randomPasswordRegexp => {
1387 type => 'pcre',
1388 default => '[A-Z]{3}[a-z]{5}.\d{2}',
1389 documentation => 'Regular expression to create a random password',
1390 },
1391 trustedBrowserUseTotp => {
1392 type => 'bool',
1393 default => 1,
1394 documentation => 'Use TOTP for trusted browser registration',
1395 },
1396 trustedBrowserRule => {
1397 type => 'boolOrExpr',
1398 default => 0,
1399 documentation => 'Trusted browser registration rule',
1400 },
1401 trustedDomains =>
1402 { type => 'text', documentation => 'Trusted domains', },
1403 storePassword => {
1404 default => 0,
1405 type => 'bool',
1406 documentation => 'Store password in session',
1407 },
1408 storePasswordEncrypted => {
1409 default => 0,
1410 type => 'bool',
1411 documentation => 'Crypt the password in session',
1412 },
1413 timeout => {
1414 type => 'int',
1415 0 ▶ test => sub { $_[0] > 0 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
1416 default => 72000,
1417 documentation => 'Session timeout on server side',
1418 },
1419 timeoutActivity => {
1420 type => 'int',
1421 0 ▶ test => sub { $_[0] >= 0 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
1422 default => 0,
1423 documentation => 'Session activity timeout on server side',
1424 },
1425 timeoutActivityInterval => {
1426 type => 'int',
1427 0 ▶ test => sub { $_[0] >= 0 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
1428 default => 60,
1429 documentation => 'Update session timeout interval on server side',
1430 },
1431 userControl => {
1432 type => 'pcre',
1433 default => '^[\w\.\-@]+$',
1434 documentation => 'Regular expression to validate login',
1435 },
1436 browsersDontStorePassword => {
1437 default => 0,
1438 type => 'bool',
1439 documentation => 'Avoid browsers to store users password',
1440 },
1441 useRedirectAjaxOnUnauthorized => {
1442 type => 'bool',
1443 default => 1,
1444 documentation =>
1445 'Redirect Ajax requests to portal for unauthorized (401)',
1446 flags => 'h',
1447 },
1448 useRedirectOnError => {
1449 type => 'bool',
1450 default => 1,
1451 documentation => 'Use 302 redirect code for error (500)',
1452 flags => 'h',
1453 },
1454 useRedirectOnForbidden => {
1455 default => 0,
1456 type => 'bool',
1457 documentation => 'Use 302 redirect code for forbidden (403)',
1458 },
1459 useSafeJail => {
1460 default => 1,
1461 type => 'bool',
1462 help => 'safejail.html',
1463 documentation => 'Activate Safe jail',
1464 flags => 'hp',
1465 },
1466 avoidAssignment => {
1467 default => 0,
1468 type => 'bool',
1469 help => 'safejail.html',
1470 documentation => 'Avoid assignment in expressions',
1471 flags => 'hp',
1472 },
1473 whatToTrace => {
1474 type => 'lmAttrOrMacro',
1475 default => 'uid',
1476 documentation => 'Session parameter used to fill REMOTE_USER',
1477 flags => 'hp',
1478 },
1479 customToTrace => {
1480 type => 'lmAttrOrMacro',
1481 documentation => 'Session parameter used to fill REMOTE_CUSTOM',
1482 flags => 'hp',
1483 },
1484 lwpOpts => {
1485 type => 'keyTextContainer',
1486 documentation => 'Options passed to LWP::UserAgent',
1487 default => { timeout => 10 },
1488 },
1489 lwpSslOpts => {
1490 type => 'keyTextContainer',
1491 documentation => 'TLS/SSL options passed to LWP::UserAgent',
1492 },
1493  
1494 # CrowdSec plugins
1495 crowdsec => {
1496 default => 0,
1497 type => 'boolOrExpr',
1498 documentation => 'CrowdSec bouncer activation',
1499 },
1500 crowdsecAction => {
1501 type => 'select',
1502 select => [
1503 { k => 'reject', v => 'Reject' },
1504 { k => 'warn', v => 'Warn' },
1505 ],
1506 default => 'reject',
1507 documentation => 'CrowdSec action',
1508 },
1509 crowdsecUrl => {
1510 type => 'url',
1511 documentation => 'Base URL of CrowdSec local API',
1512 },
1513 crowdsecKey => {
1514 type => 'text',
1515 documentation => 'CrowdSec API key',
1516 },
1517 crowdsecIgnoreFailures => {
1518 default => 0,
1519 type => 'bool',
1520 documentation => 'Ignore Crowdsec errors',
1521 },
1522 crowdsecAgent => {
1523 default => 0,
1524 type => 'boolOrExpr',
1525 documentation =>
1526 'Enable plugin to report auth failures to Crowdsec (simple alert)',
1527 },
1528 crowdsecMachineId => {
1529 type => 'text',
1530 documentation => 'Crowdsec machine ID to send alerts',
1531 },
1532 crowdsecPassword => {
1533 type => 'text',
1534 documentation => 'Crowdsec password to send alerts',
1535 },
1536 crowdsecMaxFailures => {
1537 type => 'int',
1538 documentation =>
1539 'Crowdesc-Agent maximum failures allowed during delay',
1540 },
1541 crowdsecBlockDelay => {
1542 type => 'int',
1543 documentation => 'Crowdsec-Agent check delay',
1544 },
1545 crowdsecBanDuration => {
1546 type => 'text',
1547 default => '4h',
1548 documentation => 'Crowdsec-Agent ban duration (e.g. 4h, 1d)',
1549 },
1550 crowdsecFilters => {
1551 type => 'text',
1552 documentation => 'Crowdsec filters directory',
1553 },
1554 crowdSecAgentResponseCode => {
1555 type => 'int',
1556 default => 404,
1557 documentation => 'Crowdsec ban response code',
1558 },
1559 crowdSecAgentResponseValue => {
1560 type => 'text',
1561 documentation => 'Crowdsec ban response text',
1562 },
1563  
1564 # OIDC personnal offline token removal
1565 oidcOfflineTokens => {
1566 type => 'bool',
1567 documentation => 'OIDC personnal offline token removal',
1568 },
1569  
1570 # History
1571 failedLoginNumber => {
1572 default => 5,
1573 type => 'int',
1574 documentation => 'Number of failures stored in login history',
1575 },
1576 loginHistoryEnabled => {
1577 default => 0,
1578 type => 'bool',
1579 documentation => 'Enable login history',
1580 },
1581 portalDisplayLoginHistory => {
1582 type => 'boolOrExpr',
1583 default => 1,
1584 documentation => 'Display login history tab in portal',
1585 },
1586  
1587 successLoginNumber => {
1588 default => 5,
1589 type => 'int',
1590 documentation => 'Number of success stored in login history',
1591 },
1592  
1593 # Other displays
1594 portalDisplayAppslist => {
1595 type => 'boolOrExpr',
1596 default => 1,
1597 documentation => 'Display applications tab in portal',
1598 },
1599 portalDisplayChangePassword => {
1600 type => 'boolOrExpr',
1601 default => '$_auth =~ /^(LDAP|DBI|Demo)$/',
1602 documentation => 'Display password tab in portal',
1603 },
1604 portalDisplayLogout => {
1605 type => 'boolOrExpr',
1606 default => 1,
1607 documentation => 'Display logout tab in portal',
1608 },
1609 portalDisplayCertificateResetByMail => {
1610 type => 'bool',
1611 default => 0,
1612 documentation =>
1613 'Display certificate reset by mail button in portal',
1614 },
1615 portalDisplayRegister => {
1616 default => 1,
1617 type => 'bool',
1618 documentation => 'Display register button in portal',
1619 },
1620 portalDisplayResetPassword => {
1621 default => 0,
1622 type => 'bool',
1623 documentation => 'Display reset password button in portal',
1624 },
1625 portalDisplayOfflineTokens => {
1626 'default' => '$_auth eq \'OIDC\'',
1627 'type' => 'boolOrExpr'
1628 },
1629 portalDisplayOidcConsents => {
1630 type => 'boolOrExpr',
1631 default => '$_oidcConsents && $_oidcConsents =~ /\w+/',
1632 documentation => 'Display OIDC consents tab in portal',
1633 },
1634 portalDisplayOrder => {
1635 type => 'text',
1636 default =>
1637 'Appslist ChangePassword LoginHistory OidcConsents Logout',
1638 documentation => 'List for ordering tabs in portal',
1639 },
1640 portalDisplayGeneratePassword => {
1641 default => 1,
1642 type => 'bool',
1643 documentation =>
1644 'Display password generate box in reset password form',
1645 },
1646 portalDisplayRefreshMyRights => {
1647 default => 1,
1648 type => 'bool',
1649 documentation => 'Display link to refresh the user session',
1650 },
1651 portalEnablePasswordDisplay => {
1652 default => 0,
1653 type => 'bool',
1654 documentation => 'Allow to display password in login form',
1655 },
1656 passwordResetAllowedRetries => {
1657 default => 3,
1658 type => 'int',
1659 documentation => 'Maximum number of retries to reset password',
1660 },
1661  
1662 # Cookies
1663 cookieExpiration => {
1664 type => 'intOrNull',
1665 documentation => 'SSO cookie expiration',
1666 flags => 'hp',
1667 },
1668 cookieName => {
1669 type => 'text',
1670 test => qr/^[a-zA-Z][a-zA-Z0-9_-]*$/,
1671 msgFail => '__badCookieName__',
1672 default => 'lemonldap',
1673 documentation => 'Name of the SSO cookie',
1674 flags => 'hp',
1675 },
1676 domain => {
1677 type => 'text',
1678 test =>
1679 qr/^(?:(?:$Regexp::Common::URI::RFC2396::hostname|#\w+#))?$/,
1680 msgFail => '__badDomainName__',
1681 default => 'example.com',
1682 documentation => 'DNS domain',
1683 flags => 'hp',
1684 },
1685 pdataDomain => {
1686 type => 'text',
1687 test => qr/^(?:$Regexp::Common::URI::RFC2396::hostname)?$/,
1688 msgFail => '__badDomainName__',
1689 default => '',
1690 documentation => 'pdata cookie DNS domain',
1691 flags => 'hp',
1692 },
1693 httpOnly => {
1694 default => 1,
1695 type => 'bool',
1696 documentation => 'Enable httpOnly flag in cookie',
1697 flags => 'hp',
1698 },
1699 securedCookie => {
1700 type => 'select',
1701 select => [
1702 { k => '0', v => 'unsecuredCookie' },
1703 { k => '1', v => 'securedCookie' },
1704 { k => '2', v => 'doubleCookie' },
1705 { k => '3', v => 'doubleCookieForSingleSession' },
1706 ],
1707 default => 0,
1708 documentation => 'Cookie securisation method',
1709 flags => 'hp',
1710 },
1711 hashedSessionStore => {
1712 type => 'bool',
1713 default => 0,
1714 documentation => 'Securize storage of sensible sessions',
1715 },
1716 sameSite => {
1717 type => 'select',
1718 select => [
1719 { k => '', v => '' },
1720 { k => 'Strict', v => 'Strict' },
1721 { k => 'Lax', v => 'Lax' },
1722 { k => 'None', v => 'None' },
1723 ],
1724 default => '',
1725 documentation => 'Cookie SameSite value',
1726 flags => 'hp',
1727 },
1728  
1729 # Viewer
1730 viewerHiddenKeys => {
1731 type => 'text',
1732 default => 'samlIDPMetaDataNodes, samlSPMetaDataNodes',
1733 documentation => 'Hidden Conf keys',
1734 flags => 'm',
1735 },
1736 viewerAllowBrowser => {
1737 type => 'bool',
1738 default => 0,
1739 documentation => 'Allow configuration browser',
1740 },
1741 viewerAllowDiff => {
1742 type => 'bool',
1743 default => 0,
1744 documentation => 'Allow configuration diff',
1745 },
1746  
1747 # Notification
1748 oldNotifFormat => {
1749 type => 'bool',
1750 default => 0,
1751 documentation => 'Use old XML format for notifications',
1752 },
1753 notificationWildcard => {
1754 type => 'text',
1755 default => 'allusers',
1756 documentation => 'Notification string to match all users',
1757 },
1758 publicNotifications => {
1759 default => 0,
1760 type => 'bool',
1761 documentation => 'Enable PublicNotification plugin',
1762 },
1763 notificationXSLTfile => {
1764 type => 'text',
1765 documentation => 'Custom XSLT document for notifications',
1766 },
1767 notification => {
1768 default => 0,
1769 type => 'bool',
1770 documentation => 'Notification activation',
1771 },
1772 notificationsExplorer => {
1773 default => 0,
1774 type => 'bool',
1775 documentation => 'Notifications explorer activation',
1776 },
1777 notificationsMaxRetrieve => {
1778 default => 3,
1779 type => 'int',
1780 documentation => 'Max number of displayed notifications',
1781 },
1782 notificationServer => {
1783 default => 0,
1784 type => 'bool',
1785 documentation => 'Notification server activation',
1786 },
1787 notificationDefaultCond => {
1788 type => 'text',
1789 default => '',
1790 documentation => 'Notification default condition',
1791 },
1792 notificationServerGET => {
1793 default => 0,
1794 type => 'bool',
1795 documentation => 'Notification server activation',
1796 },
1797 notificationServerPOST => {
1798 default => 1,
1799 type => 'bool',
1800 documentation => 'Notification server activation',
1801 },
1802 notificationServerDELETE => {
1803 default => 0,
1804 type => 'bool',
1805 documentation => 'Notification server activation',
1806 },
1807 notificationServerSentAttributes => {
1808 type => 'text',
1809 default => 'uid reference date title subtitle text check',
1810 documentation =>
1811 'Prameters to send with notification server GET method',
1812 flags => 'p',
1813 },
1814 notificationStorage => {
1815 type => 'PerlModule',
1816 default => 'File',
1817 documentation => 'Notification backend',
1818 },
1819 notificationStorageOptions => {
1820 type => 'keyTextContainer',
1821 default => { dirName => '/var/lib/lemonldap-ng/notifications', },
1822 documentation => 'Notification backend options',
1823 },
1824  
1825 # Captcha
1826 captcha_login_enabled => {
1827 default => 0,
1828 type => 'boolOrExpr',
1829 documentation => 'Captcha on login page',
1830 },
1831 captcha_mail_enabled => {
1832 default => 1,
1833 type => 'boolOrExpr',
1834 documentation => 'Captcha on password reset page',
1835 },
1836 captcha_register_enabled => {
1837 default => 1,
1838 type => 'boolOrExpr',
1839 documentation => 'Captcha on account creation page',
1840 },
1841 captcha_size => {
1842 type => 'int',
1843 default => 6,
1844 documentation => 'Captcha size',
1845 },
1846 captcha => {
1847 type => 'PerlModule',
1848 documentation => 'Captcha backend module',
1849 flags => 'hp',
1850 },
1851 captchaOptions => {
1852 type => 'keyTextContainer',
1853 documentation => 'Captcha module options',
1854 flags => 'hp',
1855 },
1856  
1857 # Variables
1858 exportedVars => {
1859 type => 'keyTextContainer',
1860 help => 'exportedvars.html',
1861 keyTest => qr/^!?[_a-zA-Z][a-zA-Z0-9_]*$/,
1862 keyMsgFail => '__badVariableName__',
1863 test => qr/^[_a-zA-Z][a-zA-Z0-9_:\-]*$/,
1864 msgFail => '__badValue__',
1865 default => { 'UA' => 'HTTP_USER_AGENT' },
1866 documentation => 'Main exported variables',
1867 },
1868 groups => {
1869 type => 'keyTextContainer',
1870 help =>
1871 'exportedvars.html#extend-variables-using-macros-and-groups',
1872 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
1873 default => {},
1874 documentation => 'Groups',
1875 },
1876 macros => {
1877 type => 'keyTextContainer',
1878 help =>
1879 'exportedvars.html#extend-variables-using-macros-and-groups',
1880 keyTest => qr/^[_a-zA-Z][a-zA-Z0-9_]*$/,
1881 keyMsgFail => '__badMacroName__',
1882 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
1883 default => {},
1884 documentation => 'Macros',
1885 },
1886  
1887 # Storage
1888 globalStorage => {
1889 type => 'PerlModule',
1890 default => 'Apache::Session::File',
1891 documentation => 'Session backend module',
1892 flags => 'hp',
1893 },
1894 globalStorageOptions => {
1895 type => 'keyTextContainer',
1896 default => {
1897 'Directory' => '/var/lib/lemonldap-ng/sessions/',
1898 'LockDirectory' => '/var/lib/lemonldap-ng/sessions/lock/',
1899 'generateModule' =>
1900 'Lemonldap::NG::Common::Apache::Session::Generate::SHA256',
1901 },
1902 documentation => 'Session backend module options',
1903 flags => 'hp',
1904 },
1905 localSessionStorage => {
1906 type => 'PerlModule',
1907 default => 'Cache::FileCache',
1908 documentation => 'Local sessions cache module',
1909 },
1910 localSessionStorageOptions => {
1911 type => 'keyTextContainer',
1912 default => {
1913 'namespace' => 'lemonldap-ng-sessions',
1914 'default_expires_in' => 600,
1915 'directory_umask' => '007',
1916 'cache_root' => '/var/cache/lemonldap-ng',
1917 'cache_depth' => 3,
1918 },
1919 documentation => 'Sessions cache module options',
1920 },
1921  
1922 # Persistent storage
1923 persistentStorage => {
1924 type => 'PerlModule',
1925 documentation => 'Storage module for persistent sessions'
1926 },
1927 persistentStorageOptions => {
1928 type => 'keyTextContainer',
1929 documentation => 'Options for persistent sessions storage module'
1930 },
1931 sessionDataToRemember => {
1932 type => 'keyTextContainer',
1933 keyTest => qr/^(\d+_)?[_a-zA-Z][a-zA-Z0-9_]*$/,
1934 keyMsgFail => '__invalidSessionData__',
1935 documentation => 'Data to remember in login history',
1936 },
1937 disablePersistentStorage => {
1938 default => 0,
1939 type => 'bool',
1940 documentation => 'Enabled persistent storage',
1941 },
1942  
1943 # SAML issuer
1944 issuerDBSAMLActivation => {
1945 default => 0,
1946 type => 'bool',
1947 documentation => 'SAML IDP activation',
1948 },
1949 issuerDBSAMLPath => {
1950 type => 'pcre',
1951 default => '^/saml/',
1952 documentation => 'SAML IDP request path',
1953 },
1954 issuerDBSAMLRule => {
1955 type => 'boolOrExpr',
1956 default => 1,
1957 documentation => 'SAML IDP rule',
1958 },
1959  
1960 # OpenID-Connect issuer
1961 issuerDBOpenIDConnectActivation => {
1962 type => 'bool',
1963 default => 0,
1964 documentation => 'OpenID Connect server activation',
1965 },
1966 issuerDBOpenIDConnectPath => {
1967 type => 'text',
1968 default => '^/oauth2/',
1969 documentation => 'OpenID Connect server request path',
1970 },
1971 issuerDBOpenIDConnectRule => {
1972 type => 'boolOrExpr',
1973 default => 1,
1974 documentation => 'OpenID Connect server rule',
1975 },
1976  
1977 # GET issuer
1978 issuerDBGetActivation => {
1979 type => 'bool',
1980 default => 0,
1981 documentation => 'Get issuer activation',
1982 },
1983 issuerDBGetPath => {
1984 type => 'text',
1985 default => '^/get/',
1986 documentation => 'Get issuer request path',
1987 },
1988 issuerDBGetRule => {
1989 type => 'boolOrExpr',
1990 default => 1,
1991 documentation => 'Get issuer rule',
1992 },
1993 issuerDBGetParameters => {
1994 type => 'doubleHash',
1995 default => {},
1996 keyTest => qr/^$Regexp::Common::URI::RFC2396::hostname$/,
1997 keyMsgFail => '__badHostname__',
1998 test => {
1999 keyTest => qr/^(?=[^\-])[\w\-]+(?<=[^-])$/,
2000 keyMsgFail => '__badKeyName__',
2001 0 ▶ test => sub {
Subroutine __ANON__: not called CC=6 SCAR=37.4
2002 0 my ( $val, $conf ) = @_;
2003 return 1
2004 0 ▶ if ( defined $conf->{macros}->{$val}
Branch: 1 branch
BranchTrueFalseTotal
if defined $conf->{"macros"}{$val} or $val eq "_timezone" 0 0 0
Condition0%0/3
defined $conf->{"macros"}{$val} or $val eq "_timezone"
l!l&&r!l&&!r
000
MC/DC0%0/2
defined $conf->{"macros"}{$val} or $val eq "_timezone"
defined $conf->{"macros"}{$val} $val eq "_timezone"
Truth table0%0/3
A or B
A= defined $conf->{"macros"}{$val}B= $val eq "_timezone"
ABresult
1X1
011
000
2005 or $val eq '_timezone' );
2006 0 foreach ( keys %$conf ) {
2007 return 1
2008 if ( $_ =~ /exportedvars$/i
2009 0 ▶ and defined $conf->{$_}->{$val} );
Branch: 1 branch
BranchTrueFalseTotal
if $_ =~ /exportedvars$/i and defined $conf->{$_}{$val} 0 0 0
Condition0%0/3
$_ =~ /exportedvars$/i and defined $conf->{$_}{$val}
!ll&&!rl&&r
000
MC/DC0%0/2
$_ =~ /exportedvars$/i and defined $conf->{$_}{$val}
$_ =~ /exportedvars$/i defined $conf->{$_}{$val}
Truth table0%0/3
A and B
A= $_ =~ /exportedvars$/iB= defined $conf->{$_}{$val}
ABresult
0X0
100
111
2010 }
2011 0 return ( 1, "__unknownAttrOrMacro__: $val" );
2012 },
2013 },
2014 documentation => 'List of virtualHosts with their get parameters',
2015 },
2016  
2017 # Message broker
2018 messageBroker => {
2019 type => 'select',
2020 documentation => 'Messages broker module',
2021 select => [
2022 { k => '', v => '' },
2023 { k => '::Redis', v => 'Redis' },
2024 { k => '::Pg', v => 'PostgreSQL' },
2025 { k => '::MQTT', v => 'MQTT' },
2026 { k => '::Web', v => 'Web' },
2027 ],
2028 flags => 'hp',
2029 },
2030 messageBrokerOptions => {
2031 type => 'keyTextContainer',
2032 default => {},
2033 documentation => 'Options of messages broker module',
2034 flags => 'hp',
2035 },
2036 eventQueueName => {
2037 type => 'text',
2038 default => 'llng_events',
2039 documentation => 'Event channel name',
2040 },
2041  
2042 # Jitsi Meet tokens issuer
2043 issuerDBJitsiMeetTokensActivation => {
2044 type => 'bool',
2045 default => 0,
2046 documentation => 'Jitsi issuer activation',
2047 },
2048 issuerDBJitsiMeetTokensPath => {
2049 type => 'text',
2050 default => '^/jitsi/',
2051 documentation => 'Jitsi issuer request path',
2052 },
2053 issuerDBJitsiMeetTokensRule => {
2054 type => 'boolOrExpr',
2055 default => 1,
2056 documentation => 'Jitsi issuer rule',
2057 },
2058  
2059 jitsiDefaultServer => {
2060 type => 'url',
2061 documentation => 'Jitsi server URL',
2062 },
2063 jitsiAppId => {
2064 type => 'text',
2065 documentation => 'Jitsi application ID',
2066 },
2067 jitsiAppSecret => {
2068 type => 'text',
2069 documentation => 'Jitsi application secret',
2070 },
2071 jitsiSigningAlg => {
2072 type => 'select',
2073 select => oidcSigAlgorithmAlg,
2074 default => 'RS256',
2075 documentation => 'Jitsi JWT signature method',
2076 },
2077 jitsiSigningKey => {
2078 type => 'text',
2079 default => 'default-oidc-sig, old-oidc-sig, new-oidc-sig',
2080 documentation => 'Jitsi JWT signature key',
2081 },
2082 jitsiExpiration => {
2083 type => 'int',
2084 default => '300',
2085 documentation => 'Jitsi JWT expiration',
2086 },
2087 jitsiIdAttribute => {
2088 type => 'text',
2089 documentation => 'Jitsi attribute for ID',
2090 },
2091 jitsiNameAttribute => {
2092 type => 'text',
2093 documentation => 'Jitsi attribute for name',
2094 },
2095 jitsiMailAttribute => {
2096 type => 'text',
2097 documentation => 'Jitsi attribute for email',
2098 },
2099  
2100 # Password
2101 mailOnPasswordChange => {
2102 default => 0,
2103 type => 'bool',
2104 documentation => 'Send a mail when password is changed',
2105 },
2106 portalRequireOldPassword => {
2107 default => 1,
2108 type => 'boolOrExpr',
2109 documentation =>
2110 'Rule to require old password to change the password',
2111 },
2112 hideOldPassword => {
2113 default => 1,
2114 type => 'bool',
2115 documentation => 'Hide old password in portal',
2116 },
2117 passwordPolicyActivation => {
2118 type => 'boolOrExpr',
2119 default => 1,
2120 documentation => 'Enable password policy',
2121 },
2122 passwordPolicyMinSize => {
2123 default => 0,
2124 type => 'int',
2125 documentation => 'Password policy: minimal size',
2126 },
2127 passwordPolicyMaxSize => {
2128 default => 0,
2129 type => 'int',
2130 documentation => 'Password policy: maximal size',
2131 },
2132 passwordPolicyMinLower => {
2133 default => 0,
2134 type => 'int',
2135 documentation => 'Password policy: minimal lower characters',
2136 },
2137 passwordPolicyMinUpper => {
2138 default => 0,
2139 type => 'int',
2140 documentation => 'Password policy: minimal upper characters',
2141 },
2142 passwordPolicyMinDigit => {
2143 default => 0,
2144 type => 'int',
2145 documentation => 'Password policy: minimal digit characters',
2146 },
2147 passwordPolicyMinSpeChar => {
2148 default => 0,
2149 type => 'int',
2150 documentation => 'Password policy: minimal special characters',
2151 },
2152 passwordPolicySpecialChar => {
2153 default => '__ALL__',
2154 type => 'text',
2155 test => qr/^(?:__ALL__|[\S\W]*)$/,
2156 documentation => 'Password policy: allowed special characters',
2157 },
2158 portalDisplayPasswordPolicy => {
2159 default => 0,
2160 type => 'bool',
2161 documentation => 'Display policy in password form',
2162 },
2163  
2164 # SMTP server
2165 SMTPServer => {
2166 type => 'text',
2167 default => '',
2168 test => qr/^(?:$Regexp::Common::URI::RFC2396::host(?::\d+)?)?$/,
2169 documentation => 'SMTP Server',
2170 },
2171 SMTPPort => {
2172 type => 'int',
2173 documentation => 'Fix SMTP port',
2174 },
2175 SMTPTLS => {
2176 type => 'select',
2177 default => '',
2178 select => [
2179 { k => '', v => 'none' },
2180 { k => 'starttls', v => 'SMTP + STARTTLS' },
2181 { k => 'ssl', v => 'SMTPS' },
2182 ],
2183 documentation => 'TLS protocol to use with SMTP',
2184 },
2185 SMTPTLSOpts => {
2186 type => 'keyTextContainer',
2187 documentation => 'TLS/SSL options for SMTP',
2188 },
2189 SMTPAuthUser => {
2190 type => 'text',
2191 documentation => 'Login to use to send mails',
2192 },
2193 SMTPAuthPass => {
2194 type => 'password',
2195 documentation => 'Password to use to send mails',
2196 },
2197 SMTPAuthMech => {
2198 type => 'text',
2199 default => '',
2200 test => qr/^[\w\s-]*$/,
2201 documentation => 'SASL mechanism(s) to use to send mails',
2202 },
2203  
2204 # Mails
2205 mailCharset => {
2206 type => 'text',
2207 default => 'utf-8',
2208 documentation => 'Mail charset',
2209 },
2210 mailFrom => {
2211 type => 'text',
2212 default => 'noreply@example.com',
2213 documentation => 'Sender email',
2214 },
2215 mailSessionKey => {
2216 type => 'text',
2217 default => 'mail',
2218 documentation => 'Session parameter where mail is stored',
2219 },
2220 mailReplyTo => { type => 'text', documentation => 'Reply-To address' },
2221 mailTimeout => {
2222 type => 'int',
2223 default => 0,
2224 documentation => 'Mail password reset session timeout',
2225 },
2226  
2227 # Password reset
2228 mailBody => {
2229 type => 'longtext',
2230 documentation => 'Custom password reset mail body',
2231 },
2232  
2233 mailConfirmBody => {
2234 type => 'longtext',
2235 documentation => 'Custom confirm password reset mail body',
2236 },
2237 mailConfirmSubject => {
2238 type => 'text',
2239 documentation => 'Mail subject for reset confirmation',
2240 },
2241 mailSubject => {
2242 type => 'text',
2243 documentation => 'Mail subject for new password email',
2244 },
2245  
2246 mailUrl => {
2247 type => 'url',
2248 documentation => 'URL of password reset page',
2249 },
2250  
2251 # Certificate reset by mail
2252 certificateResetByMailCeaAttribute => {
2253 type => 'text',
2254 default => 'description'
2255 },
2256 certificateResetByMailCertificateAttribute => {
2257 type => 'text',
2258 default => 'userCertificate;binary',
2259 },
2260 certificateResetByMailStep1Subject => {
2261 type => 'text',
2262 documentation => 'Mail subject for certificate reset email',
2263 },
2264 certificateResetByMailStep1Body => {
2265 type => 'longtext',
2266 documentation => 'Custom Certificate reset mail body',
2267 },
2268 certificateResetByMailStep2Subject => {
2269 type => 'text',
2270 documentation => 'Mail subject for reset confirmation',
2271 },
2272 certificateResetByMailStep2Body => {
2273 type => 'longtext',
2274 documentation => 'Custom confirm Certificate reset mail body',
2275 },
2276 certificateResetByMailURL => {
2277 type => 'url',
2278 documentation => 'URL of certificate reset page',
2279 },
2280 certificateResetByMailValidityDelay => {
2281 type => 'int',
2282 default => 0
2283 },
2284  
2285 # Registration
2286 registerConfirmSubject => {
2287 type => 'text',
2288 documentation => 'Mail subject for register confirmation',
2289 },
2290 registerConfirmBody => {
2291 type => 'longtext',
2292 documentation => 'Mail body for register confirmation',
2293 },
2294 registerDoneSubject => {
2295 type => 'text',
2296 documentation => 'Mail subject when register is done',
2297 },
2298 registerDoneBody => {
2299 type => 'longtext',
2300 documentation => 'Mail body when register is done',
2301 },
2302 registerTimeout => {
2303 default => 0,
2304 type => 'int',
2305 documentation => 'Register session timeout',
2306 },
2307 registerUrl => {
2308 type => 'url',
2309 documentation => 'URL of register page',
2310 },
2311 registerDB => {
2312 type => 'select',
2313 select => [
2314 { k => 'AD', v => 'Active Directory' },
2315 { k => 'Demo', v => 'Demonstration' },
2316 { k => 'LDAP', v => 'LDAP' },
2317 { k => 'Null', v => 'None' },
2318 { k => 'Custom', v => 'customModule' },
2319 ],
2320 default => 'Null',
2321 documentation => 'Register module',
2322 },
2323  
2324 # Upgrade session
2325 upgradeSession => {
2326 type => 'bool',
2327 default => 1,
2328 documentation => 'Upgrade session activation',
2329 },
2330 forceGlobalStorageUpgradeOTT => {
2331 type => 'bool',
2332 documentation =>
2333 'Force Upgrade tokens be stored into Global Storage',
2334 },
2335  
2336 # 2F
2337 max2FDevices => {
2338 default => 10,
2339 type => 'int',
2340 documentation => 'Maximum registered 2F devices',
2341 },
2342 max2FDevicesNameLength => {
2343 default => 20,
2344 type => 'int',
2345 documentation => 'Maximum 2F devices name length',
2346 },
2347  
2348 # Okta 2FA
2349 okta2fActivation => {
2350 type => 'boolOrExpr',
2351 default => 0,
2352 documentation => 'Okta2F activation',
2353 },
2354 okta2fAdminURL => {
2355 type => 'url',
2356 documentation => 'Okta Administration URL'
2357 },
2358 okta2fApiKey => {
2359 type => 'text',
2360 documentation => 'Okta API key'
2361 },
2362 okta2fAuthnLevel => {
2363 type => 'intOrNull',
2364 documentation =>
2365 'Authentication level for users authentified by Okta2F'
2366 },
2367 okta2fLabel => {
2368 type => 'text',
2369 documentation => 'Portal label for Okta2F'
2370 },
2371 okta2fLoginAttribute => {
2372 type => 'text',
2373 documentation => 'Session key containing Okta login'
2374 },
2375 okta2fLogo => {
2376 type => 'text',
2377 documentation => 'Custom logo for Okta 2F',
2378 },
2379  
2380 # Password 2FA
2381 password2fActivation => {
2382 type => 'boolOrExpr',
2383 default => 0,
2384 documentation => 'Password2F activation',
2385 },
2386 password2fSelfRegistration => {
2387 type => 'boolOrExpr',
2388 default => 0,
2389 documentation => 'Password2F self registration activation',
2390 },
2391 password2fAuthnLevel => {
2392 type => 'intOrNull',
2393 documentation =>
2394 'Authentication level for users authentified by Password2F'
2395 },
2396 password2fLabel => {
2397 type => 'text',
2398 documentation => 'Portal label for Password2F'
2399 },
2400 password2fLogo => {
2401 type => 'text',
2402 documentation => 'Custom logo for Password 2F',
2403 },
2404 password2fUserCanRemoveKey => {
2405 type => 'bool',
2406 default => 1,
2407 documentation =>
2408 'Authorize users to remove existing Password2F secret',
2409 },
2410 password2fTTL => {
2411 type => 'intOrNull',
2412 documentation => 'Password2F device time to live',
2413 },
2414  
2415 # TOTP second factor
2416 totp2fActivation => {
2417 type => 'boolOrExpr',
2418 default => 0,
2419 documentation => 'TOTP activation',
2420 },
2421 totp2fSelfRegistration => {
2422 type => 'boolOrExpr',
2423 default => 0,
2424 documentation => 'TOTP self registration activation',
2425 },
2426 totp2fAuthnLevel => {
2427 type => 'intOrNull',
2428 documentation =>
2429 'Authentication level for users authentified by password+TOTP'
2430 },
2431 totp2fLabel => {
2432 type => 'text',
2433 documentation => 'Portal label for TOTP 2F'
2434 },
2435 totp2fLogo => {
2436 type => 'text',
2437 documentation => 'Custom logo for TOTP 2F',
2438 },
2439 totp2fIssuer => {
2440 type => 'text',
2441 documentation => 'TOTP Issuer',
2442 },
2443 totp2fInterval => {
2444 type => 'int',
2445 default => 30,
2446 documentation => 'TOTP interval',
2447 },
2448 totp2fDigits => {
2449 type => 'int',
2450 default => 6,
2451 documentation => 'Number of digits for TOTP code',
2452 },
2453 totp2fAlgorithm => {
2454 type => 'select',
2455 select => [
2456 { k => 'sha1', v => 'SHA-1' },
2457 { k => 'sha256', v => 'SHA-256' },
2458 { k => 'sha512', v => 'SHA-512' },
2459 ],
2460 default => 'sha1',
2461 documentation => 'Hashing algorithm to use for HMAC',
2462 },
2463 totp2fRange => {
2464 type => 'int',
2465 default => 1,
2466 documentation => 'TOTP range (number of interval to test)',
2467 },
2468 totp2fUserCanRemoveKey => {
2469 type => 'bool',
2470 default => 1,
2471 documentation => 'Authorize users to remove existing TOTP secret',
2472 },
2473 totp2fTTL => {
2474 type => 'intOrNull',
2475 documentation => 'TOTP device time to live',
2476 },
2477 totp2fEncryptSecret => {
2478 type => 'bool',
2479 default => 0,
2480 documentation => 'Encrypt TOTP secrets in database',
2481 },
2482  
2483 # Mail second factor
2484 mail2fActivation => {
2485 type => 'boolOrExpr',
2486 default => 0,
2487 documentation => 'Mail second factor activation',
2488 },
2489 mail2fSubject => {
2490 type => 'text',
2491 documentation => 'Mail subject for second factor authentication',
2492 },
2493 mail2fBody => {
2494 type => 'longtext',
2495 documentation => 'Mail body for second factor authentication',
2496 },
2497 mail2fCodeRegex => {
2498 type => 'pcre',
2499 default => '\d{6}',
2500 documentation => 'Regular expression to create a mail OTP code',
2501 },
2502 mail2fTimeout => {
2503 type => 'intOrNull',
2504 documentation => 'Second factor code timeout',
2505 },
2506 mail2fResendInterval => {
2507 type => 'text',
2508 documentation => 'Delay before user is allowed to resend code',
2509 },
2510 mail2fAuthnLevel => {
2511 type => 'intOrNull',
2512 documentation =>
2513 'Authentication level for users authenticated by Mail second factor'
2514 },
2515 mail2fLabel => {
2516 type => 'text',
2517 documentation => 'Portal label for Mail second factor'
2518 },
2519 mail2fLogo => {
2520 type => 'text',
2521 documentation => 'Custom logo for Mail 2F',
2522 },
2523 mail2fSessionKey => {
2524 type => 'text',
2525 documentation => 'Session parameter where mail is stored',
2526 },
2527  
2528 # External second factor
2529 ext2fActivation => {
2530 type => 'boolOrExpr',
2531 default => 0,
2532 documentation => 'External second factor activation',
2533 },
2534 ext2fCodeActivation => {
2535 type => 'pcre',
2536 default => '\d{6}',
2537 documentation => 'OTP generated by Portal',
2538 },
2539 ext2FSendCommand => {
2540 type => 'text',
2541 documentation => 'Send command of External second factor',
2542 },
2543 ext2FValidateCommand => {
2544 type => 'text',
2545 documentation => 'Validation command of External second factor',
2546 },
2547 ext2fResendInterval => {
2548 type => 'text',
2549 documentation => 'Delay before user is allowed to resend code',
2550 },
2551 ext2fAuthnLevel => {
2552 type => 'intOrNull',
2553 documentation =>
2554 'Authentication level for users authentified by External second factor'
2555 },
2556 ext2fLabel => {
2557 type => 'text',
2558 documentation => 'Portal label for External second factor'
2559 },
2560 ext2fLogo => {
2561 type => 'text',
2562 documentation => 'Custom logo for External 2F',
2563 },
2564  
2565 # Radius second factor
2566 radius2fActivation => {
2567 type => 'boolOrExpr',
2568 default => 0,
2569 documentation => 'Radius second factor activation',
2570 },
2571 radius2fSecret => { type => 'text', },
2572 radius2fServer => { type => 'text', },
2573 radius2fUsernameSessionKey => {
2574 type => 'text',
2575 documentation => 'Session key used as Radius login'
2576 },
2577 radius2fTimeout => {
2578 type => 'int',
2579 default => 20,
2580 documentation => 'Radius 2f verification timeout',
2581 },
2582 radius2fMsgAuth => {
2583 type => 'bool',
2584 documentation => 'Use Message-Authentication for Radius requests',
2585 },
2586 radius2fSendInitialRequest => {
2587 type => 'bool',
2588 default => 0,
2589 documentation => 'Dial in to radius server before displaying form',
2590 },
2591 radius2fAuthnLevel => {
2592 type => 'intOrNull',
2593 documentation =>
2594 'Authentication level for users authenticated by Radius second factor'
2595 },
2596 radius2fLogo => {
2597 type => 'text',
2598 documentation => 'Custom logo for Radius 2F',
2599 },
2600 radius2fLabel => {
2601 type => 'text',
2602 documentation => 'Portal label for Radius 2F'
2603 },
2604  
2605 # REST External second factor
2606 rest2fActivation => {
2607 type => 'boolOrExpr',
2608 default => 0,
2609 documentation => 'REST second factor activation',
2610 },
2611 rest2fCodeActivation => {
2612 type => 'pcre',
2613 documentation => 'OTP generated by Portal',
2614 },
2615 rest2fInitUrl => {
2616 type => 'url',
2617 documentation => 'REST 2F init URL',
2618 },
2619 rest2fInitArgs => {
2620 type => 'keyTextContainer',
2621 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
2622 msgFail => '__badValue__',
2623 documentation => 'Args for REST 2F init',
2624 help => 'rest2f.html#arguments',
2625 },
2626 rest2fVerifyUrl => {
2627 type => 'url',
2628 documentation => 'REST 2F verify URL',
2629 },
2630 rest2fVerifyArgs => {
2631 type => 'keyTextContainer',
2632 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
2633 msgFail => '__badValue__',
2634 documentation => 'Args for REST 2F verify',
2635 help => 'rest2f.html#arguments',
2636 },
2637 rest2fResendInterval => {
2638 type => 'text',
2639 documentation => 'Delay before user is allowed to resend code',
2640 },
2641 rest2fAuthnLevel => {
2642 type => 'intOrNull',
2643 documentation =>
2644 'Authentication level for users authentified by REST second factor'
2645 },
2646 rest2fLabel => {
2647 type => 'text',
2648 documentation => 'Portal label for REST second factor'
2649 },
2650 rest2fLogo => {
2651 type => 'text',
2652 documentation => 'Custom logo for REST 2F',
2653 },
2654 radius2fDictionaryFile => { type => 'text' },
2655 radius2fRequestAttributes => {
2656 type => 'keyTextContainer',
2657  
2658 keyTest => qr/^[a-zA-Z0-9_-]*$/,
2659 keyMsgFail => '__badKeyName__',
2660  
2661 default => {},
2662 documentation => 'RADIUS second factor authentication attributes',
2663 },
2664  
2665 # Yubikey 2FA
2666 yubikey2fActivation => {
2667 type => 'boolOrExpr',
2668 default => 0,
2669 documentation => 'Yubikey second factor activation',
2670 },
2671 yubikey2fSelfRegistration => {
2672 type => 'boolOrExpr',
2673 default => 0,
2674 documentation => 'Yubikey self registration activation',
2675 },
2676 yubikey2fAuthnLevel => {
2677 type => 'intOrNull',
2678 documentation =>
2679 'Authentication level for users authentified by Yubikey second factor'
2680 },
2681 yubikey2fLabel => {
2682 type => 'text',
2683 documentation => 'Portal label for Yubikey second factor'
2684 },
2685 yubikey2fLogo => {
2686 type => 'text',
2687 documentation => 'Custom logo for Yubikey 2F',
2688 },
2689 yubikey2fClientID => {
2690 type => 'text',
2691 documentation => 'Yubico client ID',
2692 },
2693 yubikey2fSecretKey => {
2694 type => 'text',
2695 documentation => 'Yubico secret key',
2696 },
2697 yubikey2fNonce => {
2698 type => 'text',
2699 documentation => 'Yubico nonce',
2700 },
2701 yubikey2fUrl => {
2702 type => 'url',
2703 documentation => 'Yubico server',
2704 },
2705 yubikey2fPublicIDSize => {
2706 type => 'int',
2707 default => 12,
2708 documentation => 'Yubikey public ID size',
2709 },
2710 yubikey2fUserCanRemoveKey => {
2711 type => 'bool',
2712 default => 1,
2713 documentation => 'Authorize users to remove existing Yubikey',
2714 },
2715 yubikey2fFromSessionAttribute => {
2716 type => 'text',
2717 documentation =>
2718 'Provision yubikey from the given session variable',
2719 },
2720 yubikey2fTTL => {
2721 type => 'intOrNull',
2722 documentation => 'Yubikey device time to live',
2723 },
2724  
2725 # WebAuthn 2FA
2726 webauthn2fActivation => {
2727 type => 'boolOrExpr',
2728 default => 0,
2729 documentation => 'WebAuthn second factor activation',
2730 },
2731 webauthn2fSelfRegistration => {
2732 type => 'boolOrExpr',
2733 default => 0,
2734 documentation => 'WebAuthn self registration activation',
2735 },
2736 webauthn2fAuthnLevel => {
2737 type => 'intOrNull',
2738 documentation =>
2739 'Authentication level for users authentified by WebAuthn second factor'
2740 },
2741 webauthn2fLabel => {
2742 type => 'text',
2743 documentation => 'Portal label for WebAuthn second factor'
2744 },
2745 webauthn2fLogo => {
2746 type => 'text',
2747 documentation => 'Custom logo for WebAuthn 2F',
2748 },
2749 webauthn2fUserVerification => {
2750 type => 'select',
2751 select => [
2752 { k => 'discouraged', v => 'discouraged' },
2753 { k => 'preferred', v => 'preferred' },
2754 { k => 'required', v => 'required' },
2755 ],
2756 default => 'preferred',
2757 documentation => 'Verify user during registration and login',
2758 },
2759 webauthn2fAttestation => {
2760 type => 'select',
2761 select => [
2762 { k => 'none', v => 'None' },
2763 { k => 'direct', v => 'Direct' },
2764 { k => 'indirect', v => 'Indirect' },
2765 { k => 'enterprise', v => 'Enterprise' },
2766 ],
2767 default => 'none',
2768 documentation => 'Ask the authenticator for an attestation',
2769 },
2770 webauthn2fAttestationTrust => {
2771 type => 'file',
2772 documentation =>
2773 'Certificate bundle for attestation trust validation',
2774 },
2775 webauthn2fResidentKey => {
2776 type => 'select',
2777 select => [
2778 { k => '', v => '' },
2779 { k => 'discouraged', v => 'Discouraged' },
2780 { k => 'preferred', v => 'Preferred' },
2781 { k => 'required', v => 'Required' },
2782 ],
2783 documentation => 'Use discoverable credential',
2784 },
2785 webauthn2fUserCanRemoveKey => {
2786 type => 'bool',
2787 default => 1,
2788 documentation => 'Authorize users to remove existing WebAuthn',
2789 },
2790 webauthnDisplayNameAttr => {
2791 type => 'text',
2792 documentation => 'Session attribute containing user display name',
2793 },
2794 webauthnRpId => {
2795 type => 'text',
2796 documentation => 'WebAuthn Relying Party ID',
2797 },
2798 webauthnAppId => {
2799 type => 'bool',
2800 default => 1,
2801 documentation => 'Send AppID extension',
2802 },
2803 webauthnRpName => {
2804 type => 'text',
2805 documentation => 'WebAuthn Relying Party display name',
2806 },
2807 webauthnDefaultTransports => {
2808 type => 'text',
2809 documentation => 'WebAuthn default transports',
2810 },
2811 webauthnAuthnLevel => {
2812 type => 'int',
2813 default => 3,
2814 documentation => 'WebAuthn authentication level',
2815 },
2816  
2817 # Single session
2818 notifyDeleted => {
2819 default => 1,
2820 type => 'bool',
2821 documentation => 'Show deleted sessions in portal',
2822 },
2823 notifyOther => {
2824 default => 0,
2825 type => 'bool',
2826 documentation => 'Show other sessions in portal',
2827 },
2828 singleSession => {
2829 default => 0,
2830 type => 'boolOrExpr',
2831 documentation => 'Allow only one session per user',
2832 },
2833 singleIP => {
2834 default => 0,
2835 type => 'boolOrExpr',
2836 documentation => 'Allow only one session per IP',
2837 },
2838 singleUserByIP => {
2839 default => 0,
2840 type => 'boolOrExpr',
2841 documentation => 'Allow only one user per IP',
2842 },
2843  
2844 # REST server
2845 restSessionServer => {
2846 default => 0,
2847 type => 'bool',
2848 documentation => 'Enable REST session server',
2849 },
2850 restAuthServer => {
2851 default => 0,
2852 type => 'bool',
2853 documentation => 'Enable REST authentication server',
2854 },
2855 restPasswordServer => {
2856 default => 0,
2857 type => 'bool',
2858 documentation => 'Enable REST password reset server',
2859 },
2860 restExportSecretKeys => {
2861 default => 0,
2862 type => 'bool',
2863 documentation =>
2864 'Allow to export secret keys in REST session server',
2865 },
2866 restClockTolerance => {
2867 default => 15,
2868 type => 'int',
2869 documentation =>
2870 'How tolerant the REST session server will be to clock dift',
2871 },
2872 restConfigServer => {
2873 default => 0,
2874 type => 'bool',
2875 documentation => 'Enable REST config server',
2876 },
2877 restAuthnLevel => {
2878 type => 'int',
2879 default => 2,
2880 documentation => 'REST authentication level',
2881 },
2882  
2883 # OIDC revoke token Plugin
2884 adminLogoutServerSecret => {
2885 type => 'text',
2886 documentation => 'REST OIDC token revocation secret',
2887 },
2888  
2889 # SOAP server
2890 soapSessionServer => {
2891 default => 0,
2892 type => 'bool',
2893 help => 'soapservices.html',
2894 documentation => 'Enable SOAP session server',
2895 },
2896 soapConfigServer => {
2897 default => 0,
2898 type => 'bool',
2899 help => 'soapservices.html',
2900 documentation => 'Enable SOAP config server',
2901 },
2902 exportedAttr => {
2903 type => 'text',
2904 documentation =>
2905 'List of attributes to export by SOAP or REST servers',
2906 },
2907 wsdlServer => {
2908 default => 0,
2909 type => 'bool',
2910 documentation => 'Enable /portal.wsdl server',
2911 },
2912  
2913 # SOAP Procy client
2914 soapProxyUrn => {
2915 default => 'urn:Lemonldap/NG/Common/PSGI/SOAPService',
2916 type => 'text',
2917 documentation => 'SOAP URN for Proxy',
2918 },
2919  
2920 # AutoSignin
2921 autoSigninRules => {
2922 type => 'keyTextContainer',
2923 0 ▶ keyTest => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
2924 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
2925 help => 'autosignin.html',
2926 documentation => 'List of auto signin rules',
2927 },
2928  
2929 # Adaptative Authentication Level
2930 adaptativeAuthenticationLevelRules => {
2931 type => 'keyTextContainer',
2932 0 ▶ keyTest => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
2933 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
2934 help => "adaptativeauthenticationlevel.html",
2935 documentation => 'Adaptative authentication level rules',
2936 },
2937  
2938 # LocationDetect plugin
2939 locationDetect => {
2940 default => 0,
2941 type => 'bool',
2942 documentation => 'Enable LocationDetect plugin',
2943 },
2944 locationDetectGeoIpDatabase => {
2945 type => 'text',
2946 documentation => 'Path to GeoIP database',
2947 },
2948 locationDetectGeoIpLanguages => {
2949 default => 'en, fr',
2950 type => 'text',
2951 documentation => 'Languages for GeoIP database',
2952 },
2953 locationDetectIpDetail => {
2954 type => 'text',
2955 documentation => 'Information requested for IP',
2956 },
2957 locationDetectUaDetail => {
2958 type => 'text',
2959 documentation => 'Information requested for User Agent',
2960 },
2961  
2962 ## Virtualhosts
2963  
2964 # Fake attribute: used by manager REST API to agglomerate all other
2965 # nodes
2966 virtualHosts => {
2967 type => 'virtualHostContainer',
2968 help => 'configvhost.html',
2969 template => 'virtualHost',
2970 },
2971  
2972 locationRules => {
2973 type => 'ruleContainer',
2974 help => 'writingrulesand_headers.html#rules',
2975 test => {
2976 0 ▶ keyTest => sub {
Subroutine __ANON__: not called CC=2 SCAR=17.9
2977 0 eval { qr/$_[0]/ };
2978 0 ▶ return $@ ? 0 : 1;
Branch: 1 branch
BranchTrueFalseTotal
$@ ? : 0 0 0
2979 },
2980 keyMsgFail => '__badRegexp__',
2981 0 ▶ test => sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
2982 0 my ( $val, $conf ) = @_;
2983 0 my $s = $val;
2984 0 ▶ if ( $s =~ s/^logout(?:_(?:sso|app(?:_sso)?))?\s*// ) {
Branch: 1 branch
BranchTrueFalseTotal
if ($s =~ s/^logout(?:_(?:sso|app(?:_sso)?))?\s*//) 0 0 0
2985 0 ▶ return $s =~ m{^(?:https?://.*)?$}
Branch: 1 branch
BranchTrueFalseTotal
$s =~ m[^(?:https?://.*)?$] ? : 0 0 0
2986 ? (1)
2987 : ( 0, '__badUrl__' );
2988 }
2989 0 $s =~ s/\b(accept|deny|unprotect|skip)\b/1/g;
2990 0 return &perlExpr( $s, $conf );
2991 },
2992 msgFail => '__badExpression__',
2993 },
2994 keyTest => qr/^\S+$/,
2995 keyMsgFail => '__badHostname__',
2996 default => { default => 'deny', },
2997 documentation => 'Virtualhost rules',
2998 flags => 'h',
2999 },
3000 exportedHeaders => {
3001 type => 'keyTextContainer',
3002 help => 'writingrulesand_headers.html#headers',
3003 keyTest => qr/^\S+$/,
3004 keyMsgFail => '__badHostname__',
3005 test => {
3006 keyTest => qr/^(?=[^\-])[\w\-]+(?<=[^-])$/,
3007 keyMsgFail => '__badHeaderName__',
3008 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
3009 },
3010 documentation => 'Virtualhost headers',
3011 flags => 'h',
3012 },
3013 post => {
3014 type => 'postContainer',
3015 help => 'formreplay.html',
3016 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
3017 keyTest => qr/^\S+$/,
3018 keyMsgFail => '__badHostname__',
3019 documentation => 'Virtualhost urls/Data to post',
3020 },
3021  
3022 vhostOptions => { type => 'subContainer', },
3023 vhostPort => {
3024 type => 'int',
3025 default => -1,
3026 },
3027 vhostHttps => {
3028 type => 'trool',
3029 default => -1,
3030 },
3031 vhostMaintenance => {
3032 type => 'bool',
3033 default => 0,
3034 },
3035 vhostServiceTokenTTL => {
3036 type => 'int',
3037 default => -1,
3038 },
3039 vhostComment => {
3040 type => 'longtext',
3041 default => '',
3042 },
3043 vhostAccessToTrace => { type => 'text', default => '' },
3044 vhostAliases => { type => 'text', default => '' },
3045 vhostType => {
3046 type => 'select',
3047 select => [
3048 { k => 'AuthBasic', v => 'AuthBasic' },
3049 { k => 'CDA', v => 'CDA' },
3050 { k => 'DevOps', v => 'DevOps' },
3051 { k => 'DevOpsST', v => 'DevOpsST' },
3052 { k => 'DevOpsCDA', v => 'DevOpsCDA' },
3053 { k => 'Main', v => 'Main' },
3054 { k => 'OAuth2', v => 'OAuth2' },
3055 { k => 'SecureToken', v => 'SecureToken' },
3056 { k => 'ServiceToken', v => 'ServiceToken' },
3057 { k => 'ZimbraPreAuth', v => 'ZimbraPreAuth' },
3058 ],
3059 default => 'Main',
3060 documentation => 'Handler type',
3061 },
3062 vhostAuthnLevel => { type => 'intOrNull' },
3063 vhostDevOpsRulesUrl => { type => 'url' },
3064  
3065 # SecureToken parameters
3066 secureTokenAllowOnError => {
3067 type => 'text',
3068 documentation => 'Secure Token allow requests in error',
3069 flags => 'h',
3070 },
3071 secureTokenAttribute => {
3072 type => 'text',
3073 documentation => 'Secure Token attribute',
3074 flags => 'h',
3075 },
3076 secureTokenExpiration => {
3077 type => 'text',
3078 documentation => 'Secure Token expiration',
3079 flags => 'h',
3080 },
3081 secureTokenHeader => {
3082 type => 'text',
3083 documentation => 'Secure Token header',
3084 flags => 'h',
3085 },
3086 secureTokenMemcachedServers => {
3087 type => 'text',
3088 documentation => 'Secure Token Memcached servers',
3089 flags => 'h',
3090 },
3091 secureTokenUrls => {
3092 type => 'text',
3093 documentation => '',
3094 flags => 'h',
3095 },
3096  
3097 # Zimbra handler parameters
3098 zimbraAccountKey => {
3099 type => 'text',
3100 flags => 'h',
3101 documentation => 'Zimbra account session key',
3102 },
3103 zimbraBy => {
3104 type => 'text',
3105 flags => 'h',
3106 documentation => 'Zimbra account type',
3107 },
3108 zimbraPreAuthKey => {
3109 type => 'text',
3110 flags => 'h',
3111 documentation => 'Zimbra preauthentication key',
3112 },
3113 zimbraSsoUrl => {
3114 type => 'text',
3115 flags => 'h',
3116 documentation => 'Zimbra local SSO URL pattern',
3117 },
3118 zimbraUrl => {
3119 type => 'text',
3120 flags => 'h',
3121 documentation => 'Zimbra preauthentication URL',
3122 },
3123  
3124 # CAS IDP
3125 casAttr =>
3126 { type => 'text', documentation => 'Pivot attribute for CAS', },
3127 casAttributes => {
3128 type => 'keyTextContainer',
3129 documentation => 'CAS exported attributes',
3130 },
3131 casAccessControlPolicy => {
3132 type => 'select',
3133 select => [
3134 { k => 'none', v => 'None' },
3135 { k => 'error', v => 'Display error on portal' },
3136 { k => 'faketicket', v => 'Send a fake service ticket' },
3137 ],
3138 default => 'none',
3139 documentation => 'CAS access control policy',
3140 },
3141 casStorage => {
3142 type => 'PerlModule',
3143 documentation => 'Apache::Session module to store CAS user data',
3144 },
3145 casStorageOptions => {
3146 type => 'keyTextContainer',
3147 documentation => 'Apache::Session module parameters',
3148 },
3149 casStrictMatching => {
3150 default => 0,
3151 type => 'bool',
3152 documentation => 'Disable host-based matching of CAS services',
3153 },
3154 casTicketExpiration => {
3155 default => 0,
3156 type => 'int',
3157 documentation => 'Expiration time of Service and Proxy tickets',
3158 },
3159 casBackChannelSingleLogout => {
3160 default => 0,
3161 type => 'bool',
3162 documentation => 'Enable CAS (Back-Channel) Single Logout',
3163 },
3164 issuerDBCASActivation => {
3165 default => 0,
3166 type => 'bool',
3167 documentation => 'CAS server activation',
3168 },
3169 issuerDBCASPath => {
3170 type => 'pcre',
3171 default => '^/cas/',
3172 documentation => 'CAS server request path',
3173 },
3174 issuerDBCASRule => {
3175 type => 'boolOrExpr',
3176 default => 1,
3177 documentation => 'CAS server rule',
3178 },
3179  
3180 # Partners
3181 casAppMetaDataOptions => {
3182 type => 'subContainer',
3183 documentation => 'Root of CAS app options',
3184 },
3185 casAppMetaDataExportedVars => {
3186 type => 'keyTextContainer',
3187 default => { cn => 'cn', mail => 'mail', uid => 'uid', },
3188 documentation => 'CAS exported variables',
3189 },
3190 casAppMetaDataOptionsAuthnLevel => {
3191 type => 'text',
3192 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
3193 documentation =>
3194 'Authentication level requires to access to this CAS application',
3195 },
3196 casAppMetaDataOptionsComment => {
3197 type => 'longtext',
3198 documentation => 'Comment for this CAS application',
3199 },
3200 casAppMetaDataOptionsDisplayName => {
3201 type => 'text',
3202 },
3203 casAppMetaDataOptionsLogout => {
3204 type => 'trool',
3205 default => -1,
3206 },
3207 casAppMetaDataOptionsRule => {
3208 type => 'text',
3209 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
3210 documentation => 'CAS application rule',
3211 },
3212 casAppMetaDataOptionsService => {
3213 type => 'text',
3214 documentation => 'CAS application service',
3215 },
3216 casSrvMetaDataOptionsSamlValidate => {
3217 type => 'bool',
3218 documentation => 'use SAML validateion',
3219 },
3220 casAppMetaDataOptionsUserAttribute => {
3221 type => 'text',
3222 documentation => 'CAS User attribute',
3223 },
3224 casAppMetaDataOptionsAllowProxy => {
3225 type => 'bool',
3226 documentation => 'Allow CAS proxy',
3227 default => 1,
3228 },
3229 casAppMetaDataOptionsActivation => {
3230 type => 'bool',
3231 documentation => 'Activate CAS application',
3232 default => 1,
3233 },
3234 casAppMetaDataMacros => {
3235 type => 'keyTextContainer',
3236 help =>
3237 'exportedvars.html#extend-variables-using-macros-and-groups',
3238 test => {
3239 keyTest => qr/^[_a-zA-Z][a-zA-Z0-9_]*$/,
3240 keyMsgFail => '__badMacroName__',
3241 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
3242 },
3243 default => {},
3244 documentation => 'Macros',
3245 },
3246  
3247 # Fake attribute: used by manager REST API to agglomerate all nodes
3248 # related to a CAS SP partner
3249 casAppMetaDataNodes => {
3250 type => 'casAppMetaDataNodeContainer',
3251 template => 'casAppMetaDataNode',
3252 help => 'idpcas.html#configuring-cas-applications',
3253 },
3254  
3255 # OpenID Issuer
3256 issuerDBOpenIDActivation => {
3257 default => 0,
3258 type => 'bool',
3259 documentation => 'OpenID server activation',
3260 },
3261 issuerDBOpenIDPath => {
3262 type => 'pcre',
3263 default => '^/openidserver/',
3264 documentation => 'OpenID server request path',
3265 },
3266 issuerDBOpenIDRule => {
3267 type => 'boolOrExpr',
3268 default => 1,
3269 documentation => 'OpenID server rule',
3270 },
3271  
3272 openIdIssuerSecret => { type => 'text', },
3273 openIdAttr => { type => 'text', },
3274 openIdSreg_fullname => {
3275 type => 'lmAttrOrMacro',
3276 default => 'cn',
3277 documentation => 'OpenID SREG fullname session parameter',
3278 },
3279 openIdSreg_nickname => {
3280 type => 'lmAttrOrMacro',
3281 default => 'uid',
3282 documentation => 'OpenID SREG nickname session parameter',
3283 },
3284 openIdSreg_language => { type => 'lmAttrOrMacro', },
3285 openIdSreg_postcode => { type => 'lmAttrOrMacro', },
3286 openIdSreg_timezone => {
3287 type => 'lmAttrOrMacro',
3288 default => '_timezone',
3289 documentation => 'OpenID SREG timezone session parameter',
3290 },
3291 openIdSreg_country => { type => 'lmAttrOrMacro', },
3292 openIdSreg_gender => { type => 'lmAttrOrMacro', },
3293 openIdSreg_email => {
3294 type => 'lmAttrOrMacro',
3295 default => 'mail',
3296 documentation => 'OpenID SREG email session parameter',
3297 },
3298 openIdSreg_dob => { type => 'lmAttrOrMacro', },
3299 openIdSPList => { type => 'blackWhiteList', default => '0;' },
3300  
3301 #########
3302 ## SAML #
3303 #########
3304 samlEntityID => {
3305 type => 'text',
3306 default => '#PORTAL#/saml/metadata',
3307 documentation => 'SAML service entityID',
3308 },
3309 samlOrganizationDisplayName => {
3310 type => 'text',
3311 default => 'Example',
3312 documentation => 'SAML service organization display name',
3313 },
3314 samlOrganizationName => {
3315 type => 'text',
3316 default => 'Example',
3317 documentation => 'SAML service organization name',
3318 },
3319 samlOrganizationURL => {
3320 type => 'text',
3321 default => 'http://www.example.com',
3322 documentation => 'SAML service organization URL',
3323 },
3324 samlNameIDFormatMapEmail => {
3325 type => 'text',
3326 default => 'mail',
3327 documentation => 'SAML session parameter for NameID email',
3328 },
3329 samlNameIDFormatMapX509 => {
3330 type => 'text',
3331 default => 'mail',
3332 documentation => 'SAML session parameter for NameID x509',
3333 },
3334 samlNameIDFormatMapWindows => {
3335 type => 'text',
3336 default => 'uid',
3337 documentation => 'SAML session parameter for NameID windows',
3338 },
3339 samlNameIDFormatMapKerberos => {
3340 type => 'text',
3341 default => 'uid',
3342 documentation => 'SAML session parameter for NameID kerberos',
3343 },
3344 samlAttributeAuthorityDescriptorAttributeServiceSOAP => {
3345 type => 'samlService',
3346 default => 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
3347 . '#PORTAL#/saml/AA/SOAP;',
3348 documentation => 'SAML Attribute Authority SOAP',
3349 },
3350 samlServicePrivateKeySig => {
3351 type => 'RSAPrivateKey',
3352 default => '',
3353 documentation => 'SAML signature private key',
3354 },
3355 samlServicePrivateKeySigPwd => {
3356 type => 'password',
3357 default => '',
3358 documentation => 'SAML signature private key password',
3359 },
3360 samlServicePublicKeySig => {
3361 type => 'RSAPublicKeyOrCertificate',
3362 default => '',
3363 documentation => 'SAML signature public key',
3364 },
3365 samlServicePrivateKeyEnc => {
3366 type => 'RSAPrivateKey',
3367 default => '',
3368 documentation => 'SAML encryption private key',
3369 },
3370 samlServicePrivateKeyEncPwd => { type => 'password', },
3371 samlServicePublicKeyEnc => {
3372 type => 'RSAPublicKeyOrCertificate',
3373 default => '',
3374 documentation => 'SAML encryption public key',
3375 },
3376 samlServiceSignatureMethod => {
3377 type => 'select',
3378 select => [
3379 { k => 'RSA_SHA1', v => 'RSA SHA1' },
3380 { k => 'RSA_SHA256', v => 'RSA SHA256' },
3381 { k => 'RSA_SHA384', v => 'RSA SHA384' },
3382 { k => 'RSA_SHA512', v => 'RSA SHA512' },
3383 ],
3384 default => 'RSA_SHA256',
3385 },
3386 samlServiceSignatureKey => {
3387 type => 'text',
3388 default => 'default-saml-sig',
3389 documentation => 'Key to use for SAML signature',
3390 },
3391 samlServiceEncryptionKey => {
3392 type => 'text',
3393 default => 'default-saml-enc',
3394 documentation => 'Key to use for SAML encryption',
3395 },
3396 samlServiceUseCertificateInResponse => {
3397 type => 'bool',
3398 default => 0,
3399 documentation =>
3400 'Use certificate instead of public key in SAML responses',
3401 },
3402 samlMetadataForceUTF8 => {
3403 default => 1,
3404 type => 'bool',
3405 documentation => 'SAML force metadata UTF8 conversion',
3406 },
3407 samlStorage => {
3408 type => 'PerlModule',
3409 documentation => 'Apache::Session module to store SAML user data',
3410 },
3411 samlStorageOptions => {
3412 type => 'keyTextContainer',
3413 documentation => 'Apache::Session module parameters',
3414 },
3415 samlAuthnContextMapExtra => {
3416 type => 'keyTextContainer',
3417 keyTest => qr/\w/,
3418 documentation => 'SAML extra authn contexts',
3419 },
3420 samlAuthnContextMapPassword => {
3421 type => 'int',
3422 default => 2,
3423 documentation => 'SAML authn context password level',
3424 },
3425 samlAuthnContextMapPasswordProtectedTransport => {
3426 type => 'int',
3427 default => 3,
3428 documentation =>
3429 'SAML authn context password protected transport level',
3430 },
3431 samlAuthnContextMapTLSClient => {
3432 type => 'int',
3433 default => 5,
3434 documentation => 'SAML authn context TLS client level',
3435 },
3436 samlAuthnContextMapKerberos => {
3437 type => 'int',
3438 default => 4,
3439 documentation => 'SAML authn context kerberos level',
3440 },
3441 samlCommonDomainCookieActivation => {
3442 default => 0,
3443 type => 'bool',
3444 documentation => 'SAML CDC activation',
3445 },
3446 samlCommonDomainCookieDomain => {
3447 type => 'text',
3448 test => qr/^$Regexp::Common::URI::RFC2396::hostname$/,
3449 msgFail => '__badDomainName__',
3450 },
3451 samlCommonDomainCookieReader => {
3452 type => 'text',
3453 test => $url,
3454 msgFail => '__badUrl__',
3455 },
3456 samlCommonDomainCookieWriter => {
3457 type => 'text',
3458 test => $url,
3459 msgFail => '__badUrl__',
3460 },
3461 samlDiscoveryProtocolActivation => {
3462 default => 0,
3463 type => 'bool',
3464 documentation => 'SAML Discovery Protocol activation',
3465 },
3466 samlDiscoveryProtocolURL => {
3467 type => 'text',
3468 test => $url,
3469 msgFail => '__badUrl__',
3470 documentation => 'SAML Discovery Protocol EndPoint URL',
3471 },
3472 samlDiscoveryProtocolPolicy => {
3473 type => 'text',
3474 documentation => 'SAML Discovery Protocol Policy',
3475 },
3476 samlDiscoveryProtocolIsPassive => {
3477 default => 0,
3478 type => 'bool',
3479 documentation => 'SAML Discovery Protocol Is Passive',
3480 },
3481 samlFederationFiles => {
3482 type => 'text',
3483 documentation => 'Path to SAML Federation Metadata',
3484 },
3485 samlRelayStateTimeout => {
3486 type => 'int',
3487 default => 600,
3488 documentation => 'SAML timeout of relay state',
3489 },
3490 samlOverrideIDPEntityID => {
3491 type => 'text',
3492 documentation => 'Override SAML EntityID when acting as an IDP',
3493 default => '',
3494 },
3495 samlUseQueryStringSpecific => {
3496 default => 0,
3497 type => 'bool',
3498 documentation => 'SAML use specific method for query_string',
3499 },
3500 samlIDPSSODescriptorWantAuthnRequestsSigned => {
3501 type => 'bool',
3502 default => 1,
3503 documentation => 'SAML IDP want authn request signed',
3504 },
3505 samlIDPSSODescriptorSingleSignOnServiceHTTPRedirect => {
3506 type => 'samlService',
3507 default => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
3508 . '#PORTAL#/saml/singleSignOn;',
3509 documentation => 'SAML IDP SSO HTTP Redirect',
3510 },
3511 samlIDPSSODescriptorSingleSignOnServiceHTTPPost => {
3512 type => 'samlService',
3513 default => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;'
3514 . '#PORTAL#/saml/singleSignOn;',
3515 documentation => 'SAML IDP SSO HTTP POST',
3516 },
3517 samlIDPSSODescriptorSingleSignOnServiceHTTPArtifact => {
3518 type => 'samlService',
3519 default => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;'
3520 . '#PORTAL#/saml/singleSignOnArtifact;',
3521 documentation => 'SAML IDP SSO HTTP Artifact',
3522 },
3523 samlIDPSSODescriptorSingleLogoutServiceHTTPRedirect => {
3524 type => 'samlService',
3525 default => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
3526 . '#PORTAL#/saml/singleLogout;'
3527 . '#PORTAL#/saml/singleLogoutReturn',
3528 documentation => 'SAML IDP SLO HTTP Redirect',
3529 },
3530 samlIDPSSODescriptorSingleLogoutServiceHTTPPost => {
3531 type => 'samlService',
3532 default => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;'
3533 . '#PORTAL#/saml/singleLogout;'
3534 . '#PORTAL#/saml/singleLogoutReturn',
3535 documentation => 'SAML IDP SLO HTTP POST',
3536 },
3537 samlIDPSSODescriptorSingleLogoutServiceSOAP => {
3538 type => 'samlService',
3539 default => 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
3540 . '#PORTAL#/saml/singleLogoutSOAP;',
3541 documentation => 'SAML IDP SLO SOAP',
3542 },
3543 samlIDPSSODescriptorArtifactResolutionServiceArtifact => {
3544 type => 'samlAssertion',
3545 default => '1;0;urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
3546 . '#PORTAL#/saml/artifact',
3547 documentation => 'SAML IDP artifact resolution service',
3548 },
3549  
3550 # Fake attribute: used by manager REST API to agglomerate all nodes
3551 # related to a SAML IDP partner
3552 samlIDPMetaDataNodes => {
3553 type => 'samlIDPMetaDataNodeContainer',
3554 template => 'samlIDPMetaDataNode',
3555 help => 'authsaml.html',
3556 },
3557  
3558 # Fake attribute: used by manager REST API to agglomerate all nodes
3559 # related to a SAML SP partner
3560 samlSPMetaDataNodes => {
3561 type => 'samlSPMetaDataNodeContainer',
3562 template => 'samlSPMetaDataNode',
3563 help => 'idpsaml.html',
3564 },
3565  
3566 # TODO: split that
3567 # IDP Keys
3568 samlIDPMetaDataExportedAttributes => {
3569 type => 'samlAttributeContainer',
3570 help => 'authsaml.html#exported-attributes',
3571 keyTest => qr/^[a-zA-Z](?:[a-zA-Z0-9_\-\.]*\w)?$/,
3572 keyMsgFail => '__badMetadataName__',
3573 test => qr/\w/,
3574 msgFail => '__badValue__',
3575 default => {},
3576 },
3577 samlIDPMetaDataXML => {
3578 type => 'file',
3579 },
3580 samlIDPMetaDataOptionsURL => {
3581 type => 'url',
3582 },
3583 samlIDPMetaDataOptions => {
3584 type => 'keyTextContainer',
3585 keyTest => qr/^[a-zA-Z](?:[a-zA-Z0-9_\-\.]*\w)?$/,
3586 keyMsgFail => '__badMetadataName__',
3587 },
3588 samlIDPMetaDataOptionsFederationEntityID => {
3589 type => 'text',
3590 },
3591 samlIDPMetaDataOptionsNameIDFormat => {
3592 type => 'select',
3593 select => [
3594 { k => '', v => '' },
3595 { k => 'unspecified', v => 'Unspecified' },
3596 { k => 'email', v => 'Email' },
3597 { k => 'x509', v => 'X509 certificate' },
3598 { k => 'windows', v => 'Windows' },
3599 { k => 'kerberos', v => 'Kerberos' },
3600 { k => 'entity', v => 'Entity' },
3601 { k => 'persistent', v => 'Persistent' },
3602 { k => 'transient', v => 'Transient' },
3603 { k => 'encrypted', v => 'Encrypted' },
3604 ],
3605 default => '',
3606 },
3607 samlIDPMetaDataOptionsForceAuthn => {
3608 type => 'bool',
3609 default => 0,
3610 },
3611 samlIDPMetaDataOptionsIsPassive => {
3612 type => 'bool',
3613 default => 0,
3614 },
3615 samlIDPMetaDataOptionsAllowLoginFromIDP => {
3616 type => 'bool',
3617 default => 0,
3618 },
3619 samlIDPMetaDataOptionsRequestedAuthnContext => {
3620 type => 'select',
3621 select => [
3622 { k => '', v => '' },
3623 { k => 'kerberos', v => 'Kerberos' },
3624 {
3625 k => 'password-protected-transport',
3626 v => 'Password protected transport'
3627 },
3628 { k => 'password', v => 'Password' },
3629 { k => 'tls-client', v => 'TLS client certificate' },
3630 ],
3631 default => '',
3632 },
3633 samlIDPMetaDataOptionsAdaptSessionUtime => {
3634 type => 'bool',
3635 default => 0,
3636 },
3637 samlIDPMetaDataOptionsCheckSSOMessageSignature => {
3638 type => 'bool',
3639 default => 1,
3640 },
3641 samlIDPMetaDataOptionsComment => {
3642 type => 'longtext'
3643 },
3644 samlIDPMetaDataOptionsForceUTF8 => {
3645 type => 'bool',
3646 default => 0,
3647 },
3648 samlIDPMetaDataOptionsSignSSOMessage => {
3649 type => 'trool',
3650 default => -1,
3651 },
3652 samlIDPMetaDataOptionsSignSLOMessage => {
3653 type => 'trool',
3654 default => -1,
3655 },
3656 samlIDPMetaDataOptionsSignatureMethod => {
3657 type => 'select',
3658 select => [
3659 { k => '', v => 'default' },
3660 { k => 'RSA_SHA1', v => 'RSA SHA1' },
3661 { k => 'RSA_SHA256', v => 'RSA SHA256' },
3662 { k => 'RSA_SHA384', v => 'RSA SHA384' },
3663 { k => 'RSA_SHA512', v => 'RSA SHA512' },
3664 ],
3665 default => '',
3666 },
3667 samlIDPMetaDataOptionsSignatureKey => {
3668 type => 'text',
3669 default => '',
3670 },
3671 samlIDPMetaDataOptionsCheckSLOMessageSignature => {
3672 type => 'bool',
3673 default => 1,
3674 },
3675 samlIDPMetaDataOptionsSSOBinding => {
3676 type => 'select',
3677 select => [
3678 { k => '', v => '' },
3679 { k => 'http-post', v => 'POST' },
3680 { k => 'http-redirect', v => 'Redirect' },
3681 { k => 'artifact-get', v => 'Artifact GET' },
3682 ],
3683 default => '',
3684 },
3685 samlIDPMetaDataOptionsSLOBinding => {
3686 type => 'select',
3687 select => [
3688 { k => '', v => '' },
3689 { k => 'http-post', v => 'POST' },
3690 { k => 'http-redirect', v => 'Redirect' },
3691 { k => 'http-soap', v => 'SOAP' },
3692 ],
3693 default => '',
3694 },
3695 samlIDPMetaDataOptionsEncryptionMode => {
3696 type => 'select',
3697 select => [
3698 { k => 'none', v => 'None' },
3699 { k => 'nameid', v => 'Name ID' },
3700 { k => 'assertion', v => 'Assertion' },
3701 ],
3702 default => 'none',
3703 },
3704 samlIDPMetaDataOptionsCheckTime => {
3705 type => 'bool',
3706 default => 1,
3707 },
3708 samlIDPMetaDataOptionsCheckAudience => {
3709 type => 'bool',
3710 default => 1,
3711 },
3712 samlIDPMetaDataOptionsResolutionRule => {
3713 type => 'longtext',
3714 default => '',
3715 },
3716 samlIDPMetaDataOptionsStoreSAMLToken => {
3717 type => 'bool',
3718 default => 0,
3719 },
3720 samlIDPMetaDataOptionsRelayStateURL => {
3721 type => 'bool',
3722 default => 0,
3723 },
3724 samlIDPMetaDataOptionsUserAttribute => { type => 'text', },
3725 samlIDPMetaDataOptionsDisplayName => { type => 'text', },
3726 samlIDPMetaDataOptionsIcon => { type => 'text', },
3727 samlIDPMetaDataOptionsTooltip => { type => 'text', },
3728 samlIDPMetaDataOptionsSortNumber => { type => 'int', },
3729  
3730 # SP keys
3731 samlSPMetaDataExportedAttributes => {
3732 type => 'samlAttributeContainer',
3733 help => 'idpsaml.html#exported-attributes',
3734 keyTest => qr/^[a-zA-Z](?:[a-zA-Z0-9_\-\.]*\w)?$/,
3735 keyMsgFail => '__badMetadataName__',
3736 test => qr/\w/,
3737 msgFail => '__badValue__',
3738 default => {},
3739 },
3740 samlSPMetaDataXML => { type => 'file', },
3741 samlSPMetaDataOptionsActivation => {
3742 type => 'bool',
3743 default => 1,
3744 },
3745 samlSPMetaDataOptionsURL => {
3746 type => 'url',
3747 },
3748 samlSPMetaDataOptions => {
3749 type => 'keyTextContainer',
3750 keyTest => qr/^[a-zA-Z](?:[a-zA-Z0-9_\-\.]*\w)?$/,
3751 keyMsgFail => '__badMetadataName__',
3752 },
3753 samlSPMetaDataOptionsFederationEntityID => {
3754 type => 'text',
3755 },
3756 samlSPMetaDataOptionsFederationOptionalAttributes => {
3757 type => 'select',
3758 select =>
3759 [ { k => '', v => 'keep' }, { k => 'ignore', v => 'ignore' }, ],
3760 default => '',
3761 },
3762 samlSPMetaDataOptionsFederationRequiredAttributes => {
3763 type => 'select',
3764 select => [
3765 { k => '', v => 'keep' },
3766 { k => 'optional', v => 'makeoptional' },
3767 { k => 'ignore', v => 'ignore' },
3768 ],
3769 default => '',
3770 },
3771 samlSPSSODescriptorAuthnRequestsSigned => {
3772 default => 1,
3773 type => 'bool',
3774 documentation => 'SAML SP AuthnRequestsSigned',
3775 },
3776 samlSPSSODescriptorWantAssertionsSigned => {
3777 default => 1,
3778 type => 'bool',
3779 documentation => 'SAML SP WantAssertionsSigned',
3780 },
3781 samlSPSSODescriptorSingleLogoutServiceHTTPRedirect => {
3782 type => 'samlService',
3783 default => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect;'
3784 . '#PORTAL#/saml/proxySingleLogout;'
3785 . '#PORTAL#/saml/proxySingleLogoutReturn',
3786 documentation => 'SAML SP SLO HTTP Redirect',
3787 },
3788 samlSPSSODescriptorSingleLogoutServiceHTTPPost => {
3789 type => 'samlService',
3790 default => 'urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;'
3791 . '#PORTAL#/saml/proxySingleLogout;'
3792 . '#PORTAL#/saml/proxySingleLogoutReturn',
3793 documentation => 'SAML SP SLO HTTP POST',
3794 },
3795 samlSPSSODescriptorSingleLogoutServiceSOAP => {
3796 type => 'samlService',
3797 default => 'urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
3798 . '#PORTAL#/saml/proxySingleLogoutSOAP;',
3799 documentation => 'SAML SP SLO SOAP',
3800 },
3801 samlSPSSODescriptorAssertionConsumerServiceHTTPArtifact => {
3802 type => 'samlAssertion',
3803 default =>
3804 '0;1;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact;'
3805 . '#PORTAL#/saml/proxySingleSignOnArtifact',
3806 documentation => 'SAML SP ACS HTTP artifact',
3807 },
3808 samlSPSSODescriptorAssertionConsumerServiceHTTPPost => {
3809 type => 'samlAssertion',
3810 default => '1;0;urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST;'
3811 . '#PORTAL#/saml/proxySingleSignOnPost',
3812 documentation => 'SAML SP ACS HTTP POST',
3813 },
3814 samlSPSSODescriptorArtifactResolutionServiceArtifact => {
3815 type => 'samlAssertion',
3816 default => '1;0;urn:oasis:names:tc:SAML:2.0:bindings:SOAP;'
3817 . '#PORTAL#/saml/artifact',
3818 documentation => 'SAML SP artifact resolution service',
3819 },
3820 samlSPMetaDataOptionsComment => {
3821 type => 'longtext'
3822 },
3823 samlSPMetaDataOptionsNameIDFormat => {
3824 type => 'select',
3825 select => [
3826 { k => '', v => '' },
3827 { k => 'unspecified', v => 'Unspecified' },
3828 { k => 'email', v => 'Email' },
3829 { k => 'x509', v => 'X509 certificate' },
3830 { k => 'windows', v => 'Windows' },
3831 { k => 'kerberos', v => 'Kerberos' },
3832 { k => 'entity', v => 'Entity' },
3833 { k => 'persistent', v => 'Persistent' },
3834 { k => 'transient', v => 'Transient' },
3835 { k => 'encrypted', v => 'Encrypted' },
3836 ],
3837 default => '',
3838 },
3839 samlSPMetaDataOptionsForceNameIDFormat => { type => 'bool' },
3840 samlSPMetaDataOptionsNameIDSessionKey => { type => 'text' },
3841 samlSPMetaDataOptionsNotOnOrAfterTimeout => {
3842 type => 'int',
3843 default => 72000,
3844 },
3845 samlSPMetaDataOptionsOneTimeUse => {
3846 type => 'bool',
3847 default => 0,
3848 },
3849 samlSPMetaDataOptionsSessionNotOnOrAfterTimeout => {
3850 type => 'int',
3851 default => 72000,
3852 },
3853 samlSPMetaDataOptionsSignSSOMessage => {
3854 type => 'trool',
3855 default => -1,
3856 },
3857 samlSPMetaDataOptionsSignatureMethod => {
3858 type => 'select',
3859 select => [
3860 { k => '', v => 'default' },
3861 { k => 'RSA_SHA1', v => 'RSA SHA1' },
3862 { k => 'RSA_SHA256', v => 'RSA SHA256' },
3863 { k => 'RSA_SHA384', v => 'RSA SHA384' },
3864 { k => 'RSA_SHA512', v => 'RSA SHA512' },
3865 ],
3866 default => '',
3867 },
3868 samlSPMetaDataOptionsSignatureKey => {
3869 type => 'text',
3870 default => '',
3871 },
3872 samlSPMetaDataOptionsCheckSSOMessageSignature => {
3873 type => 'bool',
3874 default => 1,
3875 },
3876 samlSPMetaDataOptionsSignSLOMessage => {
3877 type => 'trool',
3878 default => -1,
3879 },
3880 samlSPMetaDataOptionsCheckSLOMessageSignature => {
3881 type => 'bool',
3882 default => 1,
3883 },
3884 samlSPMetaDataOptionsEncryptionMode => {
3885 type => 'select',
3886 select => [
3887 { k => 'none', v => 'None' },
3888 { k => 'nameid', v => 'Name ID' },
3889 { k => 'assertion', v => 'Assertion' },
3890 ],
3891 default => 'none',
3892 },
3893 samlSPMetaDataOptionsEnableIDPInitiatedURL => {
3894 type => 'bool',
3895 default => 0,
3896 },
3897 samlSPMetaDataOptionsForceUTF8 => {
3898 type => 'bool',
3899 default => 1,
3900 },
3901 samlSPMetaDataOptionsAuthnLevel => {
3902 type => 'text',
3903 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
3904 documentation =>
3905 'Authentication level requires to access to this SP',
3906 },
3907 samlSPMetaDataOptionsRule => {
3908 type => 'text',
3909 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
3910 documentation => 'Rule to grant access to this SP',
3911 },
3912 samlSPMetaDataMacros => {
3913 type => 'keyTextContainer',
3914 help =>
3915 'exportedvars.html#extend-variables-using-macros-and-groups',
3916 test => {
3917 keyTest => qr/^[_a-zA-Z][a-zA-Z0-9_]*$/,
3918 keyMsgFail => '__badMacroName__',
3919 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
3920 },
3921 default => {},
3922 documentation => 'Macros',
3923 },
3924  
3925 # AUTH, USERDB and PASSWORD MODULES
3926 authentication => {
3927 type => 'select',
3928 select => [
3929 { k => 'Apache', v => 'Apache' },
3930 { k => 'AD', v => 'Active Directory' },
3931 { k => 'DBI', v => 'Database (DBI)' },
3932 { k => 'Facebook', v => 'Facebook' },
3933 { k => 'GitHub', v => 'GitHub' },
3934 { k => 'GPG', v => 'GPG' },
3935 { k => 'Kerberos', v => 'Kerberos' },
3936 { k => 'LDAP', v => 'LDAP' },
3937 { k => 'LinkedIn', v => 'LinkedIn' },
3938 { k => 'PAM', v => 'PAM' },
3939 { k => 'Radius', v => 'Radius' },
3940 { k => 'REST', v => 'REST' },
3941 { k => 'SSL', v => 'mTLS' },
3942 { k => 'Twitter', v => 'Twitter' },
3943 { k => 'WebID', v => 'WebID (deprecated)' },
3944 { k => 'WebAuthn', v => 'WebAuthn' },
3945 { k => 'Demo', v => 'Demonstration' },
3946 { k => 'Choice', v => 'authChoice' },
3947 { k => 'Combination', v => 'combineMods' },
3948 { k => 'CAS', v => 'Central Authentication Service (CAS)' },
3949 { k => 'OpenID', v => 'OpenID 2.0 (deprecated)' },
3950 { k => 'OpenIDConnect', v => 'OpenID Connect' },
3951 { k => 'SAML', v => 'SAML v2' },
3952 { k => 'Proxy', v => 'Proxy' },
3953 { k => 'Remote', v => 'Remote' },
3954 { k => 'Slave', v => 'Slave' },
3955 { k => 'Null', v => 'None' },
3956 { k => 'Custom', v => 'customModule' },
3957 ],
3958 default => 'Demo',
3959 documentation => 'Authentication module',
3960 },
3961 userDB => {
3962 type => 'select',
3963 select => [
3964 { k => 'Same', v => 'Same' },
3965 { k => 'AD', v => 'Active Directory' },
3966 { k => 'DBI', v => 'Database (DBI)' },
3967 { k => 'LDAP', v => 'LDAP' },
3968 { k => 'REST', v => 'REST' },
3969 { k => 'Null', v => 'None' },
3970 { k => 'Custom', v => 'customModule' },
3971 ],
3972 default => 'Same',
3973 documentation => 'User module',
3974 },
3975 passwordDB => {
3976 type => 'select',
3977 select => [
3978 { k => 'AD', v => 'Active Directory' },
3979 { k => 'Choice', v => 'authChoice' },
3980 { k => 'DBI', v => 'Database (DBI)' },
3981 { k => 'Demo', v => 'Demonstration' },
3982 { k => 'LDAP', v => 'LDAP' },
3983 { k => 'REST', v => 'REST' },
3984 { k => 'Null', v => 'None' },
3985 { k => 'Combination', v => 'combineMods' },
3986 { k => 'Custom', v => 'customModule' },
3987 ],
3988 default => 'Demo',
3989 documentation => 'Password module',
3990 },
3991  
3992 # Second Factor Engine
3993 sfEngine => {
3994 type => 'text',
3995 default => '::2F::Engines::Default',
3996 documentation => 'Second factor engine',
3997 },
3998 sfRetries => {
3999 type => 'intOrNull',
4000 documentation => 'Allowed number of retries',
4001 },
4002 sfRequired => {
4003 type => 'boolOrExpr',
4004 default => 0,
4005 help => 'secondfactor.html',
4006 documentation => 'Second factor required',
4007 },
4008 sfOnlyUpgrade => {
4009 type => 'bool',
4010 default => 0,
4011 help => 'secondfactor.html',
4012 documentation => 'Only trigger second factor on session upgrade',
4013 },
4014 sfManagerRule => {
4015 type => 'boolOrExpr',
4016 default => 1,
4017 help => 'secondfactor.html',
4018 documentation => 'Rule to display second factor Manager link',
4019 },
4020 sfRemovedMsgRule => {
4021 type => 'boolOrExpr',
4022 default => 0,
4023 help => 'secondfactor.html',
4024 documentation =>
4025 'Display a message if at leat one expired SF has been removed',
4026 },
4027 sfRemovedUseNotif => {
4028 default => 0,
4029 type => 'bool',
4030 documentation => 'Use Notifications plugin to display message',
4031 },
4032 sfRemovedNotifRef => {
4033 type => 'text',
4034 default => 'RemoveSF',
4035 help => 'secondfactor.html',
4036 documentation => 'Notification reference',
4037 },
4038 sfRemovedNotifTitle => {
4039 type => 'text',
4040 default => 'Second factor notification',
4041 help => 'secondfactor.html',
4042 documentation => 'Notification title',
4043 },
4044 sfRemovedNotifMsg => {
4045 type => 'text',
4046 default =>
4047 '_removedSF_ expired second factor(s) has/have been removed (_nameSF_)!',
4048 help => 'secondfactor.html',
4049 documentation => 'Notification message',
4050 },
4051 sfLoginTimeout => {
4052 type => 'intOrNull',
4053 documentation => 'Timeout for 2F login process',
4054 },
4055 sfRegisterTimeout => {
4056 type => 'intOrNull',
4057 documentation => 'Timeout for 2F registration process',
4058 },
4059 available2F => {
4060 type => 'text',
4061 default => join( ',',
4062 qw/TOTP REST Mail2F Ext2F WebAuthn Yubikey Radius Password Okta/
4063 ),
4064 documentation => 'Available second factor modules',
4065 },
4066 available2FSelfRegistration => {
4067 type => 'text',
4068 default => join( ',', qw/Password TOTP WebAuthn Yubikey/ ),
4069 documentation =>
4070 'Available self-registration modules for second factor',
4071 },
4072  
4073 # DEMO
4074 demoExportedVars => {
4075 type => 'keyTextContainer',
4076 keyTest => qr/^!?[a-zA-Z][a-zA-Z0-9_-]*$/,
4077 keyMsgFail => '__badVariableName__',
4078 test => qr/^[a-zA-Z][a-zA-Z0-9_:\-]*$/,
4079 msgFail => '__badValue__',
4080 default => { cn => 'cn', mail => 'mail', uid => 'uid', },
4081 documentation => 'Demo exported variables',
4082 },
4083  
4084 # AD
4085 ADPwdExpireWarning => {
4086 type => 'int',
4087 default => 0,
4088 documentation => 'AD password expire warning',
4089 },
4090 ADPwdMaxAge => {
4091 type => 'int',
4092 default => 0,
4093 documentation => 'AD password max age',
4094 },
4095  
4096 # LDAP
4097 managerDn => {
4098 type => 'text',
4099 test => qr/^.*$/,
4100 msgFail => '__badValue__',
4101 default => '',
4102 documentation => 'LDAP manager DN',
4103 },
4104 managerPassword => {
4105 type => 'password',
4106 test => qr/^\S*$/,
4107 msgFail => '__badValue__',
4108 default => '',
4109 documentation => 'LDAP manager Password',
4110 },
4111 ldapAuthnLevel => {
4112 type => 'int',
4113 default => 2,
4114 documentation => 'LDAP authentication level',
4115 },
4116 ldapBase => {
4117 type => 'text',
4118 test => qr/^(?:\w+=.*|)$/,
4119 msgFail => '__badValue__',
4120 default => 'dc=example,dc=com',
4121 documentation => 'LDAP search base',
4122 },
4123 ldapExportedVars => {
4124 type => 'keyTextContainer',
4125 keyTest => qr/^!?[a-zA-Z][a-zA-Z0-9_-]*$/,
4126 keyMsgFail => '__badVariableName__',
4127 test => qr/^[a-zA-Z][a-zA-Z0-9_:\-]*$/,
4128 msgFail => '__badValue__',
4129 default => { cn => 'cn', mail => 'mail', uid => 'uid', },
4130 documentation => 'LDAP exported variables',
4131 },
4132 ldapPort => {
4133 type => 'intOrNull',
4134 documentation => 'LDAP port',
4135 },
4136 ldapServer => {
4137 type => 'text',
4138 0 ▶ test => sub {
Subroutine __ANON__: not called CC=3 SCAR=24.8
4139 0 my $l = shift;
4140 0 my (@s) = split( /[\s,]+/, $l );
4141 0 foreach my $s (@s) {
4142 0 ▶ $s =~
Branch: 1 branch
BranchTrueFalseTotal
$s =~ m[^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?::\d{1,5})?/?.*)$] or return 0, qq[__badLdapUri__: "$s"] 0 0 0
4143 m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?::\d{1,5})?/?.*)$}
4144 or return ( 0, "__badLdapUri__: \"$s\"" );
4145 }
4146 0 return 1;
4147 },
4148 default => 'ldap://localhost',
4149 documentation => 'LDAP server (host or URI)',
4150 },
4151 ldapPwdEnc => {
4152 type => 'text',
4153 test => qr/^[a-zA-Z0-9_][a-zA-Z0-9_\-]*[a-zA-Z0-9_]$/,
4154 msgFail => '__badEncoding__',
4155 default => 'utf-8',
4156 documentation => 'LDAP password encoding',
4157 },
4158 ldapForcePasswordChangeExpirationWarning => {
4159 type => 'intOrNull',
4160 documentation =>
4161 'Delay to force password change if password is about to expire',
4162 },
4163 ldapUsePasswordResetAttribute => {
4164 type => 'bool',
4165 default => 1,
4166 documentation => 'LDAP store reset flag in an attribute',
4167 },
4168 ldapPasswordResetAttribute => {
4169 type => 'text',
4170 default => 'pwdReset',
4171 documentation => 'LDAP password reset attribute',
4172 },
4173 ldapPasswordResetAttributeValue => {
4174 type => 'text',
4175 default => 'TRUE',
4176 documentation => 'LDAP password reset value',
4177 },
4178 ldapPpolicyControl => {
4179 default => 0,
4180 type => 'bool',
4181 },
4182 ldapSetPassword => {
4183 default => 0,
4184 type => 'bool',
4185 },
4186 ldapChangePasswordAsUser => {
4187 default => 0,
4188 type => 'bool',
4189 },
4190 ldapGetUserBeforePasswordChange => {
4191 default => 0,
4192 type => 'bool',
4193 },
4194 ldapSearchDeref => {
4195 type => 'select',
4196 select => [
4197 { k => 'never', v => 'never' },
4198 { k => 'search', v => 'search' },
4199 { k => 'find', v => 'find' },
4200 { k => 'always', v => 'always' }
4201 ],
4202 default => 'find',
4203 documentation => '"deref" param of Net::LDAP::search()',
4204 },
4205 mailLDAPFilter => {
4206 type => 'text',
4207 documentation => 'LDAP filter for mail search'
4208 },
4209 LDAPFilter =>
4210 { type => 'text', documentation => 'Default LDAP filter' },
4211 AuthLDAPFilter => {
4212 type => 'text',
4213 documentation => 'LDAP filter for auth search'
4214 },
4215 groupLDAPFilter => {
4216 type => 'text',
4217 documentation => 'LDAP filter for group search'
4218 },
4219 ldapGroupDecodeSearchedValue => {
4220 default => 0,
4221 type => 'bool',
4222 documentation => 'Decode value before searching it in LDAP groups',
4223 },
4224 ldapGroupRecursive => {
4225 default => 0,
4226 type => 'bool',
4227 documentation => 'LDAP recursive search in groups',
4228 },
4229 ldapGroupObjectClass => {
4230 type => 'text',
4231 default => 'groupOfNames',
4232 documentation => 'LDAP object class of groups',
4233 },
4234 ldapGroupBase => { type => 'text', },
4235 ldapGroupAttributeName => {
4236 type => 'text',
4237 default => 'member',
4238 documentation => 'LDAP attribute name for member in groups',
4239 },
4240 ldapGroupAttributeNameUser => {
4241 type => 'text',
4242 default => 'dn',
4243 documentation =>
4244 'LDAP attribute name in user entry referenced as member in groups',
4245 },
4246 ldapGroupAttributeNameSearch => {
4247 type => 'text',
4248 default => 'cn',
4249 documentation => 'LDAP attributes to search in groups',
4250 },
4251 ldapGroupAttributeNameGroup => {
4252 type => 'text',
4253 default => 'dn',
4254 documentation =>
4255 'LDAP attribute name in group entry referenced as member in groups',
4256 },
4257 ldapTimeout => {
4258 type => 'int',
4259 default => 10,
4260 documentation => 'LDAP connection timeout',
4261 },
4262 ldapIOTimeout => {
4263 type => 'int',
4264 default => 10,
4265 documentation => 'LDAP operation timeout',
4266 },
4267 ldapVersion => {
4268 type => 'int',
4269 default => 3,
4270 documentation => 'LDAP protocol version',
4271 },
4272 ldapRaw => { type => 'text', },
4273 ldapAllowResetExpiredPassword => {
4274 default => 0,
4275 type => 'bool',
4276 documentation => 'Allow a user to reset his expired password',
4277 },
4278 ldapITDS => {
4279 default => 0,
4280 type => 'bool',
4281 documentation => 'Support for IBM Tivoli Directory Server',
4282 },
4283 ldapVerify => {
4284 type => 'bool',
4285 documentation => 'Whether to validate LDAP certificates',
4286 type => "select",
4287 select => [
4288 { k => 'none', v => 'None' },
4289 { k => 'optional', v => 'Optional' },
4290 { k => 'require', v => 'Require' },
4291 ],
4292 default => 'require',
4293 },
4294 ldapCAFile => {
4295 type => 'text',
4296 documentation =>
4297 'Location of the certificate file for LDAP connections',
4298 },
4299 ldapCAPath => {
4300 type => 'text',
4301 documentation =>
4302 'Location of the CA directory for LDAP connections',
4303 },
4304 ldapClientCert => {
4305 type => 'text',
4306 documentation =>
4307 'Location of the client certificate file for LDAP connections',
4308 },
4309 ldapClientKey => {
4310 type => 'text',
4311 documentation =>
4312 'Location of the client private key for LDAP connections',
4313 },
4314  
4315 # SSL
4316 SSLAuthnLevel => {
4317 type => 'int',
4318 default => 5,
4319 documentation => 'Mutual TLS authentication level',
4320 },
4321 SSLVar => {
4322 type => 'text',
4323 default => 'SSL_CLIENT_S_DN_Email'
4324 },
4325 SSLIssuerVar => {
4326 type => 'text',
4327 default => 'SSL_CLIENT_I_DN'
4328 },
4329 SSLVarIf => {
4330 type => 'keyTextContainer',
4331 0 ▶ keyTest => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
4332 default => {}
4333 },
4334 sslByAjax => {
4335 type => 'bool',
4336 default => 0,
4337 documentation => 'Use Ajax request for Mutual TLS Authentication',
4338 },
4339 sslHost => {
4340 type => 'url',
4341 documentation => 'URL for Mutual TLS Authentication Ajax request',
4342 },
4343  
4344 # CAS
4345 casAuthnLevel => {
4346 type => 'int',
4347 default => 1,
4348 documentation => 'CAS authentication level',
4349 },
4350 casSrvMetaDataExportedVars => {
4351 type => 'keyTextContainer',
4352 default => { cn => 'cn', mail => 'mail', uid => 'uid', },
4353 documentation => 'CAS exported variables',
4354 },
4355 casSrvMetaDataOptions => {
4356 type => 'subContainer',
4357 documentation => 'Root of CAS server options',
4358 },
4359 casSrvMetaDataOptionsGateway => { type => 'bool', default => 0 },
4360 casSrvMetaDataOptionsProxiedServices => {
4361 type => 'keyTextContainer',
4362 keyTest => qr/^\w/,
4363 keyMsgFail => '__badCasProxyId__',
4364 },
4365 casSrvMetaDataOptionsRenew => { type => 'bool', default => 0 },
4366 casSrvMetaDataOptionsUrl => {
4367 type => 'text',
4368 test => $url,
4369 msgFail => '__badUrl__',
4370 },
4371 casSrvMetaDataOptionsComment => {
4372 type => 'longtext',
4373 documentation => 'Comment for this CAS server',
4374 },
4375 casSrvMetaDataOptionsDisplayName => {
4376 type => 'text',
4377 documentation => 'Name to display for this CAS server',
4378 },
4379 casSrvMetaDataOptionsIcon => {
4380 type => 'text',
4381 documentation => 'Path of CAS server icon',
4382 },
4383 casSrvMetaDataOptionsSortNumber => {
4384 type => 'int',
4385 documentation => 'Number to sort buttons',
4386 },
4387 casSrvMetaDataOptionsResolutionRule => {
4388 type => 'longtext',
4389 default => '',
4390 },
4391 casSrvMetaDataOptionsTooltip => {
4392 type => 'text',
4393 documentation => 'Tooltip for this CAS Server',
4394 },
4395  
4396 # Fake attribute: used by manager REST API to agglomerate all nodes
4397 # related to a CAS IDP partner
4398 casSrvMetaDataNodes => {
4399 type => 'casSrvMetaDataNodeContainer',
4400 template => 'casSrvMetaDataNode',
4401 help => 'authcas.html',
4402 },
4403  
4404 # PAM
4405 pamAuthnLevel => {
4406 type => 'int',
4407 default => 2,
4408 documentation => 'PAM authentication level',
4409 },
4410 pamService => {
4411 type => 'text',
4412 default => 'login',
4413 documentation => 'PAM service',
4414 },
4415  
4416 # GPG
4417 gpgDb => {
4418 type => 'text',
4419 default => '',
4420 documentation => 'GPG keys database',
4421 },
4422 gpgAuthnLevel => {
4423 type => 'int',
4424 default => 5,
4425 documentation => 'GPG authentication level',
4426 },
4427  
4428 # Radius
4429 radiusAuthnLevel => {
4430 type => 'int',
4431 default => 3,
4432 documentation => 'Radius authentication level',
4433 },
4434 radiusSecret => { type => 'text' },
4435 radiusServer => { type => 'text' },
4436 radiusTimeout => {
4437 type => 'intOrNull',
4438 },
4439 radiusMsgAuth => {
4440 type => 'bool',
4441 documentation => 'Use Message-Authentication for Radius requests',
4442 },
4443 radiusExportedVars => {
4444 type => 'keyTextContainer',
4445  
4446 # session key name
4447 keyTest => qr/^!?[a-zA-Z][a-zA-Z0-9_-]*$/,
4448 keyMsgFail => '__badVariableName__',
4449  
4450 # radius attribue name (from discitonary)
4451 test => qr/^[a-zA-Z][a-zA-Z0-9_:\-]*$/,
4452 msgFail => '__badValue__',
4453 default => {},
4454 documentation => 'RADIUS exported variables',
4455 },
4456 radiusDictionaryFile => { type => 'text' },
4457 radiusRequestAttributes => {
4458 type => 'keyTextContainer',
4459  
4460 keyTest => qr/^[a-zA-Z0-9_-]*$/,
4461 keyMsgFail => '__badKeyName__',
4462  
4463 default => {},
4464 documentation => 'RADIUS authentication attributes',
4465 },
4466  
4467 # REST
4468 restAuthUrl => { type => 'url' },
4469 restAuthArgs => {
4470 type => 'keyTextContainer',
4471 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
4472 msgFail => '__badValue__',
4473 documentation => 'Extra args for REST Auth request',
4474 help => 'authrest.html#rest-args',
4475 },
4476 restUserDBUrl => { type => 'url' },
4477 restUserDBArgs => {
4478 type => 'keyTextContainer',
4479 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
4480 msgFail => '__badValue__',
4481 documentation => 'Extra args for REST UserDB request',
4482 help => 'authrest.html#rest-args',
4483 },
4484 restFindUserDBUrl => { type => 'url' },
4485 restFindUserDBArgs => {
4486 type => 'keyTextContainer',
4487 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
4488 msgFail => '__badValue__',
4489 documentation => 'Extra args for REST FindUser request',
4490 help => 'authrest.html#rest-args',
4491 },
4492  
4493 restPwdConfirmUrl => { type => 'url' },
4494 restPwdConfirmArgs => {
4495 type => 'keyTextContainer',
4496 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
4497 msgFail => '__badValue__',
4498 documentation => 'Extra args for REST password confirm request',
4499 help => 'authrest.html#rest-args',
4500 },
4501 restPwdModifyUrl => { type => 'url' },
4502 restPwdModifyArgs => {
4503 type => 'keyTextContainer',
4504 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
4505 msgFail => '__badValue__',
4506 documentation => 'Extra args for REST password modify request',
4507 help => 'authrest.html#rest-args',
4508 },
4509  
4510 # Remote
4511 remoteCookieName => {
4512 type => 'text',
4513 test => qr/^[a-zA-Z][a-zA-Z0-9_-]*$/,
4514 msgFail => '__badCookieName__',
4515 documentation => 'Name of the remote portal cookie',
4516 flags => 'p',
4517 },
4518 remotePortal => { type => 'text' },
4519 remoteGlobalStorage => {
4520 type => 'PerlModule',
4521 default => 'Lemonldap::NG::Common::Apache::Session::SOAP',
4522 documentation => 'Remote session backend',
4523 },
4524 remoteGlobalStorageOptions => {
4525 type => 'keyTextContainer',
4526 default => {
4527 proxy => 'http://auth.example.com/sessions',
4528 ns =>
4529 'http://auth.example.com/Lemonldap/NG/Common/PSGI/SOAPService',
4530 },
4531 documentation => 'Apache::Session module parameters',
4532 },
4533  
4534 # Proxy
4535 proxyAuthService => { type => 'text' },
4536 proxySessionService => { type => 'text' },
4537 proxyAuthServiceChoiceValue => { type => 'text' },
4538 proxyAuthServiceChoiceParam => {
4539 type => 'text',
4540 default => 'lmAuth'
4541 },
4542 proxyAuthServiceImpersonation => {
4543 type => 'bool',
4544 default => 0,
4545 documentation => 'Enable internal portal Impersonation',
4546 },
4547 proxyCookieName => {
4548 type => 'text',
4549 test => qr/^[a-zA-Z][a-zA-Z0-9_-]*$/,
4550 msgFail => '__badCookieName__',
4551 documentation => 'Name of the internal portal cookie',
4552 flags => 'p',
4553 },
4554 proxyUseSoap => {
4555 type => 'bool',
4556 default => 0,
4557 documentation => 'Use SOAP instead of REST',
4558 },
4559 proxyAuthnLevel => {
4560 type => 'int',
4561 default => 2,
4562 documentation => 'Proxy authentication level',
4563 },
4564  
4565 # OpenID
4566 openIdAuthnLevel => {
4567 type => 'int',
4568 default => 1,
4569 documentation => 'OpenID authentication level',
4570 },
4571 openIdSecret => { type => 'text', },
4572 openIdExportedVars => {
4573 type => 'keyTextContainer',
4574 keyTest => qr/^!?[a-zA-Z][a-zA-Z0-9_-]*$/,
4575 keyMsgFail => '__badVariableName__',
4576 test => qr/^[a-zA-Z][a-zA-Z0-9_:\-]*$/,
4577 msgFail => '__badValue__',
4578 default => {},
4579 documentation => 'OpenID exported variables',
4580 },
4581 'openIdIDPList' => { 'type' => 'blackWhiteList', default => '0;' },
4582  
4583 # Facebook
4584 facebookAuthnLevel => {
4585 type => 'int',
4586 default => 1,
4587 documentation => 'Facebook authentication level',
4588 },
4589 facebookAppId => { type => 'text', },
4590 facebookAppSecret => { type => 'text', },
4591 facebookExportedVars => {
4592 type => 'keyTextContainer',
4593 keyTest => qr/^!?[a-zA-Z][a-zA-Z0-9_-]*$/,
4594 keyMsgFail => '__badVariableName__',
4595 test => qr/^[a-zA-Z][a-zA-Z0-9_:\-]*$/,
4596 msgFail => '__badValue__',
4597 default => {},
4598 documentation => 'Facebook exported variables',
4599 },
4600 facebookUserField => { type => 'text', default => 'id' },
4601  
4602 # Twitter
4603 twitterAuthnLevel => {
4604 type => 'int',
4605 default => 1,
4606 documentation => 'Twitter authentication level',
4607 },
4608 twitterKey => { type => 'text', },
4609 twitterSecret => { type => 'text', },
4610 twitterAppName => { type => 'text', },
4611 twitterUserField => { type => 'text', default => 'screen_name' },
4612  
4613 # LinkedIn
4614 linkedInAuthnLevel => {
4615 type => 'int',
4616 default => 1,
4617 documentation => 'LinkedIn authentication level',
4618 },
4619 linkedInClientID => { type => 'text', },
4620 linkedInClientSecret => { type => 'password', },
4621 linkedInFields => {
4622 type => 'text',
4623 default => 'id,first-name,last-name,email-address'
4624 },
4625 linkedInUserField => { type => 'text', default => 'emailAddress' },
4626 linkedInScope =>
4627 { type => 'text', default => 'r_liteprofile r_emailaddress' },
4628  
4629 # GitHub
4630 githubAuthnLevel => {
4631 type => 'int',
4632 default => 1,
4633 documentation => 'GitHub authentication level',
4634 },
4635 githubClientID => { type => 'text', },
4636 githubClientSecret => { type => 'password', },
4637 githubScope => { type => 'text', default => 'user:email' },
4638 githubUserField => { type => 'text', default => 'login' },
4639  
4640 # WebID
4641 webIDAuthnLevel => {
4642 type => 'int',
4643 default => 1,
4644 documentation => 'WebID authentication level',
4645 },
4646 webIDWhitelist => { type => 'text', },
4647 webIDExportedVars => {
4648 type => 'keyTextContainer',
4649 keyTest => qr/^!?[a-zA-Z][a-zA-Z0-9_-]*$/,
4650 keyMsgFail => '__badVariableName__',
4651 test => qr/^[a-zA-Z][a-zA-Z0-9_:\-]*$/,
4652 msgFail => '__badValue__',
4653 default => {},
4654 documentation => 'WebID exported variables',
4655 },
4656  
4657 # DBI
4658 dbiAuthnLevel => {
4659 type => 'int',
4660 default => 2,
4661 documentation => 'DBI authentication level',
4662 },
4663 dbiAuthChain => { type => 'text', },
4664 dbiAuthUser => { type => 'text', },
4665 dbiAuthPassword => { type => 'password', },
4666 dbiAuthTable => { type => 'text', },
4667 dbiUserTable => { type => 'text', },
4668  
4669 # TODO: add dbiMailCol
4670 dbiAuthLoginCol => { type => 'text', },
4671 dbiAuthPasswordCol => { type => 'text', },
4672 dbiPasswordMailCol => { type => 'text', },
4673 userPivot => { type => 'text', },
4674 dbiAuthPasswordHash =>
4675 { type => 'text', help => 'authdbi.html#password', },
4676 dbiDynamicHashEnabled =>
4677 { type => 'bool', help => 'authdbi.html#password', },
4678 dbiDynamicHashValidSchemes =>
4679 { type => 'text', help => 'authdbi.html#password', },
4680 dbiDynamicHashValidSaltedSchemes =>
4681 { type => 'text', help => 'authdbi.html#password', },
4682 dbiDynamicHashNewPasswordScheme =>
4683 { type => 'text', help => 'authdbi.html#password', },
4684 dbiExportedVars => {
4685 type => 'keyTextContainer',
4686 keyTest => qr/^!?[a-zA-Z][a-zA-Z0-9_-]*$/,
4687 keyMsgFail => '__badVariableName__',
4688 test => qr/^[a-zA-Z][a-zA-Z0-9_:\-]*$/,
4689 msgFail => '__badValue__',
4690 default => {},
4691 documentation => 'DBI exported variables',
4692 },
4693  
4694 # Apache
4695 apacheAuthnLevel => {
4696 type => 'int',
4697 default => 3,
4698 documentation => 'Apache authentication level',
4699 },
4700  
4701 # Null
4702 nullAuthnLevel => {
4703 type => 'int',
4704 default => 0,
4705 documentation => 'Null authentication level',
4706 },
4707  
4708 # Kerberos
4709 krbKeytab => {
4710 type => 'text',
4711 documentation => 'Kerberos keytab',
4712 },
4713 krbByJs => {
4714 type => 'bool',
4715 default => 0,
4716 documentation => 'Launch Kerberos authentication by Ajax',
4717 },
4718 krbAuthnLevel => {
4719 type => 'int',
4720 default => 3,
4721 documentation => 'Null authentication level',
4722 },
4723 krbRemoveDomain => {
4724 type => 'bool',
4725 default => 1,
4726 documentation => 'Remove domain in Kerberos username',
4727 },
4728 krbAllowedDomains => {
4729 type => 'text',
4730 documentation => 'Allowed domains',
4731 },
4732  
4733 # Slave
4734 slaveAuthnLevel => {
4735 type => 'int',
4736 default => 2,
4737 documentation => 'Slave authentication level',
4738 },
4739 slaveUserHeader => { type => 'text', },
4740 slaveCertificateField => { type => 'text', },
4741 slaveCertificateRegexp => {
4742 type => 'pcre',
4743 default => '',
4744 documentation => 'Regular expression to test Slave var',
4745 },
4746 slaveExportedVars => {
4747 type => 'keyTextContainer',
4748 keyTest => qr/^!?[a-zA-Z][a-zA-Z0-9_-]*$/,
4749 keyMsgFail => '__badVariableName__',
4750 test => qr/^[a-zA-Z][a-zA-Z0-9_:\-]*$/,
4751 msgFail => '__badValue__',
4752 default => {},
4753 documentation => 'Slave exported variables',
4754 },
4755 slaveMasterIP => {
4756 type => 'text',
4757 test => qr/^($Regexp::Common::URI::RFC2396::IPv4address\s*)*$/,
4758 msgFail => '__badIPv4Address__',
4759 },
4760 slaveHeaderName => { type => 'text', },
4761 slaveHeaderContent => { type => 'text', },
4762 slaveDisplayLogo => {
4763 type => 'bool',
4764 default => 0,
4765 documentation => 'Display Slave authentication logo',
4766 },
4767  
4768 # Choice
4769 authChoiceParam => {
4770 type => 'text',
4771 default => 'lmAuth',
4772 documentation => 'Applications list',
4773 },
4774 authChoiceAuthBasic => {
4775 type => 'text',
4776 documentation => 'Auth module used by AuthBasic handler',
4777 },
4778 authChoiceFindUser => {
4779 type => 'text',
4780 documentation => 'Auth module used by FindUser plugin',
4781 },
4782 authChoiceSelectOnly => {
4783 type => 'bool',
4784 default => 0,
4785 documentation => 'Automatically select only available choice',
4786 },
4787 authChoiceModules => {
4788 type => 'authChoiceContainer',
4789 keyTest => qr/^(\d*)?[a-zA-Z0-9_]+$/,
4790 keyMsgFail => '__badChoiceKey__',
4791 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
4792 select => [ [
4793 { k => 'Apache', v => 'Apache' },
4794 { k => 'AD', v => 'Active Directory' },
4795 {
4796 k => 'CAS',
4797 v => 'Central Authentication Service (CAS)'
4798 },
4799 { k => 'DBI', v => 'Database (DBI)' },
4800 { k => 'Demo', v => 'Demo' },
4801 { k => 'Facebook', v => 'Facebook' },
4802 { k => 'GitHub', v => 'GitHub' },
4803 { k => 'GPG', v => 'GPG' },
4804 { k => 'Kerberos', v => 'Kerberos' },
4805 { k => 'LDAP', v => 'LDAP' },
4806 { k => 'LinkedIn', v => 'LinkedIn' },
4807 { k => 'PAM', v => 'PAM' },
4808 { k => 'Null', v => 'None' },
4809 { k => 'OpenID', v => 'OpenID 2.0 (deprecated)' },
4810 { k => 'OpenIDConnect', v => 'OpenID Connect' },
4811 { k => 'Proxy', v => 'Proxy' },
4812 { k => 'Radius', v => 'Radius' },
4813 { k => 'REST', v => 'REST' },
4814 { k => 'Remote', v => 'Remote' },
4815 { k => 'SAML', v => 'SAML v2' },
4816 { k => 'Slave', v => 'Slave' },
4817 { k => 'SSL', v => 'mTLS' },
4818 { k => 'Twitter', v => 'Twitter' },
4819 { k => 'WebID', v => 'WebID (deprecated)' },
4820 { k => 'WebAuthn', v => 'WebAuthn' },
4821 { k => 'Combination', v => 'combineMods' },
4822 { k => 'Custom', v => 'customModule' },
4823 ],
4824 [
4825 { k => 'AD', v => 'Active Directory' },
4826 {
4827 k => 'CAS',
4828 v => 'Central Authentication Service (CAS)'
4829 },
4830 { k => 'DBI', v => 'Database (DBI)' },
4831 { k => 'Demo', v => 'Demo' },
4832 { k => 'Facebook', v => 'Facebook' },
4833 { k => 'LDAP', v => 'LDAP' },
4834 { k => 'Null', v => 'None' },
4835 { k => 'OpenID', v => 'OpenID 2.0 (deprecated)' },
4836 { k => 'OpenIDConnect', v => 'OpenID Connect' },
4837 { k => 'Proxy', v => 'Proxy' },
4838 { k => 'REST', v => 'REST' },
4839 { k => 'Remote', v => 'Remote' },
4840 { k => 'SAML', v => 'SAML v2' },
4841 { k => 'Slave', v => 'Slave' },
4842 { k => 'WebID', v => 'WebID (deprecated)' },
4843 { k => 'Combination', v => 'combineMods' },
4844 { k => 'Custom', v => 'customModule' },
4845 ],
4846 [
4847 { k => 'AD', v => 'Active Directory' },
4848 { k => 'DBI', v => 'Database (DBI)' },
4849 { k => 'Demo', v => 'Demo' },
4850 { k => 'LDAP', v => 'LDAP' },
4851 { k => 'REST', v => 'REST' },
4852 { k => 'Null', v => 'None' },
4853 { k => 'Combination', v => 'combineMods' },
4854 { k => 'Custom', v => 'customModule' },
4855 ]
4856 ],
4857 documentation => 'Hash list of Choice strings',
4858 },
4859  
4860 # Combination
4861 combination => {
4862 type => 'text',
4863 documentation => 'Combination rule'
4864 },
4865 combModules => {
4866 type => 'cmbModuleContainer',
4867 keyTest => qr/^\w+$/,
4868 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
4869 documentation => 'Combination module description',
4870 select => [
4871 { k => 'Apache', v => 'Apache' },
4872 { k => 'AD', v => 'Active Directory' },
4873 { k => 'DBI', v => 'Database (DBI)' },
4874 { k => 'Facebook', v => 'Facebook' },
4875 { k => 'GitHub', v => 'GitHub' },
4876 { k => 'GPG', v => 'GPG' },
4877 { k => 'Kerberos', v => 'Kerberos' },
4878 { k => 'LDAP', v => 'LDAP' },
4879 { k => 'LinkedIn', v => 'LinkedIn' },
4880 { k => 'PAM', v => 'PAM' },
4881 { k => 'Radius', v => 'Radius' },
4882 { k => 'REST', v => 'REST' },
4883 { k => 'SSL', v => 'mTLS' },
4884 { k => 'Twitter', v => 'Twitter' },
4885 { k => 'WebID', v => 'WebID (deprecated)' },
4886 { k => 'WebAuthn', v => 'WebAuthn' },
4887 { k => 'Demo', v => 'Demonstration' },
4888 { k => 'CAS', v => 'Central Authentication Service (CAS)' },
4889 { k => 'OpenID', v => 'OpenID 2.0 (deprecated)' },
4890 { k => 'OpenIDConnect', v => 'OpenID Connect' },
4891 { k => 'SAML', v => 'SAML v2' },
4892 { k => 'Proxy', v => 'Proxy' },
4893 { k => 'Remote', v => 'Remote' },
4894 { k => 'Slave', v => 'Slave' },
4895 { k => 'Null', v => 'None' },
4896 { k => 'Custom', v => 'customModule' },
4897 ],
4898 },
4899 sfExtra => {
4900 type => 'sfExtraContainer',
4901 help => "sfextra.html",
4902 keyTest => qr/^\w+$/,
4903 0 ▶ test => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
4904 documentation => 'Extra second factors',
4905 select => [
4906 { k => 'Mail2F', v => 'E-Mail' },
4907 { k => 'REST', v => 'REST' },
4908 { k => 'Ext2F', v => 'External' },
4909 { k => 'Radius', v => 'Radius' },
4910 ],
4911 },
4912  
4913 # Custom auth modules
4914 customAuth => {
4915 type => 'text',
4916 documentation => 'Custom auth module',
4917 },
4918 customUserDB => {
4919 type => 'text',
4920 documentation => 'Custom user DB module',
4921 },
4922 customPassword => {
4923 type => 'text',
4924 documentation => 'Custom password module',
4925 },
4926 customRegister => {
4927 type => 'text',
4928 documentation => 'Custom register module',
4929 },
4930 customResetCertByMail => {
4931 type => 'text',
4932 documentation => 'Custom certificateResetByMail module',
4933 },
4934 customAddParams => {
4935 type => 'keyTextContainer',
4936 documentation => 'Custom additional parameters',
4937 },
4938  
4939 # Custom plugins
4940 customPlugins => {
4941 type => 'text',
4942 documentation => 'Custom plugins',
4943 },
4944 customPluginsParams => {
4945 type => 'keyTextContainer',
4946 documentation => 'Custom plugins parameters',
4947 },
4948 disabledPlugins => {
4949 type => 'text',
4950 documentation => 'Disabled plugins',
4951 },
4952  
4953 # OpenID Connect auth params
4954 oidcAuthnLevel => {
4955 type => 'int',
4956 default => 1,
4957 documentation => 'OpenID Connect authentication level',
4958 },
4959 oidcRPCallbackGetParam => {
4960 type => 'text',
4961 default => 'openidconnectcallback',
4962 documentation => 'OpenID Connect Callback GET URLparameter',
4963 },
4964 oidcRPStateTimeout => {
4965 type => 'int',
4966 default => 600,
4967 documentation => 'OpenID Connect Timeout of state sessions',
4968 },
4969  
4970 # OpenID Connect service
4971 oidcServiceMetaDataIssuer => {
4972 type => 'text',
4973 documentation => 'OpenID Connect issuer',
4974 },
4975 oidcServiceMetaDataAuthorizeURI => {
4976 type => 'text',
4977 default => 'authorize',
4978 documentation => 'OpenID Connect authorizaton endpoint',
4979 },
4980 oidcServiceMetaDataTokenURI => {
4981 type => 'text',
4982 default => 'token',
4983 documentation => 'OpenID Connect token endpoint',
4984 },
4985 oidcServiceMetaDataUserInfoURI => {
4986 type => 'text',
4987 default => 'userinfo',
4988 documentation => 'OpenID Connect user info endpoint',
4989 },
4990 oidcServiceMetaDataJWKSURI => {
4991 type => 'text',
4992 default => 'jwks',
4993 documentation => 'OpenID Connect JWKS endpoint',
4994 },
4995 oidcServiceMetaDataRegistrationURI => {
4996 type => 'text',
4997 default => 'register',
4998 documentation => 'OpenID Connect registration endpoint',
4999 },
5000  
5001 # Oauth2 endpoints
5002 oidcServiceMetaDataIntrospectionURI => {
5003 type => 'text',
5004 default => 'introspect',
5005 documentation => 'OpenID Connect introspection endpoint',
5006 },
5007 oidcServiceMetaDataRevokeURI => {
5008 type => 'text',
5009 default => 'revoke',
5010 documentation => 'OpenID Connect token revocation endpoint',
5011 },
5012  
5013 # Logout endpoints
5014 oidcServiceMetaDataEndSessionURI => {
5015 type => 'text',
5016 default => 'logout',
5017 documentation => 'OpenID Connect end session endpoint',
5018 },
5019 oidcServiceMetaDataCheckSessionURI => {
5020 type => 'text',
5021 default => 'checksession.html',
5022 documentation => 'OpenID Connect check session iframe',
5023 },
5024 oidcServiceMetaDataBackChannelURI => {
5025 type => 'text',
5026 default => 'blogout',
5027 documentation => 'OpenID Connect Back-Channel logout endpoint',
5028 },
5029 oidcServiceMetaDataFrontChannelURI => {
5030 type => 'text',
5031 default => 'flogout',
5032 documentation => 'OpenID Connect Front-Channel logout endpoint',
5033 },
5034 oidcServiceMetaDataRpLogoutReturnURI => {
5035 type => 'text',
5036 default => 'rlogoutreturn',
5037 documentation =>
5038 'OpenID Connect RP-Initiated logout return endpoint',
5039 },
5040 oidcServiceMetaDataAuthnContext => {
5041 type => 'keyTextContainer',
5042 keyTest => qr/\w/,
5043 default => {
5044 'loa-1' => 1,
5045 'loa-2' => 2,
5046 'loa-3' => 3,
5047 'loa-4' => 4,
5048 'loa-5' => 5,
5049 },
5050 documentation => 'OpenID Connect Authentication Context Class Ref',
5051 },
5052 oidcServiceMetaDataAmrRules => {
5053 type => 'keyTextContainer',
5054 keyTest => qr/\w/,
5055 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
5056 default => {
5057 'pwd' => '$authenticationLevel == 2',
5058 'mfa' => '$_2f',
5059 'pop' => '$_auth eq "WebAuthn" or $_auth eq "SSL"',
5060 'otp' => '$_2f eq "TOTP"',
5061 },
5062 documentation => 'OpenID Connect AMR rules',
5063 help => 'openidconnectservice.html#amrrules',
5064 },
5065 oidcServiceHideMetadata => {
5066 type => 'bool',
5067 Documentation => "Don't display OIDC metadata",
5068 },
5069  
5070 # OIDC Keys
5071 oidcServiceOldPrivateKeySig => { type => 'EcOrRSAPrivateKey', },
5072 oidcServiceOldPublicKeySig =>
5073 { type => 'EcOrRSAPublicKeyOrCertificate', },
5074 oidcServiceOldKeyIdSig => {
5075 type => 'text',
5076 documentation => 'Previous OpenID Connect Signature Key ID',
5077 },
5078 oidcServiceOldKeyTypeSig => {
5079 type => 'select',
5080 select => [ { k => 'RSA', v => 'RSA' }, { k => 'EC', v => 'EC' } ],
5081 default => 'RSA',
5082 },
5083  
5084 oidcServicePrivateKeySig => { type => 'EcOrRSAPrivateKey', },
5085 oidcServicePublicKeySig => { type => 'EcOrRSAPublicKeyOrCertificate', },
5086 oidcServiceKeyIdSig => {
5087 type => 'text',
5088 documentation => 'OpenID Connect Signature Key ID',
5089 },
5090 oidcServiceKeyTypeSig => {
5091 type => 'select',
5092 select => [ { k => 'RSA', v => 'RSA' }, { k => 'EC', v => 'EC' } ],
5093 default => 'RSA',
5094 },
5095  
5096 oidcServiceNewPrivateKeySig => { type => 'EcOrRSAPrivateKey', },
5097 oidcServiceNewPublicKeySig =>
5098 { type => 'EcOrRSAPublicKeyOrCertificate', },
5099 oidcServiceNewKeyIdSig => {
5100 type => 'text',
5101 documentation => 'Future OpenID Connect Signature Key ID',
5102 },
5103 oidcServiceNewKeyTypeSig => {
5104 type => 'select',
5105 select => [ { k => 'RSA', v => 'RSA' }, { k => 'EC', v => 'EC' } ],
5106 default => 'RSA',
5107 },
5108  
5109 oidcServiceEncAlgorithmAlg => {
5110 type => 'select',
5111 select => oidcEncAlgorithmAlg,
5112 default => 'RSA-OAEP',
5113 documentation => 'JWT encryption algorithme',
5114 },
5115 oidcServiceEncAlgorithmEnc => {
5116 type => 'select',
5117 select => oidcEncAlgorithmEnc,
5118 default => 'A256GCM',
5119 documentation => 'JWT encryption algorithme',
5120 },
5121  
5122 oidcServiceOldPrivateKeyEnc => { type => 'RSAPrivateKey', },
5123 oidcServiceOldPublicKeyEnc => { type => 'RSAPublicKeyOrCertificate', },
5124 oidcServiceOldKeyIdEnc => {
5125 type => 'text',
5126 documentation => 'Previous OpenID Connect Encryption Key ID',
5127 },
5128 oidcServiceOldKeyTypeEnc => {
5129 type => 'select',
5130 select => [ { k => 'RSA', v => 'RSA' }, { k => 'EC', v => 'EC' } ],
5131 default => 'RSA',
5132 },
5133  
5134 oidcServicePrivateKeyEnc => { type => 'RSAPrivateKey', },
5135 oidcServicePublicKeyEnc => { type => 'RSAPublicKeyOrCertificate', },
5136 oidcServiceKeyIdEnc => {
5137 type => 'text',
5138 documentation => 'OpenID Connect Encryption Key ID',
5139 },
5140 oidcServiceKeyTypeEnc => {
5141 type => 'select',
5142 select => [ { k => 'RSA', v => 'RSA' }, { k => 'EC', v => 'EC' } ],
5143 default => 'RSA',
5144 },
5145  
5146 oidcServiceSignatureKey => {
5147 type => 'text',
5148 default => 'default-oidc-sig, old-oidc-sig, new-oidc-sig',
5149 documentation => 'Key to use for OIDC signature',
5150 },
5151 oidcServiceEncryptionKey => {
5152 type => 'text',
5153 default => 'default-oidc-enc',
5154 documentation => 'Key to use for OIDC encryption',
5155 },
5156  
5157 oidcServiceAllowDynamicRegistration => {
5158 type => 'select',
5159 select => [
5160 { k => '0', v => 'disabled' },
5161 { k => '1', v => 'confidentialOnly' },
5162 { k => '2', v => 'allClients' },
5163 ],
5164 default => 0,
5165 documentation => 'OpenID Connect allow dynamic client registration',
5166 },
5167 oidcServiceAllowOnlyDeclaredScopes => {
5168 type => 'bool',
5169 default => 0,
5170 documentation => 'OpenID Connect allow only declared scopes',
5171 },
5172 oidcServiceIgnoreScopeForClaims => {
5173 type => 'bool',
5174 default => 0,
5175 documentation =>
5176 'OpenID Connect release all attributes even when not allowed by scope',
5177 },
5178 oidcServiceAllowAuthorizationCodeFlow => {
5179 type => 'bool',
5180 default => 1,
5181 documentation => 'OpenID Connect allow authorization code flow',
5182 },
5183 oidcServiceAllowImplicitFlow => {
5184 type => 'bool',
5185 default => 0,
5186 documentation => 'OpenID Connect allow implicit flow',
5187 },
5188 oidcServiceAllowHybridFlow => {
5189 type => 'bool',
5190 default => 0,
5191 documentation => 'OpenID Connect allow hybrid flow',
5192 },
5193 oidcServiceAuthorizationCodeExpiration => {
5194 type => 'int',
5195 default => 60,
5196 documentation => 'OpenID Connect global code TTL',
5197 },
5198 oidcServiceAccessTokenExpiration => {
5199 type => 'int',
5200 default => 3600,
5201 documentation => 'OpenID Connect global access token TTL',
5202 },
5203 oidcServiceDynamicRegistrationExportedVars => {
5204 type => 'keyTextContainer',
5205 documentation =>
5206 'OpenID Connect exported variables for dynamic registration',
5207 },
5208 oidcServiceDynamicRegistrationExtraClaims => {
5209 type => 'keyTextContainer',
5210 keyTest => qr/^[\x21\x23-\x5B\x5D-\x7E]+$/,
5211 documentation =>
5212 'OpenID Connect extra claims for dynamic registration',
5213 },
5214 oidcServiceIDTokenExpiration => {
5215 type => 'int',
5216 default => 3600,
5217 documentation => 'OpenID Connect global ID token TTL',
5218 },
5219 oidcServiceOfflineSessionExpiration => {
5220 type => 'int',
5221 default => 2592000,
5222 documentation => 'OpenID Connect global offline session TTL',
5223 },
5224 oidcStorage => {
5225 type => 'PerlModule',
5226 documentation => 'Apache::Session module to store OIDC user data',
5227 },
5228 oidcStorageOptions => {
5229 type => 'keyTextContainer',
5230 documentation => 'Apache::Session module parameters',
5231 },
5232 oidcDropCspHeaders => {
5233 type => 'bool',
5234 documentation => 'Drop CORS headers from OIDC issuer responses',
5235 },
5236 oidcServiceMetadataTtl => {
5237 type => 'int',
5238 documentation => 'OIDC Metadata TTL',
5239 },
5240 oidcServiceMetaDataDisallowNoneAlg => {
5241 type => 'bool',
5242 description => 'Disallow "none" algorithm for signature',
5243 },
5244  
5245 # OpenID Connect metadata nodes
5246 oidcOPMetaDataNodes => {
5247 type => 'oidcOPMetaDataNodeContainer',
5248 help =>
5249 'authopenidconnect.html#declare-the-openid-connect-provider-in-ll-ng',
5250 },
5251 oidcRPMetaDataNodes => {
5252 type => 'oidcRPMetaDataNodeContainer',
5253 help =>
5254 'idpopenidconnect.html#configuration-of-relying-party-in-ll-ng',
5255 },
5256 oidcOPMetaDataOptions => { type => 'subContainer', },
5257 oidcRPMetaDataOptions => { type => 'subContainer', },
5258  
5259 # OpenID Connect providers
5260 oidcOPMetaDataJSON => {
5261 type => 'file',
5262 0 ▶ keyTest => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
5263 },
5264 oidcOPMetaDataJWKS => {
5265 type => 'file',
5266 0 ▶ keyTest => sub { 1 }
Subroutine __ANON__: not called CC=1 SCAR=6.9
5267 },
5268 oidcOPMetaDataExportedVars => {
5269 type => 'keyTextContainer',
5270 default => {
5271 'cn' => 'name',
5272 'sn' => 'family_name',
5273 'mail' => 'email',
5274 'uid' => 'sub'
5275 }
5276 },
5277 oidcOPMetaDataOptionsConfigurationURI => { type => 'url', },
5278 oidcOPMetaDataOptionsJWKSTimeout => { type => 'int', default => 0 },
5279 oidcOPMetaDataOptionsUserAttribute => { type => 'text' },
5280 oidcOPMetaDataOptionsClientID => { type => 'text', },
5281 oidcOPMetaDataOptionsClientSecret => { type => 'password', },
5282 oidcOPMetaDataOptionsScope =>
5283 { type => 'text', default => 'openid profile' },
5284 oidcOPMetaDataOptionsDisplay => {
5285 type => 'select',
5286 select => [
5287 { k => '', v => '' },
5288 { k => 'page', v => 'page' },
5289 { k => 'popup', v => 'popup' },
5290 { k => 'touch', v => 'touch' },
5291 { k => 'wap', v => 'wap' },
5292 ],
5293 default => "",
5294 },
5295 oidcOPMetaDataOptionsPrompt => { type => 'text' },
5296 oidcOPMetaDataOptionsMaxAge => { type => 'int', default => 0 },
5297 oidcOPMetaDataOptionsUiLocales => { type => 'text', },
5298 oidcOPMetaDataOptionsAcrValues => { type => 'text', },
5299 oidcOPMetaDataOptionsAuthEndpointExtraParams => {
5300 type => 'keyTextContainer',
5301 default => {},
5302 documentation =>
5303 'Additional parameters for OpenID Connect Authorization endpoint',
5304 },
5305 oidcOPMetaDataOptionsTokenEndpointAuthMethod => {
5306 type => 'select',
5307 select => [
5308 { k => 'client_secret_post', v => 'client_secret_post' },
5309 { k => 'client_secret_basic', v => 'client_secret_basic' },
5310 { k => 'client_secret_jwt', v => 'client_secret_jwt' },
5311 { k => 'private_key_jwt', v => 'private_key_jwt' },
5312 ],
5313 default => 'client_secret_post',
5314 },
5315 oidcOPMetaDataOptionsTokenEndpointAuthSigAlg => {
5316 type => 'select',
5317 select => oidcSigAlgorithmAlg,
5318 default => 'RS256',
5319 },
5320 oidcOPMetaDataOptionsAuthnEndpointAuthMethod => {
5321 type => 'select',
5322 select =>
5323 [ { k => '', v => 'None' }, { k => 'jws', v => 'Signed JWT' }, ],
5324 },
5325 oidcOPMetaDataOptionsAuthnEndpointAuthSigAlg => {
5326 type => 'select',
5327 select => oidcSigAlgorithmAlg,
5328 default => 'RS256',
5329 },
5330 oidcOPMetaDataOptionsSigningKey => {
5331 type => 'text',
5332 help => 'Signature key used with this OP',
5333 default => '',
5334 },
5335 oidcOPMetaDataOptionsCheckJWTSignature =>
5336 { type => 'bool', default => 1 },
5337 oidcOPMetaDataOptionsIDTokenMaxAge => { type => 'int', default => 30 },
5338 oidcOPMetaDataOptionsUseNonce => { type => 'bool', default => 1 },
5339 oidcOPMetaDataOptionsDisplayName => { type => 'text', },
5340 oidcOPMetaDataOptionsIcon => { type => 'text', },
5341 oidcOPMetaDataOptionsStoreIDToken => { type => 'bool', default => 0 },
5342 oidcOPMetaDataOptionsSortNumber => { type => 'int', },
5343 oidcOPMetaDataOptionsTooltip => { type => 'text', },
5344 oidcOPMetaDataOptionsComment => { type => 'longtext', },
5345 oidcOPMetaDataOptionsResolutionRule => {
5346 type => 'longtext',
5347 default => '',
5348 },
5349 oidcOPMetaDataOptionsRequirePkce => {
5350 type => 'bool',
5351 default => 0,
5352 documentation => 'Use PKCE with this OP',
5353 },
5354 oidcOPMetaDataOptionsRequireIss => {
5355 type => 'bool',
5356 default => 0,
5357 documentation =>
5358 'Require iss parameter in authorization response (RFC 9207)',
5359 },
5360 oidcOPMetaDataOptionsUserinfoSource => {
5361 type => 'select',
5362 default => 'userinfo',
5363 select => [
5364 { k => 'userinfo', v => 'Userinfo endpoint' },
5365 { k => 'id_token', v => 'ID Token' },
5366 { k => 'access_token', v => 'Access Token' },
5367 ],
5368 documentation => "Source of userinfo",
5369 },
5370 oidcOPMetaDataOptionsNoJwtHeader => {
5371 type => 'bool',
5372 default => 0,
5373 documentation => "Don't insert typ header",
5374 },
5375  
5376 # OpenID Connect relying parties
5377 oidcRPMetaDataExportedVars => {
5378 help => 'idpopenidconnect.html#exported-attributes',
5379 type => 'oidcAttributeContainer',
5380 keyTest => qr/\w/,
5381 test => qr/\w/,
5382 default => {
5383 'name' => 'cn',
5384 'preferred_username' => 'uid',
5385 'email' => 'mail',
5386 }
5387 },
5388 oidcRPMetaDataOptionsActivation => {
5389 type => 'bool',
5390 default => 1,
5391 },
5392 oidcRPMetaDataOptionsClientID => { type => 'text', },
5393 oidcRPMetaDataOptionsClientSecret => { type => 'password', },
5394 oidcRPMetaDataOptionsAuthMethod => {
5395 type => 'select',
5396 select => [
5397 { k => '', v => 'Any' },
5398 { k => 'client_secret_post', v => 'client_secret_post' },
5399 { k => 'client_secret_basic', v => 'client_secret_basic' },
5400 { k => 'client_secret_jwt', v => 'client_secret_jwt' },
5401 { k => 'private_key_jwt', v => 'private_key_jwt' },
5402 ],
5403 },
5404 oidcRPMetaDataOptionsAuthRequiredForAuthorize => {
5405 type => 'bool',
5406 default => 0,
5407 },
5408 oidcRPMetaDataOptionsDisplayName => { type => 'text', },
5409 oidcRPMetaDataOptionsIcon => { type => 'text', },
5410 oidcRPMetaDataOptionsUserIDAttr => { type => 'text', },
5411 oidcRPMetaDataOptionsSigningKey => {
5412 type => 'text',
5413 help => 'Signature key used with this OP',
5414 default => '',
5415 },
5416 oidcRPMetaDataOptionsIDTokenSignAlg => {
5417 type => 'select',
5418 23 select => [ { k => 'none', v => 'None' }, @{&oidcSigAlgorithmAlg} ],
5419 default => 'RS256',
5420 },
5421 oidcRPMetaDataOptionsIDTokenExpiration => { type => 'intOrNull' },
5422 oidcRPMetaDataOptionsIDTokenForceClaims =>
5423 { type => 'bool', default => 0 },
5424 oidcRPMetaDataOptionsAccessTokenSignAlg => {
5425 type => 'select',
5426 select => oidcSigAlgorithmAlg,
5427 default => 'RS256',
5428 },
5429 oidcRPMetaDataOptionsUserInfoSignAlg => {
5430 type => 'select',
5431 select => [
5432 { k => '', v => 'JSON' },
5433 { k => 'none', v => 'None' },
5434 23 @{&oidcSigAlgorithmAlg},
5435 ],
5436 default => '',
5437 },
5438 oidcRPMetaDataOptionsIntrospectionSignAlg => {
5439 type => 'select',
5440 23 select => [ { k => '', v => 'JSON' }, @{&oidcSigAlgorithmAlg}, ],
5441 default => '',
5442 documentation =>
5443 'Introspection response signature algorithm (RFC 9701)',
5444 },
5445 oidcRPMetaDataOptionsIntrospectionEncKeyMgtAlg => {
5446 type => 'select',
5447 23 select => [ { k => '', v => 'None' }, @{&oidcEncAlgorithmAlg} ],
5448 documentation =>
5449 '"alg" for introspection response encryption (RFC 9701)',
5450 },
5451 oidcRPMetaDataOptionsIntrospectionEncContentEncAlg => {
5452 type => 'select',
5453 select => oidcEncAlgorithmEnc,
5454 default => 'A256GCM',
5455 documentation =>
5456 '"enc" for introspection response encryption (RFC 9701)',
5457 },
5458 oidcRPMetaDataOptionsAccessTokenJWT => { type => 'bool', default => 0 },
5459 oidcRPMetaDataOptionsAccessTokenClaims =>
5460 { type => 'bool', default => 0 },
5461 oidcRPMetaDataOptionsAdditionalAudiences => { type => 'text' },
5462 oidcRPMetaDataOptionsAccessTokenExpiration => { type => 'intOrNull' },
5463 oidcRPMetaDataOptionsAuthorizationCodeExpiration =>
5464 { type => 'intOrNull' },
5465 oidcRPMetaDataOptionsComment => { type => 'longtext' },
5466 oidcRPMetaDataOptionsOfflineSessionExpiration =>
5467 { type => 'intOrNull' },
5468 oidcRPMetaDataOptionsRedirectUris => { type => 'text', },
5469 oidcRPMetaDataOptionsRequestUris => { type => 'text', },
5470 oidcRPMetaDataOptionsExtraClaims => {
5471 type => 'keyTextContainer',
5472 keyTest => qr/^[\x21\x23-\x5B\x5D-\x7E]+$/,
5473 default => {},
5474 help => 'idpopenidconnect.html#oidcextraclaims'
5475 },
5476 oidcRPMetaDataOptionsBypassConsent => {
5477 type => 'bool',
5478 default => 0
5479 },
5480 oidcRPMetaDataOptionsPostLogoutRedirectUris => { type => 'text', },
5481 oidcRPMetaDataOptionsLogoutBypassConfirm => {
5482 type => 'bool',
5483 default => 0,
5484 documentation => 'Bypass logout confirmation'
5485 },
5486 oidcRPMetaDataOptionsLogoutUrl => {
5487 type => 'text',
5488 documentation => 'Logout URL',
5489 },
5490 oidcRPMetaDataOptionsLogoutType => {
5491 type => 'select',
5492 select => [
5493 { k => 'front', v => 'Front Channel' },
5494 { k => 'back', v => 'Back Channel' },
5495 ],
5496 default => 'front',
5497 documentation => 'Logout type',
5498 },
5499 oidcRPMetaDataOptionsLogoutSessionRequired => {
5500 type => 'bool',
5501 default => 0,
5502 documentation => 'Session required for back/front channel logout',
5503 },
5504 oidcRPMetaDataOptionsPublic => {
5505 type => 'bool',
5506 default => 0,
5507 documentation => 'Declare this RP as public client',
5508 },
5509 oidcRPMetaDataOptionsRequirePKCE => {
5510 type => 'select',
5511 select => [
5512 { k => '0', v => 'disabled' },
5513 { k => '1', v => 'required' },
5514 { k => '2', v => 'pkceOrSecret' },
5515 ],
5516 default => 0,
5517 documentation => 'Require PKCE',
5518 },
5519 oidcRPMetaDataOptionsAllowOffline => {
5520 type => 'bool',
5521 default => 0,
5522 documentation => 'Allow offline access',
5523 },
5524 oidcRPMetaDataOptionsAllowPasswordGrant => {
5525 type => 'bool',
5526 default => 0,
5527 documentation =>
5528 'Allow OAuth2 Resource Owner Password Credentials Grant',
5529 },
5530 oidcRPMetaDataOptionsAllowClientCredentialsGrant => {
5531 type => 'bool',
5532 default => 0,
5533 documentation => 'Allow OAuth2 Client Credentials Grant',
5534 },
5535 oidcRPMetaDataOptionsRefreshToken => {
5536 type => 'bool',
5537 default => 0,
5538 documentation => 'Issue refresh tokens',
5539 },
5540 oidcRPMetaDataOptionsRefreshTokenRotation => {
5541 type => 'bool',
5542 default => 0,
5543 documentation => 'Invalidate refresh token after use',
5544 },
5545 oidcRPMetaDataOptionsRtActivity => {
5546 type => 'int',
5547 0 ▶ test => sub { $_[0] >= 0 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
5548 default => 0,
5549 documentation => 'refresh_token activity timeout',
5550 },
5551 oidcRPMetaDataOptionsAuthnLevel => {
5552 type => 'text',
5553 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
5554 documentation =>
5555 'Authentication level requires to access to this RP',
5556 },
5557 oidcRPMetaDataOptionsRule => {
5558 type => 'text',
5559 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
5560 documentation => 'Rule to grant access to this RP',
5561 },
5562 oidcRPMetaDataOptionsAllowNativeSso => {
5563 type => 'bool',
5564 default => 0,
5565 documentation => 'Allow Native SSO for Mobile Apps',
5566 },
5567 oidcRPMetaDataMacros => {
5568 type => 'keyTextContainer',
5569 help =>
5570 'exportedvars.html#extend-variables-using-macros-and-groups',
5571 test => {
5572 keyTest => qr/^[_a-zA-Z][a-zA-Z0-9_]*$/,
5573 keyMsgFail => '__badMacroName__',
5574 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
5575 },
5576 default => {},
5577 documentation => 'Macros',
5578 },
5579 oidcRPMetaDataScopeRules => {
5580 type => 'keyTextContainer',
5581 help => 'idpopenidconnect.html#scope-rules',
5582 test => {
5583  
5584 # RFC6749
5585 keyTest => qr/^[\x21\x23-\x5B\x5D-\x7E]+$/,
5586 keyMsgFail => '__badMacroName__',
5587 0 ▶ test => sub { return perlExpr(@_) },
Subroutine __ANON__: not called CC=1 SCAR=6.9
5588 },
5589 default => {},
5590 documentation => 'Scope rules',
5591 },
5592 oidcRPMetaDataOptionsJwks => {
5593 type => 'file',
5594 0 ▶ keyTest => sub { 1 },
Subroutine __ANON__: not called CC=1 SCAR=6.9
5595 documentation => 'Relying party JWKS document',
5596 },
5597 oidcRPMetaDataOptionsJwksUri => {
5598 type => 'url',
5599 help => 'idpopenidconnect.html',
5600 documentation =>
5601 'Relying party JWKS endpoint (to get encryption keys)',
5602 },
5603 oidcRPMetaDataOptionsAccessTokenEncKeyMgtAlg => {
5604 type => 'select',
5605 select =>
5606 23 [ { k => '', 'v' => 'None' }, @{ &oidcEncAlgorithmAlg, } ],
5607 documentation => '"alg" algorithm for access_token encryption',
5608 },
5609 oidcRPMetaDataOptionsAccessTokenEncContentEncAlg => {
5610 type => 'select',
5611 select => oidcEncAlgorithmEnc,
5612 default => 'A256GCM',
5613 documentation => '"enc" algorithm for access_token encryption',
5614 },
5615 oidcRPMetaDataOptionsIdTokenEncKeyMgtAlg => {
5616 type => 'select',
5617 select =>
5618 23 [ { k => '', 'v' => 'None' }, @{ &oidcEncAlgorithmAlg, } ],
5619 documentation => '"alg" algorithm for id_token encryption',
5620 },
5621 oidcRPMetaDataOptionsIdTokenEncContentEncAlg => {
5622 type => 'select',
5623 select => oidcEncAlgorithmEnc,
5624 default => 'A256GCM',
5625 documentation => '"enc" algorithm for id_token encryption',
5626 },
5627 oidcRPMetaDataOptionsUserInfoEncKeyMgtAlg => {
5628 type => 'select',
5629 23 select => [ { k => '', v => 'None' }, @{&oidcEncAlgorithmAlg} ],
5630 documentation => '"alg" algorithm for user_info encryption',
5631 },
5632 oidcRPMetaDataOptionsUserInfoEncContentEncAlg => {
5633 type => 'select',
5634 select => oidcEncAlgorithmEnc,
5635 default => 'A256GCM',
5636 documentation => '"enc" algorithm for user_info encryption',
5637 },
5638 oidcRPMetaDataOptionsLogoutEncKeyMgtAlg => {
5639 type => 'select',
5640 23 select => [ { k => '', v => 'None' }, @{&oidcEncAlgorithmAlg} ],
5641 documentation => '"alg" algorithm for logout token encryption',
5642 },
5643 oidcRPMetaDataOptionsLogoutEncContentEncAlg => {
5644 type => 'select',
5645 select => oidcEncAlgorithmEnc,
5646 default => 'A256GCM',
5647 documentation => '"enc" algorithm for logout encryption',
5648 },
5649 oidcRPMetaDataOptionsAuthnRequireState => {
5650 type => 'bool',
5651 default => 0,
5652 },
5653 oidcRPMetaDataOptionsAuthnRequireNonce => {
5654 type => 'bool',
5655 default => 0,
5656 },
5657 oidcRPMetaDataOptionsUserinfoRequireHeaderToken => {
5658 type => 'bool',
5659 default => 0,
5660 documentation =>
5661 '/userinfo endpoint requires authn using Bearer token',
5662 },
5663 oidcRPMetaDataOptionsTokenXAuthorizedRP => {
5664 type => 'text',
5665 documentation =>
5666 'List of RP authorized to query for an access_token of this RP',
5667 },
5668 oidcRPMetaDataOptionsNoJwtHeader => {
5669 type => 'bool',
5670 default => 0,
5671 documentation => "Don't insert typ header",
5672 },
5673 appAccessHistoryEnabled => {
5674 type => 'bool',
5675 default => 0,
5676 documentation =>
5677 'Shall OIDC/SAML/CAS protected apps access be recorded to session?'
5678 },
5679  
5680 # Fake attribute: used by manager REST API to agglomerate all other
5681 # nodes
5682 keyNodes => {
5683 type => 'keyNodeContainer',
5684 help => 'keys.html',
5685 template => 'keyNode',
5686 },
5687 keys => {
5688 type => 'subContainer',
5689 documentation => 'Root of keys',
5690 },
5691 keyPrivate => { type => 'EcOrRSAPrivateKey', default => "" },
5692 keyPrivatePwd => { type => 'password', default => "" },
5693 keyPublic => { type => 'EcOrRSAPublicKeyOrCertificate', default => "" },
5694 'keyId' => { type => "text", default => "" },
5695 'keyComment' => { type => 'text', default => "" },
5696 };
5697 }
5698  
5699 32 1;
« blib/lib/Lemonldap/NG/Manager/Api/Menu/App.pm ↑ Summary blib/lib/Lemonldap/NG/Manager/Api/Misc.pm »