Combination in progress (#1151)
This commit is contained in:
parent
8a3bb7b0f9
commit
1780092b0c
|
@ -23,7 +23,7 @@ use constant HANDLERSECTION => "handler";
|
|||
use constant MANAGERSECTION => "manager";
|
||||
use constant SESSIONSEXPLORERSECTION => "sessionsExplorer";
|
||||
use constant APPLYSECTION => "apply";
|
||||
our $hashParameters = qr/^(?:(?:l(?:o(?:ca(?:lSessionStorageOption|tionRule)|goutService)|dapExportedVar|wpSslOpt)|(?:(?:d(?:emo|bi)|facebook|webID)ExportedVa|exported(?:Heade|Va))r|g(?:r(?:antSessionRule|oup)|lobalStorageOption)|n(?:otificationStorageOption|ginxCustomHandler)|re(?:moteGlobalStorageOption|loadUrl)|CAS_proxiedService|macro)s|o(?:idc(?:RPMetaData(?:(?:Option(?:sExtraClaim)?|ExportedVar)s|Node)|OPMetaData(?:(?:ExportedVar|Option)s|J(?:SON|WKS)|Node)|S(?:erviceMetaDataAuthnContext|torageOptions))|penIdExportedVars)|s(?:aml(?:S(?:PMetaData(?:(?:ExportedAttribute|Option)s|Node|XML)|torageOptions)|IDPMetaData(?:(?:ExportedAttribute|Option)s|Node|XML))|essionDataToRemember|laveExportedVars)|c(?:as(?:StorageOption|Attribute)s|omb(?:Modules|Over))|p(?:ersistentStorageOptions|o(?:rtalSkinRules|st))|a(?:uthChoiceModules|pplicationList)|v(?:hostOptions|irtualHost))$/;
|
||||
our $hashParameters = qr/^(?:(?:l(?:o(?:ca(?:lSessionStorageOption|tionRule)|goutService)|dapExportedVar|wpSslOpt)|(?:(?:d(?:emo|bi)|facebook|webID)ExportedVa|exported(?:Heade|Va))r|g(?:r(?:antSessionRule|oup)|lobalStorageOption)|n(?:otificationStorageOption|ginxCustomHandler)|c(?:as(?:StorageOption|Attribute)|ombModule)|re(?:moteGlobalStorageOption|loadUrl)|CAS_proxiedService|macro)s|o(?:idc(?:RPMetaData(?:(?:Option(?:sExtraClaim)?|ExportedVar)s|Node)|OPMetaData(?:(?:ExportedVar|Option)s|J(?:SON|WKS)|Node)|S(?:erviceMetaDataAuthnContext|torageOptions))|penIdExportedVars)|s(?:aml(?:S(?:PMetaData(?:(?:ExportedAttribute|Option)s|Node|XML)|torageOptions)|IDPMetaData(?:(?:ExportedAttribute|Option)s|Node|XML))|essionDataToRemember|laveExportedVars)|p(?:ersistentStorageOptions|o(?:rtalSkinRules|st))|a(?:uthChoiceModules|pplicationList)|v(?:hostOptions|irtualHost))$/;
|
||||
|
||||
our @sessionTypes = ( 'remoteGlobal', 'cas', 'global', 'localSession', 'persistent', 'saml', 'oidc' );
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ our $specialNodeHash = {
|
|||
};
|
||||
|
||||
our $doubleHashKeys = 'issuerDBGetParameters';
|
||||
our $simpleHashKeys = '(?:(?:l(?:o(?:calSessionStorageOption|goutService)|dapExportedVar|wpSslOpt)|(?:(?:d(?:emo|bi)|facebook|webID)E|e)xportedVar|g(?:r(?:antSessionRule|oup)|lobalStorageOption)|n(?:otificationStorageOption|ginxCustomHandler)|p(?:ersistentStorageOption|ortalSkinRule)|re(?:moteGlobalStorageOption|loadUrl)|CAS_proxiedService|macro)s|o(?:idcS(?:erviceMetaDataAuthnContext|torageOptions)|penIdExportedVars)|s(?:(?:amlStorageOption|laveExportedVar)s|essionDataToRemember)|c(?:as(?:StorageOption|Attribute)s|omb(?:Modules|Over))|a(?:uthChoiceModules|pplicationList))';
|
||||
our $simpleHashKeys = '(?:(?:l(?:o(?:calSessionStorageOption|goutService)|dapExportedVar|wpSslOpt)|(?:(?:d(?:emo|bi)|facebook|webID)E|e)xportedVar|g(?:r(?:antSessionRule|oup)|lobalStorageOption)|n(?:otificationStorageOption|ginxCustomHandler)|c(?:as(?:StorageOption|Attribute)|ombModule)|p(?:ersistentStorageOption|ortalSkinRule)|re(?:moteGlobalStorageOption|loadUrl)|CAS_proxiedService|macro)s|o(?:idcS(?:erviceMetaDataAuthnContext|torageOptions)|penIdExportedVars)|s(?:(?:amlStorageOption|laveExportedVar)s|essionDataToRemember)|a(?:uthChoiceModules|pplicationList))';
|
||||
our $specialNodeKeys = '(?:(?:saml(?:ID|S)|oidc[OR])PMetaDataNode|virtualHost)s';
|
||||
our $oidcOPMetaDataNodeKeys = 'oidcOPMetaData(?:Options(?:C(?:lient(?:Secret|ID)|heckJWTSignature|onfigurationURI)|TokenEndpointAuthMethod|(?:JWKSTimeou|Promp)t|I(?:DTokenMaxAge|con)|S(?:toreIDToken|cope)|U(?:iLocales|seNonce)|Display(?:Name)?|AcrValues|MaxAge)|ExportedVars|J(?:SON|WKS))';
|
||||
our $oidcRPMetaDataNodeKeys = 'oidcRPMetaData(?:Options(?:I(?:DToken(?:Expiration|SignAlg)|con)|(?:RedirectUri|ExtraClaim)s|AccessTokenExpiration|Client(?:Secret|ID)|BypassConsent|DisplayName|UserIDAttr)|ExportedVars)';
|
||||
|
@ -33,7 +33,7 @@ our $authParameters = {
|
|||
apacheParams => [qw(apacheAuthnLevel)],
|
||||
casParams => [qw(CAS_authnLevel CAS_url CAS_CAFile CAS_renew CAS_gateway CAS_pgtFile CAS_proxiedServices)],
|
||||
choiceParams => [qw(authChoiceParam authChoiceModules)],
|
||||
combinationParams => [qw(combination combModules combOver)],
|
||||
combinationParams => [qw(combination combModules)],
|
||||
dbiParams => [qw(dbiAuthnLevel dbiExportedVars dbiAuthChain dbiAuthUser dbiAuthPassword dbiUserChain dbiUserUser dbiUserPassword dbiAuthTable dbiUserTable dbiAuthLoginCol dbiAuthPasswordCol dbiPasswordMailCol userPivot dbiAuthPasswordHash)],
|
||||
demoParams => [qw(demoExportedVars)],
|
||||
facebookParams => [qw(facebookAuthnLevel facebookExportedVars facebookAppId facebookAppSecret)],
|
||||
|
|
|
@ -658,10 +658,11 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
|
|||
'type' => 'text'
|
||||
},
|
||||
'combModules' => {
|
||||
'type' => 'keyTextContainer'
|
||||
},
|
||||
'combOver' => {
|
||||
'type' => 'keyTextContainer'
|
||||
'keyTest' => qr/^\w+$/,
|
||||
'test' => sub {
|
||||
1;
|
||||
},
|
||||
'type' => 'cmbModuleContainer'
|
||||
},
|
||||
'confirmFormMethod' => {
|
||||
'default' => 'post',
|
||||
|
|
|
@ -2270,14 +2270,13 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
|
|||
# Combination
|
||||
combination => {
|
||||
type => 'text',
|
||||
documentation => 'Combination rule'
|
||||
},
|
||||
combModules => {
|
||||
type => 'keyTextContainer',
|
||||
},
|
||||
combOver => {
|
||||
|
||||
#TODO: create new type
|
||||
type => 'keyTextContainer',
|
||||
type => 'cmbModuleContainer',
|
||||
keyTest => qr/^\w+$/,
|
||||
test => sub {1},
|
||||
documentation => 'Combination module description'
|
||||
},
|
||||
|
||||
# Yubikey
|
||||
|
|
|
@ -253,7 +253,7 @@ sub tree {
|
|||
title => 'combinationParams',
|
||||
help => 'authcombination.html',
|
||||
nodes =>
|
||||
[ 'combination', 'combModules', 'combOver' ]
|
||||
[ 'combination', 'combModules' ]
|
||||
},
|
||||
{
|
||||
title => 'nullParams',
|
||||
|
|
|
@ -298,6 +298,21 @@ llapp.controller 'TreeCtrl', [
|
|||
logo: "network.png"
|
||||
display: "auto"
|
||||
|
||||
# Combination module
|
||||
$scope.newCmbMod = ->
|
||||
node = $scope._findContainer()
|
||||
node.nodes.push
|
||||
id: "#{node.id}/n#{id++}"
|
||||
title: 'new'
|
||||
type: 'cmbModule'
|
||||
data:
|
||||
type: 'LDAP'
|
||||
for: 0
|
||||
over: {}
|
||||
|
||||
$scope.newCmbOver = ->
|
||||
$scope.currentNode.data.over.set "new#{id++}", ''
|
||||
|
||||
# Add host
|
||||
$scope.addHost = (cn,scope) ->
|
||||
cn.data=[] unless cn.data
|
||||
|
|
57
lemonldap-ng-manager/site/static/forms/cmbModule.html
Normal file
57
lemonldap-ng-manager/site/static/forms/cmbModule.html
Normal file
|
@ -0,0 +1,57 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{currentNode.title}}</h3>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="25%" trspan="name"></th>
|
||||
<th width="25%" trspan="type"></th>
|
||||
<th width="35%" trspan="use"></th>
|
||||
<th />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<input class="form-control" ng-model="currentNode.title" />
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" ng-model="currentNode.data.type" ng-change="execFilters(_findScopeByKey('authParams'))">
|
||||
<option ng-repeat="item in _findContainer().select" ng-selected="item.k==currentNode.data[i]" value="{{item.k}}">{{item.v}}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" ng-model="currentNode.data.for">
|
||||
<option value="0" trspan="authAndUserdb">
|
||||
<option value="0" trspan="authOnly">
|
||||
<option value="0" trspan="userdbOnly">
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<table class="table">
|
||||
<tr ng-repeat="(k,v) in currentNode.data.over">
|
||||
<td>
|
||||
<input class="form-control" ng-model="k" />
|
||||
</td>
|
||||
<td>
|
||||
<input class="form-control" ng-model="v" />
|
||||
</td>
|
||||
<td>
|
||||
<span class="link text-danger glyphicon glyphicon-minus-sign" ng-click="del(currentNode.data.over,$index)"/>
|
||||
<span ng-if="$last" class="link text-success glyphicon glyphicon-plus-sign" ng-click="menuClick({title:'newCmbOver'})"/>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script type="text/menu">
|
||||
[{
|
||||
"title": "newCmbOver",
|
||||
"icon": "plus-sign"
|
||||
},{
|
||||
"title": "deleteEntry",
|
||||
"icon": "minus-sign"
|
||||
}]
|
||||
</script>
|
|
@ -0,0 +1,44 @@
|
|||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h3 class="panel-title">{{translateTitle(currentNode)}}</h3>
|
||||
</div>
|
||||
<table class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="25%" trspan="name"></th>
|
||||
<th width="25%" trspan="type"></th>
|
||||
<th width="35%" trspan="use"></th>
|
||||
<th />
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="s in currentNode.nodes">
|
||||
<td>
|
||||
<input class="form-control" ng-model="s.title" />
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" ng-model="s.data.type" ng-change="execFilters(_findScopeByKey('authParams'))">
|
||||
<option ng-repeat="item in currentNode.select[i]" ng-selected="item.k==s.data.type" value="{{item.k}}">{{item.v}}</option>
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<select class="form-control" ng-model="s.data.for">
|
||||
<option value="0" trspan="authAndUserdb">
|
||||
<option value="0" trspan="authOnly">
|
||||
<option value="0" trspan="userdbOnly">
|
||||
</select>
|
||||
</td>
|
||||
<td>
|
||||
<span class="link text-danger glyphicon glyphicon-minus-sign" ng-click="del(currentNode.nodes,$index)"/>
|
||||
<span ng-if="$last" class="link text-success glyphicon glyphicon-plus-sign" ng-click="menuClick({title:'newCmbMod'})"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<script type="text/menu">
|
||||
[{
|
||||
"title": "newCmbMod",
|
||||
"icon": "plus-sign"
|
||||
}]
|
||||
</script>
|
|
@ -348,6 +348,23 @@ This file contains:
|
|||
}
|
||||
});
|
||||
};
|
||||
$scope.newCmbMod = function() {
|
||||
var node;
|
||||
node = $scope._findContainer();
|
||||
return node.nodes.push({
|
||||
id: node.id + "/n" + (id++),
|
||||
title: 'new',
|
||||
type: 'cmbModule',
|
||||
data: {
|
||||
type: 'LDAP',
|
||||
"for": 0,
|
||||
over: {}
|
||||
}
|
||||
});
|
||||
};
|
||||
$scope.newCmbOver = function() {
|
||||
return $scope.currentNode.data.over.set("new" + (id++), '');
|
||||
};
|
||||
$scope.addHost = function(cn, scope) {
|
||||
if (!cn.data) {
|
||||
cn.data = [];
|
||||
|
@ -850,9 +867,7 @@ This file contains:
|
|||
$scope.showModal('message.html');
|
||||
}
|
||||
$scope.form = 'home';
|
||||
console.log('OK', $scope.waiting);
|
||||
$scope.waiting = false;
|
||||
console.log('OK', $scope.waiting);
|
||||
return $scope.waiting = false;
|
||||
}, readError);
|
||||
};
|
||||
c = $location.path().match(new RegExp('^/confs/(latest|[0-9]+)'));
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -41,6 +41,7 @@
|
|||
"applyResult": "Apply result",
|
||||
"appsInThisCat": "Applications in this category",
|
||||
"attributesAndMacros": "Attributes and macros",
|
||||
"authAndUserdb": "Authz and user DB",
|
||||
"authChain": "Authentication chain",
|
||||
"authChoice": "Authentication choice",
|
||||
"authChoiceModules": "Allowed modules",
|
||||
|
@ -50,6 +51,7 @@
|
|||
"authenticationLevel": "Authentication level",
|
||||
"authenticationTitle": "Authentication",
|
||||
"AuthLDAPFilter": "Authentication filter",
|
||||
"authOnly": "Authentication only",
|
||||
"author": "Author",
|
||||
"authorIPAddress": "Author IP address",
|
||||
"authorizedValues": "Authorized values",
|
||||
|
@ -629,6 +631,7 @@
|
|||
"twitterKey": "API key",
|
||||
"twitterParams": "Twitter parameters",
|
||||
"twitterSecret": "API secret",
|
||||
"type": "Type",
|
||||
"u2f": "U2F",
|
||||
"u2fActivation": "Activation",
|
||||
"u2fSelfRegistration": "Self registration",
|
||||
|
@ -642,9 +645,11 @@
|
|||
"uploadDenied": "Upload denied",
|
||||
"uri": "URI",
|
||||
"url": "URL",
|
||||
"use": "Use",
|
||||
"user": "user",
|
||||
"users": "Users",
|
||||
"userDB": "Users module",
|
||||
"userdbOnly": "User DB only",
|
||||
"userControl": "Username control",
|
||||
"userPivot": "Login field name in user table",
|
||||
"useRedirectOnError": "Redirect on error",
|
||||
|
|
|
@ -41,6 +41,7 @@
|
|||
"applyResult": "Résultat de l'application",
|
||||
"appsInThisCat": "Applications dans cette catégorie",
|
||||
"attributesAndMacros": "Attributs et macros",
|
||||
"authAndUserdb": "Authent. et BD utilisateurs",
|
||||
"authChain": "Chaîne d'authentification",
|
||||
"authChoice": "Choix d'authentification",
|
||||
"authChoiceModules": "Modules autorisés",
|
||||
|
@ -50,6 +51,7 @@
|
|||
"authenticationLevel": "Niveau d'authentification",
|
||||
"authenticationTitle": "Authentification",
|
||||
"AuthLDAPFilter": "Filtre d'authentification",
|
||||
"authOnly": "Authentification seulement",
|
||||
"author": "Auteur",
|
||||
"authorIPAddress": "Adresse IP de l'auteur",
|
||||
"authorizedValues": "Valeurs autorisées",
|
||||
|
@ -629,6 +631,7 @@
|
|||
"twitterKey": "Clef de l'API",
|
||||
"twitterParams": "Paramètres Twitter",
|
||||
"twitterSecret": "Secret de l'API",
|
||||
"type": "Type",
|
||||
"u2f": "U2F",
|
||||
"u2fActivation": "Activation",
|
||||
"u2fSelfRegistration": "Activation de l'enregistrement",
|
||||
|
@ -642,9 +645,11 @@
|
|||
"uploadDenied": "Téléchargement refusé",
|
||||
"uri": "URI",
|
||||
"url": "URL",
|
||||
"use": "Usage",
|
||||
"user": "utilisateur",
|
||||
"users": "Utilisateurs",
|
||||
"userDB": "Module d'utilisateurs",
|
||||
"userdbOnly": "BD utilisateurs seulement",
|
||||
"userControl": "Contrôle du nom d'utilisateur",
|
||||
"userPivot": "Champ identifiant dans la table des utilisateurs",
|
||||
"useRedirectOnError": "Redirection pour les erreurs",
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user