Lang, Doc, Sort Tree & Tests(#2600 #2601)

This commit is contained in:
Alexandre KARIM 2021-09-08 16:41:53 +02:00
parent d8c512547a
commit 0c33da8cdc
23 changed files with 128 additions and 61 deletions

View File

@ -35,13 +35,14 @@ Then, go in ``Proxy parameters``:
this case, "Portal URL" parameter must contain SOAP endpoint
(generally http://auth.example.com/index.pl/sessions for 1.9 and
earlier, http://auth.example.com/sessions for 2.0)
- **Internal portal URL**: URL of internal portal
- **Internal portal choice parameter** (optional): Choice parameter of the internal portal if applicable
- **Internal portal choice value** (optional): Value of the choice parameter of the internal portal
- **Session service URL** (optional): Session service URL (default:
- **URL**: URL of internal portal
- **Session service URL** (optional): session service URL (default:
same as previous for SOAP, same with "/session/my" for REST)
- **Cookie name** (optional): name of the cookie of internal portal, if
- **Choice parameter** (optional): choice parameter of the internal portal if applicable
- **Choice value** (optional): value of the choice parameter of the internal portal
- **Cookie name** (optional): internal portal cookie name, if
different from external portal
- **Impersonation** (optional) : can be enabled if the internal portal provides impersonation
Internal portal
~~~~~~~~~~~~~~~

View File

@ -31,7 +31,7 @@ use constant DEFAULTCONFBACKENDOPTIONS => (
);
our $hashParameters = qr/^(?:(?:l(?:o(?:ca(?:lSessionStorageOption|tionRule)|goutService)|dapExportedVar|wp(?:Ssl)?Opt)|(?:(?:d(?:emo|bi)|webID)ExportedVa|exported(?:Heade|Va)|issuerDBGetParamete)r|f(?:indUser(?:Exclud|Search)ingAttribute|acebookExportedVar)|re(?:moteGlobalStorageOption|st2f(?:Verify|Init)Arg|loadUrl)|g(?:r(?:antSessionRule|oup)|lobalStorageOption)|n(?:otificationStorageOption|ginxCustomHandler)|macro)s|o(?:idc(?:S(?:ervice(?:DynamicRegistrationEx(?:portedVar|traClaim)s|MetaDataAuthnContext)|torageOptions)|RPMetaData(?:(?:Option(?:sExtraClaim)?|ExportedVar|ScopeRule|Macro)s|Node)|OPMetaData(?:(?:ExportedVar|Option)s|J(?:SON|WKS)|Node))|penIdExportedVars)|c(?:as(?:A(?:ppMetaData(?:(?:ExportedVar|Option|Macro)s|Node)|ttributes)|S(?:rvMetaData(?:(?:ExportedVar|Option)s|Node)|torageOptions))|(?:ustom(?:Plugins|Add)Param|heckUserHiddenHeader|ombModule)s)|s(?:aml(?:S(?:PMetaData(?:(?:ExportedAttribute|Option|Macro)s|Node|XML)|torageOptions)|IDPMetaData(?:(?:ExportedAttribute|Option)s|Node|XML))|essionDataToRemember|laveExportedVars|fExtra)|a(?:(?:daptativeAuthenticationLevelR|ut(?:hChoiceMod|oSigninR))ules|pplicationList)|p(?:ersistentStorageOptions|o(?:rtalSkinRules|st))|v(?:hostOptions|irtualHost)|S(?:MTPTLSOpts|SLVarIf))$/;
our $arrayParameters = qr/^mySessionAuthorizedRWKeys$/;
our $boolKeys = qr/^(?:s(?:aml(?:IDP(?:MetaDataOptions(?:(?:Check(?:S[LS]OMessageSignatur|Audienc|Tim)|IsPassiv)e|A(?:llow(?:LoginFromIDP|ProxiedAuthn)|daptSessionUtime)|Force(?:Authn|UTF8)|StoreSAMLToken|RelayStateURL)|SSODescriptorWantAuthnRequestsSigned)|S(?:P(?:MetaDataOptions(?:(?:CheckS[LS]OMessageSignatur|OneTimeUs)e|EnableIDPInitiatedURL|ForceUTF8)|SSODescriptor(?:WantAssertion|AuthnRequest)sSigned)|erviceUseCertificateInResponse)|DiscoveryProtocol(?:Activation|IsPassive)|CommonDomainCookieActivation|UseQueryStringSpecific|MetadataForceUTF8)|f(?:RemovedUseNotif|OnlyUpgrade)|kip(?:Upgrade|Renew)Confirmation|oap(?:Session|Config)Server|t(?:ayConnecte|orePasswor)d|laveDisplayLogo|howLanguages|slByAjax)|o(?:idc(?:RPMetaDataOptions(?:A(?:llow(?:(?:ClientCredentials|Password)Grant|Offline)|ccessToken(?:Claims|JWT))|Re(?:freshToken|quirePKCE)|LogoutSessionRequired|IDTokenForceClaims|BypassConsent|Public)|ServiceAllow(?:(?:AuthorizationCode|Implicit|Hybrid)Flow|DynamicRegistration|OnlyDeclaredScopes)|OPMetaDataOptions(?:(?:CheckJWTSignatur|UseNonc)e|StoreIDToken))|ldNotifFormat)|c(?:a(?:sS(?:rvMetaDataOptions(?:Gateway|Renew)|trictMatching)|ptcha_(?:register|login|mail)_enabled)|o(?:ntextSwitching(?:Allowed2fModifications|StopWithLogout)|mpactConf|rsEnabled)|heck(?:DevOps(?:D(?:isplayNormalizedHeaders|ownload))?|State|User|XSS)|rowdsec|da)|p(?:ortal(?:Display(?:Re(?:freshMyRights|setPassword|gister)|CertificateResetByMail|GeneratePassword|PasswordPolicy)|E(?:rrorOn(?:ExpiredSession|MailNotFound)|nablePasswordDisplay)|(?:CheckLogin|Statu)s|OpenLinkInNewWindow|ForceAuthn|AntiFrame)|roxyUseSoap)|l(?:dap(?:(?:G(?:roup(?:DecodeSearchedValu|Recursiv)|etUserBeforePasswordChang)|UsePasswordResetAttribut)e|(?:AllowResetExpired|Set)Password|ChangePasswordAsUser|PpolicyControl|ITDS)|oginHistoryEnabled)|no(?:tif(?:ication(?:Server(?:(?:POS|GE)T|DELETE)?|sExplorer)?|y(?:Deleted|Other))|AjaxHook)|i(?:ssuerDB(?:OpenID(?:Connect)?|SAML|CAS|Get)Activation|mpersonationSkipEmptyValues)|u(?:se(?:RedirectOn(?:Forbidden|Error)|SafeJail)|2fUserCanRemoveKey|pgradeSession)|re(?:st(?:(?:Password|Session|Config|Auth)Server|ExportSecretKeys)|freshSessions)|br(?:uteForceProtection(?:IncrementalTempo)?|owsersDontStorePassword)|d(?:is(?:ablePersistentStorage|playSessionId)|biDynamicHashEnabled)|(?:mai(?:lOnPasswordChang|ntenanc)|vhostMaintenanc)e|to(?:tp2fUserCanRemoveKey|kenUseGlobalStorage)|g(?:roupsBeforeMacros|lobalLogoutTimer)|a(?:voidAssignment|ctiveTimer)|h(?:ideOldPassword|ttpOnly)|yubikey2fUserCanRemoveKey|krb(?:RemoveDomain|ByJs)|(?:wsdlServ|findUs)er)$/;
our $boolKeys = qr/^(?:s(?:aml(?:IDP(?:MetaDataOptions(?:(?:Check(?:S[LS]OMessageSignatur|Audienc|Tim)|IsPassiv)e|A(?:llow(?:LoginFromIDP|ProxiedAuthn)|daptSessionUtime)|Force(?:Authn|UTF8)|StoreSAMLToken|RelayStateURL)|SSODescriptorWantAuthnRequestsSigned)|S(?:P(?:MetaDataOptions(?:(?:CheckS[LS]OMessageSignatur|OneTimeUs)e|EnableIDPInitiatedURL|ForceUTF8)|SSODescriptor(?:WantAssertion|AuthnRequest)sSigned)|erviceUseCertificateInResponse)|DiscoveryProtocol(?:Activation|IsPassive)|CommonDomainCookieActivation|UseQueryStringSpecific|MetadataForceUTF8)|f(?:RemovedUseNotif|OnlyUpgrade)|kip(?:Upgrade|Renew)Confirmation|oap(?:Session|Config)Server|t(?:ayConnecte|orePasswor)d|laveDisplayLogo|howLanguages|slByAjax)|o(?:idc(?:RPMetaDataOptions(?:A(?:llow(?:(?:ClientCredentials|Password)Grant|Offline)|ccessToken(?:Claims|JWT))|Re(?:freshToken|quirePKCE)|LogoutSessionRequired|IDTokenForceClaims|BypassConsent|Public)|ServiceAllow(?:(?:AuthorizationCode|Implicit|Hybrid)Flow|DynamicRegistration|OnlyDeclaredScopes)|OPMetaDataOptions(?:(?:CheckJWTSignatur|UseNonc)e|StoreIDToken))|ldNotifFormat)|p(?:ortal(?:Display(?:Re(?:freshMyRights|setPassword|gister)|CertificateResetByMail|GeneratePassword|PasswordPolicy)|E(?:rrorOn(?:ExpiredSession|MailNotFound)|nablePasswordDisplay)|(?:CheckLogin|Statu)s|OpenLinkInNewWindow|ForceAuthn|AntiFrame)|roxy(?:AuthServiceImpersonation|UseSoap))|c(?:a(?:sS(?:rvMetaDataOptions(?:Gateway|Renew)|trictMatching)|ptcha_(?:register|login|mail)_enabled)|o(?:ntextSwitching(?:Allowed2fModifications|StopWithLogout)|mpactConf|rsEnabled)|heck(?:DevOps(?:D(?:isplayNormalizedHeaders|ownload))?|State|User|XSS)|rowdsec|da)|l(?:dap(?:(?:G(?:roup(?:DecodeSearchedValu|Recursiv)|etUserBeforePasswordChang)|UsePasswordResetAttribut)e|(?:AllowResetExpired|Set)Password|ChangePasswordAsUser|PpolicyControl|ITDS)|oginHistoryEnabled)|no(?:tif(?:ication(?:Server(?:(?:POS|GE)T|DELETE)?|sExplorer)?|y(?:Deleted|Other))|AjaxHook)|i(?:ssuerDB(?:OpenID(?:Connect)?|SAML|CAS|Get)Activation|mpersonationSkipEmptyValues)|u(?:se(?:RedirectOn(?:Forbidden|Error)|SafeJail)|2fUserCanRemoveKey|pgradeSession)|re(?:st(?:(?:Password|Session|Config|Auth)Server|ExportSecretKeys)|freshSessions)|br(?:uteForceProtection(?:IncrementalTempo)?|owsersDontStorePassword)|d(?:is(?:ablePersistentStorage|playSessionId)|biDynamicHashEnabled)|(?:mai(?:lOnPasswordChang|ntenanc)|vhostMaintenanc)e|to(?:tp2fUserCanRemoveKey|kenUseGlobalStorage)|g(?:roupsBeforeMacros|lobalLogoutTimer)|a(?:voidAssignment|ctiveTimer)|h(?:ideOldPassword|ttpOnly)|yubikey2fUserCanRemoveKey|krb(?:RemoveDomain|ByJs)|(?:wsdlServ|findUs)er)$/;
our @sessionTypes = ( 'remoteGlobal', 'global', 'localSession', 'persistent', 'saml', 'oidc', 'cas' );

View File

@ -51,7 +51,7 @@ our $authParameters = {
oidcParams => [qw(oidcAuthnLevel oidcRPCallbackGetParam oidcRPStateTimeout)],
openidParams => [qw(openIdAuthnLevel openIdExportedVars openIdSecret openIdIDPList)],
pamParams => [qw(pamAuthnLevel pamService)],
proxyParams => [qw(proxyAuthnLevel proxyUseSoap proxyAuthService proxyAuthServiceChoiceParam proxyAuthServiceChoiceValue proxySessionService remoteCookieName)],
proxyParams => [qw(proxyAuthnLevel proxyUseSoap proxyAuthService proxySessionService proxyAuthServiceChoiceParam proxyAuthServiceChoiceValue remoteCookieName proxyAuthServiceImpersonation)],
radiusParams => [qw(radiusAuthnLevel radiusSecret radiusServer)],
remoteParams => [qw(remotePortal remoteCookieName remoteGlobalStorage remoteGlobalStorageOptions)],
restParams => [qw(restAuthnLevel restAuthUrl restUserDBUrl restPwdConfirmUrl restPwdModifyUrl)],

View File

@ -2968,6 +2968,10 @@ qr/(?:(?:https?):\/\/(?:(?:(?:(?:(?:(?:[a-zA-Z0-9][-a-zA-Z0-9]*)?[a-zA-Z0-9])[.]
'proxyAuthServiceChoiceValue' => {
'type' => 'text'
},
'proxyAuthServiceImpersonation' => {
'default' => 0,
'type' => 'bool'
},
'proxySessionService' => {
'type' => 'text'
},

View File

@ -3621,12 +3621,17 @@ m{^(?:ldapi://[^/]*/?|\w[\w\-\.]*(?::\d{1,5})?|ldap(?:s|\+tls)?://\w[\w\-\.]*(?:
},
# Proxy
proxyAuthService => { type => 'text', },
proxySessionService => { type => 'text', },
proxyAuthServiceChoiceParam => { type => 'text', },
proxyAuthServiceChoiceValue => { type => 'text', },
remoteCookieName => { type => 'text', },
proxyUseSoap => {
proxyAuthService => { type => 'text', },
proxySessionService => { type => 'text', },
proxyAuthServiceChoiceParam => { type => 'text', },
proxyAuthServiceChoiceValue => { type => 'text', },
proxyAuthServiceImpersonation => {
type => 'bool',
default => 0,
documentation => 'Enable internal portal Impersonation',
},
remoteCookieName => { type => 'text', },
proxyUseSoap => {
type => 'bool',
default => 0,
documentation => 'Use SOAP instead of REST',

View File

@ -367,11 +367,21 @@ sub tree {
{
title => 'proxyParams',
help => 'authproxy.html',
form => 'simpleInputContainer',
nodes => [
'proxyAuthnLevel', 'proxyUseSoap', 'proxyAuthService',
'proxyAuthServiceChoiceParam', 'proxyAuthServiceChoiceValue',
'proxySessionService', 'remoteCookieName'
'proxyAuthnLevel',
'proxyUseSoap',
{
title => 'proxyInternalPortal',
form => 'simpleInputContainer',
nodes => [
'proxyAuthService',
'proxySessionService',
'proxyAuthServiceChoiceParam',
'proxyAuthServiceChoiceValue',
'remoteCookieName',
'proxyAuthServiceImpersonation',
]
}
]
},
{

View File

@ -7,7 +7,7 @@ use Lemonldap::NG::Common::Regexp;
use Lemonldap::NG::Handler::Main;
use Lemonldap::NG::Common::Util qw(getSameSite);
our $VERSION = '2.0.12';
our $VERSION = '2.0.14';
## @method hashref tests(hashref conf)
# Return a hash ref where keys are the names of the tests and values
@ -738,8 +738,8 @@ sub tests {
return ( 1,
"Impersonation and ContextSwitching are simultaneously enabled"
)
if ( $conf->{impersonationRule}
&& $conf->{contextSwitchingRule} );
if ( $conf->{impersonationRule}
and $conf->{contextSwitchingRule} );
return 1;
},
@ -1024,6 +1024,25 @@ sub tests {
if ( $conf->{authentication} eq 'Choice'
and scalar keys %{ $conf->{authChoiceModules} } == 0 );
return 1;
},
# Internal portal URL must be defined with Proxy authentication
authProxy => sub {
return ( 0,
'Proxy authentication enabled without internal portal URL' )
if ( $conf->{authentication} eq 'Proxy'
and !$conf->{proxyAuthService} );
return 1;
},
# Warn if Impersonation and proxyAuthServiceImpersonation are simultaneously enabled
impersonationProxy => sub {
return ( -1,
'Impersonation and internal portal Impersonation are simultaneously enabled'
)
if ( $conf->{impersonationRule}
and $conf->{proxyAuthServiceImpersonation} );
return 1;
}
};
}

View File

@ -813,10 +813,12 @@
"postedVars":"متغيرات للنشر",
"previous":"السابق",
"privateKey":"مفتاح الخاصة",
"proxyAuthService":"يو آر إل البوابة الداخلي",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"مستوى إثبات الهوية",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"معايير البروكسي",
"proxySessionService":"رابط اليورال لخدمة الجلسة",
"proxyUseSoap":"استخدام سواب بدلا من ريست",

View File

@ -813,10 +813,12 @@
"postedVars":"Variables to post",
"previous":"Previous",
"privateKey":"Private key",
"proxyAuthService":"Internal portal URL",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"Authentication level",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"Proxy parameters",
"proxySessionService":"Session service URL",
"proxyUseSoap":"Use SOAP instead of REST",

View File

@ -813,10 +813,12 @@
"postedVars":"Variables to post",
"previous":"Previous",
"privateKey":"Private key",
"proxyAuthService":"Internal portal URL",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"Authentication level",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"Proxy parameters",
"proxySessionService":"Session service URL",
"proxyUseSoap":"Use SOAP instead of REST",

View File

@ -813,10 +813,12 @@
"postedVars":"Variables to post",
"previous":"Previous",
"privateKey":"Clave privada",
"proxyAuthService":"URL de portal interno",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"Nivel de autentificación",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"Parámetros del proxy",
"proxySessionService":"Session service URL",
"proxyUseSoap":"Utilizar SOAP en lugar de REST",

View File

@ -813,10 +813,12 @@
"postedVars":"Variables à poster",
"previous":"Précédente",
"privateKey":"Clef privée",
"proxyAuthService":"URL du portail interne",
"proxyAuthServiceChoiceParam":"Paramètre choix du portail interne",
"proxyAuthServiceChoiceValue":"Valeur choix du portail interne",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Paramètre du choix d'authentification",
"proxyAuthServiceChoiceValue":"Valeur du choix d'authentification",
"proxyAuthServiceImpersonation":"Simulation d'identité",
"proxyAuthnLevel":"Niveau d'authentification",
"proxyInternalPortal":"Portail interne",
"proxyParams":"Paramètres Proxy",
"proxySessionService":"URL du service de session",
"proxyUseSoap":"Utiliser SOAP au lieu de REST",

View File

@ -813,10 +813,12 @@
"postedVars":"Variabili da inviare",
"previous":"Precedente",
"privateKey":"Chiave privata",
"proxyAuthService":"URL del portale interno",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"Livello di autenticazione",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"Parametri Proxy",
"proxySessionService":"URL del servizio di sessione",
"proxyUseSoap":"Usa SOAP invece di REST",

View File

@ -813,10 +813,12 @@
"postedVars":"Zmienne do opublikowania",
"previous":"Poprzedni",
"privateKey":"Prywatny klucz",
"proxyAuthService":"Wewnętrzny adres URL portalu",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"Poziom uwierzytelnienia",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"Parametry proxy",
"proxySessionService":"Adres URL usługi sesji",
"proxyUseSoap":"Użyj SOAP zamiast REST",

View File

@ -813,10 +813,12 @@
"postedVars":"Gönderilecek değişkenler",
"previous":"Önceki",
"privateKey":"Özel anahtar",
"proxyAuthService":"Dahili portal URL'si",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"Doğrulama seviyesi",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"Proxy parametreleri",
"proxySessionService":"Oturum servis URL'si",
"proxyUseSoap":"REST yerine SOAP kullan",

View File

@ -813,10 +813,12 @@
"postedVars":"Các biến gửi lên",
"previous":"Trước",
"privateKey":"Khóa cá nhân",
"proxyAuthService":"URL cổng nội bộ",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"Mức xác thực",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"Các tham số proxy",
"proxySessionService":"URL dịch vụ phiên",
"proxyUseSoap":"Sử dụng SOAP thay vì REST",

View File

@ -813,10 +813,12 @@
"postedVars":"Variables to post",
"previous":"Previous",
"privateKey":"Private key",
"proxyAuthService":"Internal portal URL",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"认证等级",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"Proxy parameters",
"proxySessionService":"Session service URL",
"proxyUseSoap":"Use SOAP instead of REST",

View File

@ -813,10 +813,12 @@
"postedVars":"要發佈的變數",
"previous":"前一個",
"privateKey":"私鑰",
"proxyAuthService":"內部首頁 URL",
"proxyAuthServiceChoiceParam":"Internal portal choice parameter",
"proxyAuthServiceChoiceValue":"Internal portal choice value",
"proxyAuthService":"URL",
"proxyAuthServiceChoiceParam":"Choice parameter",
"proxyAuthServiceChoiceValue":"Choice value",
"proxyAuthServiceImpersonation":"Impersonation",
"proxyAuthnLevel":"驗證等級",
"proxyInternalPortal":"Internal Portal",
"proxyParams":"代理伺服器參數",
"proxySessionService":"工作階段服務 URL",
"proxyUseSoap":"使用 SOAP 而非 REST",

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -57,7 +57,7 @@ sub getUser {
: ()
),
(
$self->conf->{impersonationRule} && $req->param('spoofId')
$self->conf->{proxyAuthServiceImpersonation} && $req->param('spoofId')
? ( spoofId => $req->param('spoofId') )
: ()
)

View File

@ -2,7 +2,7 @@
# Display functions for LemonLDAP::NG Portal
package Lemonldap::NG::Portal::Main::Display;
our $VERSION = '2.0.12';
our $VERSION = '2.0.14';
package Lemonldap::NG::Portal::Main;
use strict;
@ -391,7 +391,8 @@ sub display {
REGISTER_URL => $self->conf->{registerUrl},
HIDDEN_INPUTS => $self->buildHiddenForm($req),
STAYCONNECTED => $self->conf->{stayConnected},
IMPERSONATION => $self->conf->{impersonationRule},
IMPERSONATION => $self->conf->{impersonationRule}
|| $self->conf->{proxyAuthServiceImpersonation},
(
$req->data->{customScript}
? ( CUSTOM_SCRIPT => $req->data->{customScript} )

View File

@ -15,10 +15,15 @@ my $client = LLNG::Manager::Test->new( {
proxyAuthService => 'http://auth.example.com',
proxyAuthServiceChoiceParam => 'lmAuth',
proxyAuthServiceChoiceValue => '2_Password',
impersonationRule => 1
proxyAuthServiceImpersonation => 1
}
}
);
ok( $res = $client->_get( '/', accept => 'text/html' ), 'Get menu' );
ok( $res->[2]->[0] =~ m#<input name="spoofId" type="text"#,
'SpoofId input found'
) or explain( $res->[2]->[0], 'SpoofId' );
ok(
$res = $client->_post(
'/',
@ -33,7 +38,7 @@ my $id = expectCookie($res);
$client->logout($id);
clean_sessions();
count(13);
count(11);
done_testing( count() );
# Redefine LWP methods for tests
@ -45,7 +50,7 @@ sub LWP::UserAgent::request {
unless ( $req->uri->as_string =~
m%http://auth.example.com(?:/session/my/global|\?logout=1)% )
{
ok( $req->content() =~ m%user=(?:dwho|rtyler)%, 'User found' )
ok( $req->content() =~ m%user=dwho%, 'User found' )
or print STDERR Dumper( $req->content() );
ok( $req->content() =~ m%password=dwho%, 'Password found' )
or print STDERR Dumper( $req->content() );