From 2cb221b4e0476a02c1a8b3dd10e96ed7f1d2c906 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Mon, 24 Jun 2019 18:51:15 +0200 Subject: [PATCH 1/8] Set cache_depth to 3 in local config cache (Fixes: #1814) --- e2e-tests/lemonldap-ng.ini | 2 +- lemonldap-ng-common/lemonldap-ng.ini | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e-tests/lemonldap-ng.ini b/e2e-tests/lemonldap-ng.ini index aa49c3de6..90c53abc7 100644 --- a/e2e-tests/lemonldap-ng.ini +++ b/e2e-tests/lemonldap-ng.ini @@ -13,7 +13,7 @@ dirName=__pwd__/e2e-tests/conf ; 'default_expires_in' => 600, \ ; 'directory_umask' => '007', \ ; 'cache_root' => '__pwd__/e2e-tests/conf', \ -; 'cache_depth' => 0, \ +; 'cache_depth' => 3, \ ;} [portal] diff --git a/lemonldap-ng-common/lemonldap-ng.ini b/lemonldap-ng-common/lemonldap-ng.ini index c3161ef61..23e018e06 100644 --- a/lemonldap-ng-common/lemonldap-ng.ini +++ b/lemonldap-ng-common/lemonldap-ng.ini @@ -159,7 +159,7 @@ dirName=/var/lib/lemonldap-ng/conf ; 'default_expires_in' => 600, \ ; 'directory_umask' => '007', \ ; 'cache_root' => '/tmp', \ -; 'cache_depth' => 0, \ +; 'cache_depth' => 3, \ ; } localStorage=Cache::FileCache localStorageOptions={ \ @@ -167,7 +167,7 @@ localStorageOptions={ \ 'default_expires_in' => 600, \ 'directory_umask' => '007', \ 'cache_root' => '/tmp', \ - 'cache_depth' => 0, \ + 'cache_depth' => 3, \ } [portal] From 442a26a5378aa14e72d252916dcbc7bd76a3f6f7 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Mon, 24 Jun 2019 19:05:10 +0200 Subject: [PATCH 2/8] Remove localStorage purge (see #1815) --- lemonldap-ng-handler/eg/scripts/purgeLocalCache | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lemonldap-ng-handler/eg/scripts/purgeLocalCache b/lemonldap-ng-handler/eg/scripts/purgeLocalCache index 7929c7187..2e8022989 100755 --- a/lemonldap-ng-handler/eg/scripts/purgeLocalCache +++ b/lemonldap-ng-handler/eg/scripts/purgeLocalCache @@ -29,14 +29,6 @@ if ($localconf) { print "Configuration loaded\n" if $debug; -# Handler cache -if ( $conf->{localStorage} ) { - eval "require $conf->{localStorage}"; - $conf->{localStorageOptions}->{default_expires_in} ||= 600; - my $c = $conf->{localStorage}->new( $conf->{localStorageOptions} ); - $c->purge(); -} - # Session cache if ( $conf->{localSessionStorage} ) { eval "require $conf->{localSessionStorage}"; From 9df3d57bc9417f35964cb1e6a94d951b8d7c9a07 Mon Sep 17 00:00:00 2001 From: Xavier Date: Mon, 24 Jun 2019 23:06:15 +0200 Subject: [PATCH 3/8] In REST, PE_LOGOUT_OK must return 200 --- lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm index 63d11e365..1c86f572b 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Main/Run.pm @@ -232,7 +232,7 @@ sub do { [qq'{"result":0,"error":$err}'] ]; } - elsif ( $err > 0 and $err != PE_PASSWORD_OK ) { + elsif ( $err > 0 and $err != PE_PASSWORD_OK and $err != PE_LOGOUT_OK ) { return $self->sendJSONresponse( $req, { result => 0, error => $err }, From c5d6bc42b6966e2fa2268f298fc0c987d949985c Mon Sep 17 00:00:00 2001 From: Xavier Date: Mon, 24 Jun 2019 23:07:34 +0200 Subject: [PATCH 4/8] Add get_key_from_all_sessions in Apache::Session::REST (#1813) --- .../NG/Common/Apache/Session/REST.pm | 43 +++++++++++++------ .../Lemonldap/NG/Portal/Plugins/RESTServer.pm | 16 ++++++- .../t/34-Auth-Proxy-and-REST-Server.t | 36 +++++++++++++--- 3 files changed, 74 insertions(+), 21 deletions(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm index 54114a7ad..ea0ac548b 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm @@ -5,7 +5,7 @@ use Lemonldap::NG::Common::UserAgent; use Lemonldap::NG::Common::Apache::Session::Generate::SHA256; use JSON qw(from_json to_json); -our $VERSION = '2.0.0'; +our $VERSION = '2.0.5'; our @ISA = qw(Lemonldap::NG::Common::Apache::Session::Generate::SHA256); @@ -270,26 +270,43 @@ sub delete { ## @method get_key_from_all_sessions() # Not documented. sub get_key_from_all_sessions() { - die "Not implemented"; my ( $class, $args, $data ) = @_; my $self = bless {}, $class; - foreach (qw(baseUrl user password realm)) { + foreach (qw(baseUrl user password realm lwpOpts lwpSslOpts kind)) { $self->{$_} = $args->{$_}; } die('baseUrl is required') unless ( $self->{baseUrl} ); - if ( ref($data) eq 'CODE' ) { + my $req = HTTP::Request->new( POST => $self->base . '?all=1' ); + $self->{data} = { data => ( ref($data) eq 'CODE' ? {} : $data ) }; + eval { + $self->{data}->{__secret} = + Lemonldap::NG::Handler::Main->tsv->{cipher}->encrypt(time); + }; + print STDERR "$@\n" if ($@); + $req->content( to_json( $self->{data} ) ); + delete $self->{data}->{__secret}; + $req->header( 'Content-Type' => 'application/json' ); + my $resp = $self->ua->request($req); - #my $r = $self->_soapCall( "get_key_from_all_sessions", $args ); - #my $res; - #if ($r) { - # foreach my $k ( keys %$r ) { - # my $tmp = &$data( $r->{$k}, $k ); - # $res->{$k} = $tmp if ( defined($tmp) ); - # } - #} + if ( $resp->is_success ) { + my $res; + eval { $res = from_json( $resp->content, { allow_nonref => 1 } ) }; + if ($@) { + die "Bad REST response: $@"; + } + if ( ref($data) eq 'CODE' ) { + my $r; + foreach my $k ( keys %$res ) { + my $tmp = &$data( $res->{$k}, $k ); + $r->{$k} = $tmp if ( defined($tmp) ); + } + $res = $r; + } + return $res; } else { - #return $self->_soapCall( "get_key_from_all_sessions", $args, $data ); + print STDERR "REST server returns " . $resp->status_line; + return; } } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm index 273624290..d7f276e5c 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm @@ -48,7 +48,7 @@ use Mouse; use JSON qw(from_json to_json); use MIME::Base64; -our $VERSION = '2.0.0'; +our $VERSION = '2.0.5'; extends 'Lemonldap::NG::Portal::Main::Plugin'; @@ -203,7 +203,7 @@ sub newSession { if ( $t = $self->conf->{cipher}->decrypt($s) and $t <= time - and $t > time - 30 ) + and $t > time - 15 ) { $force = 1; } @@ -212,6 +212,18 @@ sub newSession { } } + if ( $req->param('all') and not $id ) { + return $self->p->sendError( $req, + 'Bad key, refuse to send all sessions', 400 ) + unless ($force); + my $data = $infos->{data}; + my $opts = $self->conf->{globalStorageOptions} || {}; + $opts->{backend} = $self->conf->{globalStorage}; + my $sessions = + Lemonldap::NG::Common::Apache::Session->get_key_from_all_sessions( + $opts, $data ); + return $self->p->sendJSONresponse( $req, $sessions ); + } my $session = $self->getApacheSession( $mod, $id, $infos, $force ); return $self->p->sendError( $req, 'Unable to create session', 500 ) unless ($session); diff --git a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t index e8a20ce31..85731673f 100644 --- a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t +++ b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t @@ -16,12 +16,11 @@ my %handlerOR = ( issuer => [], sp => [] ); LWP::Protocol::PSGI->register( sub { my $req = Plack::Request->new(@_); - ok( - $req->uri =~ m#http://auth.idp.com(.*)#, - ' @ REST request (' . $req->method . " $1)" - ); + ok( $req->uri =~ m#http://auth.idp.com([^\?]*?)(?:\?(.*))?$#, + ' @ REST request (' . $req->method . " $1)" ); count(1); - my $url = $1; + my $url = $1; + my $query = $2; my $res; my $s = $req->content; if ( $req->method =~ /^(post|put)$/i ) { @@ -31,6 +30,7 @@ LWP::Protocol::PSGI->register( $res = $issuer->$mth( $url, IO::String->new($s), + ( $query ? ( query => $query ) : () ), length => length($s), type => $req->header('Content-Type'), ), @@ -38,13 +38,14 @@ LWP::Protocol::PSGI->register( ); count(1); expectOK($res); - $idpId = expectCookie($res); + $idpId = expectCookie($res) unless ( $req->param('all') ); } elsif ( $req->method =~ /^(get|delete)$/i ) { my $mth = '_' . lc($1); ok( $res = $issuer->$mth( $url, + ( $query ? ( query => $query ) : () ), accept => $req->header('Accept'), cookie => $req->header('Cookie') ), @@ -168,6 +169,29 @@ ok( $res = $issuer->_get("/sessions/global/$newId/cn"), 'Verify cn' ); ok( $res->[2]->[0] eq 'CN', ' CN is good' ); count(2); +use_ok('Lemonldap::NG::Common::Apache::Session::REST'); +ok( + $res = + Lemonldap::NG::Common::Apache::Session::REST->get_key_from_all_sessions( { + baseUrl => 'http://auth.idp.com/sessions/global/', + } + ), + 'Search all sessions' +); + +if ( ok( ref($res) eq 'HASH', ' Result is an hash' ) ) { + my $tmp = 1; + foreach ( keys %$res ) { + unless ( $res->{$_}->{_session_id}, ' session id exists' ) { + $tmp = 0; + diag "Bad session:\n" . Dumper( $res->{$_} ); + } + } + ok( $tmp, ' All sessions are valid' ); + count(1); +} +count(3); + # Del new session ok( $res = $issuer->app->( { From ddde26fa1c59132e215ad062d20a04bd67f86d18 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Tue, 25 Jun 2019 09:18:58 +0200 Subject: [PATCH 5/8] Add searchOn() in Apache::Session::REST (#1813) --- .../NG/Common/Apache/Session/REST.pm | 36 +++++++++++++------ .../Lemonldap/NG/Portal/Plugins/RESTServer.pm | 17 +++++++-- .../t/34-Auth-Proxy-and-REST-Server.t | 33 +++++++++++++++-- 3 files changed, 70 insertions(+), 16 deletions(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm index ea0ac548b..0fbcf5462 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm @@ -267,17 +267,39 @@ sub delete { return ( $resp->is_success ? 1 : 0 ); } +sub searchOn { + my ( $class, $args, $selectField, $value, @fields ) = @_; + return $class->_getAll( "all=1&search=$selectField,$value", + $args, ( @fields ? \@fields : () ) ); +} + ## @method get_key_from_all_sessions() # Not documented. sub get_key_from_all_sessions() { my ( $class, $args, $data ) = @_; + my $res = $class->_getAll( 'all=1', $args, $data ); + return unless $res; + + if ( ref($data) eq 'CODE' ) { + my $r; + foreach my $k ( keys %$res ) { + my $tmp = &$data( $res->{$k}, $k ); + $r->{$k} = $tmp if ( defined($tmp) ); + } + $res = $r; + } + return $res; +} + +sub _getAll { + my ( $class, $query, $args, $data ) = @_; my $self = bless {}, $class; foreach (qw(baseUrl user password realm lwpOpts lwpSslOpts kind)) { $self->{$_} = $args->{$_}; } - die('baseUrl is required') unless ( $self->{baseUrl} ); - my $req = HTTP::Request->new( POST => $self->base . '?all=1' ); $self->{data} = { data => ( ref($data) eq 'CODE' ? {} : $data ) }; + die('baseUrl is required') unless ( $self->{baseUrl} ); + my $req = HTTP::Request->new( POST => $self->base . "?$query" ); eval { $self->{data}->{__secret} = Lemonldap::NG::Handler::Main->tsv->{cipher}->encrypt(time); @@ -294,18 +316,10 @@ sub get_key_from_all_sessions() { if ($@) { die "Bad REST response: $@"; } - if ( ref($data) eq 'CODE' ) { - my $r; - foreach my $k ( keys %$res ) { - my $tmp = &$data( $res->{$k}, $k ); - $r->{$k} = $tmp if ( defined($tmp) ); - } - $res = $r; - } return $res; } else { - print STDERR "REST server returns " . $resp->status_line; + print STDERR "REST server returns " . $resp->status_line . "\n"; return; } } diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm index d7f276e5c..1359f7748 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm @@ -219,9 +219,20 @@ sub newSession { my $data = $infos->{data}; my $opts = $self->conf->{globalStorageOptions} || {}; $opts->{backend} = $self->conf->{globalStorage}; - my $sessions = - Lemonldap::NG::Common::Apache::Session->get_key_from_all_sessions( - $opts, $data ); + my $sessions; + if ( my $query = $req->param('search') ) { + my ( $field, @values ) = split /,/, $query; + $sessions = Lemonldap::NG::Common::Apache::Session->searchOn( + $opts, $field, + join( ',', @values ), + ( $data ? @$data : () ) + ); + } + else { + $sessions = + Lemonldap::NG::Common::Apache::Session + ->get_key_from_all_sessions( $opts, $data ); + } return $self->p->sendJSONresponse( $req, $sessions ); } my $session = $self->getApacheSession( $mod, $id, $infos, $force ); diff --git a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t index 85731673f..86328e385 100644 --- a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t +++ b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t @@ -179,19 +179,48 @@ ok( 'Search all sessions' ); +my ( $c1, $c2 ) = ( 0, 0 ); if ( ok( ref($res) eq 'HASH', ' Result is an hash' ) ) { my $tmp = 1; foreach ( keys %$res ) { - unless ( $res->{$_}->{_session_id}, ' session id exists' ) { + $c1++; + unless ( $res->{$_}->{_session_id} ) { $tmp = 0; diag "Bad session:\n" . Dumper( $res->{$_} ); } } + ok( $c1, " Found $c1 sessions" ); ok( $tmp, ' All sessions are valid' ); - count(1); + count(2); } count(3); +ok( + $res = Lemonldap::NG::Common::Apache::Session::REST->searchOn( { + baseUrl => 'http://auth.idp.com/sessions/global/' + }, + 'uid', 'dwho' + ), + 'Search dwho sessions' +); +if ( ok( ref($res) eq 'HASH', ' Result is an hash' ) ) { + my $tmp = 1; + foreach ( keys %$res ) { + $c2++; + unless ( $res->{$_}->{_session_id} ) { + $tmp = 0; + diag "Bad session:\n" . Dumper( $res->{$_} ); + } + } + ok( $c2, " Found $c2 sessions" ); + ok( $tmp, ' All sessions are valid' ); + count(2); +} + +ok( $c2 < $c1, + 'searchOn() count is lower than get_key_from_all_sessions() count' ); +count(3); + # Del new session ok( $res = $issuer->app->( { From 93ccb9fd7680a54a6908373cefe571975fcf6a96 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Tue, 25 Jun 2019 09:37:37 +0200 Subject: [PATCH 6/8] Set Content-Length in Apache::Session::REST requests (#1813) --- .../lib/Lemonldap/NG/Common/Apache/Session/REST.pm | 10 +++++++--- .../lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm index 0fbcf5462..a6c743147 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm @@ -227,9 +227,11 @@ sub save { Lemonldap::NG::Handler::Main->tsv->{cipher}->encrypt(time); }; print STDERR "$@\n" if ($@); - $req->content( to_json( $self->{data} ) ); + my $content = to_json( $self->{data} ); + $req->content($content); delete $self->{data}->{__secret}; - $req->header( 'Content-Type' => 'application/json' ); + $req->header( 'Content-Type' => 'application/json' ); + $req->header( 'Content-Length' => length($content) ); my $resp = $self->ua->request($req); if ( $resp->is_success ) { @@ -305,7 +307,9 @@ sub _getAll { Lemonldap::NG::Handler::Main->tsv->{cipher}->encrypt(time); }; print STDERR "$@\n" if ($@); - $req->content( to_json( $self->{data} ) ); + my $content = to_json( $self->{data} ); + $req->content($content); + $req->header( 'Content-Length' => length($content) ); delete $self->{data}->{__secret}; $req->header( 'Content-Type' => 'application/json' ); my $resp = $self->ua->request($req); diff --git a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm index 1359f7748..d8f03ed8f 100644 --- a/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm +++ b/lemonldap-ng-portal/lib/Lemonldap/NG/Portal/Plugins/RESTServer.pm @@ -6,6 +6,8 @@ # * GET /sessions/// : get a session key value # * GET /sessions///[k1,k2] : get some session key value # * POST /sessions/ : create a session +# * POST /sessions/?all=1 : get all sessions (needs a token) +# * POST /sessions/?all=1&search=uid,dwho: search all sessions where uid=dwho (needs a token) # * PUT /sessions// : update some keys # * DELETE /sessions// : delete a session # From 390ccb4f5b619ae138cc426df22b9c5ee5f417f0 Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Tue, 25 Jun 2019 09:48:15 +0200 Subject: [PATCH 7/8] Fix Apache::Session::REST::get_key_from_all_sessions when using CODE (#1813) --- .../Lemonldap/NG/Common/Apache/Session/REST.pm | 2 +- .../t/34-Auth-Proxy-and-REST-Server.t | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm index a6c743147..e54bdfda3 100644 --- a/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm +++ b/lemonldap-ng-common/lib/Lemonldap/NG/Common/Apache/Session/REST.pm @@ -299,7 +299,7 @@ sub _getAll { foreach (qw(baseUrl user password realm lwpOpts lwpSslOpts kind)) { $self->{$_} = $args->{$_}; } - $self->{data} = { data => ( ref($data) eq 'CODE' ? {} : $data ) }; + $self->{data} = { data => ( ref($data) eq 'CODE' ? undef : $data ) }; die('baseUrl is required') unless ( $self->{baseUrl} ); my $req = HTTP::Request->new( POST => $self->base . "?$query" ); eval { diff --git a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t index 86328e385..ad44fed57 100644 --- a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t +++ b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t @@ -195,6 +195,24 @@ if ( ok( ref($res) eq 'HASH', ' Result is an hash' ) ) { } count(3); +ok($res=Lemonldap::NG::Common::Apache::Session::REST->get_key_from_all_sessions( {baseUrl => 'http://auth.idp.com/sessions/global/'},sub{return 'a'}),'Search all sessions with a code'); + +if ( ok( ref($res) eq 'HASH', ' Result is an hash' ) ) { + my $tmp = 1; + my $c = 0; + foreach ( keys %$res ) { + $c++; + unless ( $res->{$_} eq 'a' ) { + $tmp = 0; + diag "Bad session:\n" . Dumper( $res->{$_} ); + } + } + ok( $c == $c1, " Found the same count") or explain($c,$c1); + ok( $tmp, ' All sessions are valid' ); + count(2); +} +count(1); + ok( $res = Lemonldap::NG::Common::Apache::Session::REST->searchOn( { baseUrl => 'http://auth.idp.com/sessions/global/' From e91f6df254f5b856a7e7fef1c133d11daa45530e Mon Sep 17 00:00:00 2001 From: Xavier Guimard Date: Tue, 25 Jun 2019 10:00:46 +0200 Subject: [PATCH 8/8] Fix test count (#1813) --- lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t index ad44fed57..6ab334d22 100644 --- a/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t +++ b/lemonldap-ng-portal/t/34-Auth-Proxy-and-REST-Server.t @@ -211,7 +211,7 @@ if ( ok( ref($res) eq 'HASH', ' Result is an hash' ) ) { ok( $tmp, ' All sessions are valid' ); count(2); } -count(1); +count(2); ok( $res = Lemonldap::NG::Common::Apache::Session::REST->searchOn( {