Override OTT conf. for Upgrade tokens (#1884)
This commit is contained in:
parent
080f83eae0
commit
78a82dbee9
|
@ -302,6 +302,10 @@ languages = en, fr, vi, it, ar, de, fi
|
||||||
; Read Lemonldap::NG::Portal::Main::Plugin(3pm) man page.
|
; Read Lemonldap::NG::Portal::Main::Plugin(3pm) man page.
|
||||||
;customPlugins = My::Package1, My::Package2
|
;customPlugins = My::Package1, My::Package2
|
||||||
|
|
||||||
|
; To avoid bad/expired OTT if authssl and auth are served by different Load Balancers
|
||||||
|
; you can override OTT configuration to store Upgrade OTT into global storage
|
||||||
|
;forceGlobalStorageUpgradeOTT = 1
|
||||||
|
|
||||||
[handler]
|
[handler]
|
||||||
|
|
||||||
; Handler cache configuration
|
; Handler cache configuration
|
||||||
|
|
|
@ -5,7 +5,7 @@ use Mouse;
|
||||||
use JSON qw(from_json to_json);
|
use JSON qw(from_json to_json);
|
||||||
use Crypt::URandom;
|
use Crypt::URandom;
|
||||||
|
|
||||||
our $VERSION = '2.0.5';
|
our $VERSION = '2.0.6';
|
||||||
|
|
||||||
extends 'Lemonldap::NG::Common::Module';
|
extends 'Lemonldap::NG::Common::Module';
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ has cache => (
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$_[0]->{p}->logger->error(
|
$_[0]->{p}->logger->error(
|
||||||
'Local storage not defined, token will be store in global storage'
|
'Local storage not defined, token will be stored into global storage'
|
||||||
);
|
);
|
||||||
return undef;
|
return undef;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@ use Lemonldap::NG::Portal::Main::Constants qw(
|
||||||
PE_TOKENEXPIRED
|
PE_TOKENEXPIRED
|
||||||
);
|
);
|
||||||
|
|
||||||
our $VERSION = '2.0.3';
|
our $VERSION = '2.0.6';
|
||||||
|
|
||||||
extends 'Lemonldap::NG::Portal::Main::Plugin';
|
extends 'Lemonldap::NG::Portal::Main::Plugin';
|
||||||
|
|
||||||
|
@ -27,6 +27,10 @@ has ott => (
|
||||||
|
|
||||||
sub init {
|
sub init {
|
||||||
my ($self) = @_;
|
my ($self) = @_;
|
||||||
|
if ( $self->conf->{forceGlobalStorageUpgradeOTT} ) {
|
||||||
|
$self->logger->debug("Upgrade token will be stored into global storage");
|
||||||
|
$self->ott->cache(undef);
|
||||||
|
}
|
||||||
$self->addAuthRoute( upgradesession => 'ask', ['GET'] );
|
$self->addAuthRoute( upgradesession => 'ask', ['GET'] );
|
||||||
$self->addAuthRoute( upgradesession => 'confirm', ['POST'] );
|
$self->addAuthRoute( upgradesession => 'confirm', ['POST'] );
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,6 +15,7 @@ my $client = LLNG::Manager::Test->new( {
|
||||||
upgradeSession => 1,
|
upgradeSession => 1,
|
||||||
authentication => 'Choice',
|
authentication => 'Choice',
|
||||||
apacheAuthnLevel => 5,
|
apacheAuthnLevel => 5,
|
||||||
|
forceGlobalStorageUpgradeOTT => 1,
|
||||||
userDB => 'Same',
|
userDB => 'Same',
|
||||||
'authChoiceModules' => {
|
'authChoiceModules' => {
|
||||||
'strong' => 'Apache;Demo;Null;;;{}',
|
'strong' => 'Apache;Demo;Null;;;{}',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user