Bugzilla – Attachment 60800 Details for
Bug 17776
Shibboleth Authentication is broken in plack
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Enable Shibboleth for Plack
Enable-Shibboleth-for-Plack.patch (text/plain), 1.89 KB, created by
Martin Renvoize
on 2017-03-02 16:43:37 UTC
(
hide
)
Description:
Enable Shibboleth for Plack
Filename:
MIME Type:
Creator:
Martin Renvoize
Created:
2017-03-02 16:43:37 UTC
Size:
1.89 KB
patch
obsolete
>From 268aee92064036c3e6f90bfcdce5e1d4f6738da0 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Thu, 2 Mar 2017 16:40:11 +0000 >Subject: [PATCH] Enable Shibboleth for Plack > >https://bugs.koha-community.org/show_bug.cgi?id=17776 >--- > C4/Auth_with_shibboleth.pm | 21 ++++++++++++++++++--- > 1 file changed, 18 insertions(+), 3 deletions(-) > >diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm >index cde0ede..3063941 100644 >--- a/C4/Auth_with_shibboleth.pm >+++ b/C4/Auth_with_shibboleth.pm >@@ -25,6 +25,7 @@ use Koha::AuthUtils qw(get_script_name); > use Koha::Database; > use Carp; > use CGI; >+use List::Util qw(any); > > use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $debug); > >@@ -80,9 +81,14 @@ sub get_login_shib { > my $config = _get_shib_config(); > > my $matchAttribute = $config->{mapping}->{ $config->{matchpoint} }->{is}; >- $debug and warn $matchAttribute . " value: " . $ENV{$matchAttribute}; > >- return $ENV{$matchAttribute} || ''; >+ if ( any { /(^psgi|^plack)/i } keys %ENV ) { >+ $debug and warn $matchAttribute . " value: " . $ENV{"HTTP_".uc($matchAttribute)}; >+ return $ENV{"HTTP_".uc($matchAttribute)} || ''; >+ } else { >+ $debug and warn $matchAttribute . " value: " . $ENV{$matchAttribute}; >+ return $ENV{$matchAttribute} || ''; >+ } > } > > # Checks for password correctness >@@ -217,11 +223,20 @@ Map their attributes to what you want to see in koha > > Tell apache that we wish to allow koha to authenticate via shibboleth. > >-This is as simple as adding the below to your virtualhost config: >+This is as simple as adding the below to your virtualhost config (for CGI running): >+ >+ <Location /> >+ AuthType shibboleth >+ Require shibboleth >+ </Location> >+ >+Or (for Plack running): > > <Location /> > AuthType shibboleth > Require shibboleth >+ ShibUseEnvironment Off >+ ShibUseHeaders On > </Location> > > =item 5. >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 17776
:
60800
|
60847
|
61426
|
68216
|
79572
|
79573
|
80000
|
80001
|
80002
|
80003
|
80023
|
80024
|
80025
|
80026