parameters-for-wiki.pl 3.44 KB
Newer Older
1 2 3 4 5 6 7 8 9
#!/usr/bin/perl

use strict;
use JSON;

require './lemonldap-ng-manager/lib/Lemonldap/NG/Manager/Build/Attributes.pm';
require './lemonldap-ng-common/lib/Lemonldap/NG/Common/Conf/ReConstants.pm';

my $rmg =
Xavier Guimard's avatar
Xavier Guimard committed
10
"^(?:(?:$Lemonldap::NG::Common::Conf::ReConstants::virtualHostKeys)|(?:$Lemonldap::NG::Common::Conf::ReConstants::casAppMetaDataNodeKeys)|(?:$Lemonldap::NG::Common::Conf::ReConstants::casSrvMetaDataNodeKeys)|(?:$Lemonldap::NG::Common::Conf::ReConstants::oidcOPMetaDataNodeKeys)|(?:$Lemonldap::NG::Common::Conf::ReConstants::oidcRPMetaDataNodeKeys)|(?:$Lemonldap::NG::Common::Conf::ReConstants::samlIDPMetaDataNodeKeys)|(?:$Lemonldap::NG::Common::Conf::ReConstants::samlSPMetaDataNodeKeys)|(?:$Lemonldap::NG::Common::Conf::ReConstants::specialNodeKeys))\$";
11 12
$rmg = qr/$rmg/;

Xavier Guimard's avatar
Xavier Guimard committed
13 14
my $complexNodes = qr/^(?:(?:(?:saml(?:ID|S)|oidc[OR])P|cas(?:App|Srv))MetaData|vhost)Options$/;

15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
my $ignore = qr/^(?:virtualHosts)$/;

open F, 'lemonldap-ng-manager/site/htdocs/static/reverseTree.json';

my $managed = JSON::from_json( join '', <F> );

my $prm = Lemonldap::NG::Manager::Build::Attributes::attributes();

my $ok = '';

print <<EOF;
====== Parameter list ======

<note tip>
Click on a column header to sort table.
The attribute key name can be used directly in ''lemonldap-ng.ini'' or in Perl scripts to override configuration parameters (see [[configlocation|configuration location]]).
</note>

===== Main parameters =====

Xavier Guimard's avatar
Xavier Guimard committed
35
<sortable 1>
Xavier Guimard's avatar
Xavier Guimard committed
36
^  Key name  ^  Documentation  ^  Portal  ^  Handler  ^  Manager  ^  ini file only  ^
37 38 39 40 41 42
EOF

#| Activate auto accept timer | activeTimer |  ✔  | | |

foreach my $k ( sort keys %$prm ) {
    next if $k =~ $ignore;
Xavier Guimard's avatar
Xavier Guimard committed
43
    next if $k =~ $rmg;
Xavier Guimard's avatar
Xavier Guimard committed
44 45 46 47 48 49 50 51 52 53
    my $p = $prm->{$k};
    $p->{flags} ||= 'p';
    print "| $k | $p->{documentation}"
      # Portal flag
      .' | '.( $p->{flags} =~ /p/ ? $ok : '')
      # Handler flag
      .' | '.( $p->{flags} =~ /h/ ? $ok : '')
      # Manager flag
      .' | '.( $p->{flags} =~ /m/ ? $ok : '')
      # Ini-only flag
Xavier Guimard's avatar
Xavier Guimard committed
54
      .' | ' . ( ( $managed->{$k} or $k =~ $rmg ) ? '' : ( $k =~ $complexNodes ? '[1]' : $ok ) )
Xavier Guimard's avatar
Xavier Guimard committed
55 56
      # End of line
      . " |\n";
57 58 59
}

print <<EOF;
Xavier Guimard's avatar
Xavier Guimard committed
60
</sortable>
61

Xavier Guimard's avatar
Xavier Guimard committed
62 63
//[1]: complex nodes//

64 65 66
===== Configuration backend parameters =====

^  Full name  ^  Key name  ^  Configuration backend  ^
Xavier Guimard's avatar
Xavier Guimard committed
67
| Directory | dirName | [[fileconfbackend|File]] |
68 69 70 71
| DBI connection string | dbiChain | [[sqlconfbackend|CDBI / RDBI]] |
| DBI user | dbiUser | ::: |
| DBI password | dbiPassword | ::: |
| DBI table name | dbiTable | ::: |
Xavier Guimard's avatar
Xavier Guimard committed
72
| Storage directory | dirName | [[fileconfbackend|File]] / [[yamlconfbackend|YAML]] |
73 74 75 76 77
| LDAP server | ldapServer | [[ldapconfbackend|LDAP]] |
| LDAP port | ldapPort | ::: |
| LDAP base | ldapConfBase | ::: |
| LDAP bind dn | ldapBindDN | ::: |
| LDAP bind password | ldapBindPassword | ::: |
Xavier Guimard's avatar
Xavier Guimard committed
78 79
| LDAP ObjectClass | ldapObjectClass | ::: |
| LDAP ID attribute | ldapAttributeId | ::: |
Xavier Guimard's avatar
Xavier Guimard committed
80
| LDAP content attribute | ldapAttributeContent | ::: |
81 82
| Certificate authorities file | caFile | ::: |
| Certificate authorities directory | caPath | ::: |
Xavier Guimard's avatar
Xavier Guimard committed
83 84 85 86 87 88
| MongoDB database | dbName | [[mongodbconfbackend|MongoDB]] |
| MongoDB collection | collectionName | ::: |
| REST base URL | baseUrl | [[restconfbackend|REST]] |
| REST realm | realm | ::: |
| REST user | user | ::: |
| REST password | password | ::: |
89 90
| SOAP server location (URL) | proxy | [[soapconfbackend|SOAP]] |
| [[http://search.cpan.org/perldoc?LWP::UserAgent|LWP::UserAgent]] parameters | proxyOptions | ::: |
Xavier Guimard's avatar
Xavier Guimard committed
91 92
| SOAP user | User | ::: |
| SOAP password | Password | ::: |
93
EOF