Bugzilla – Attachment 193623 Details for
Bug 39224
Migrate SAML/Shibboleth configuration into Identity Providers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 39224: Add SAML2 as a supported identity provider protocol
0d02944.patch (text/plain), 3.29 KB, created by
Martin Renvoize (ashimema)
on 2026-02-23 11:17:03 UTC
(
hide
)
Description:
Bug 39224: Add SAML2 as a supported identity provider protocol
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2026-02-23 11:17:03 UTC
Size:
3.29 KB
patch
obsolete
>From 0d02944d6af79f6b4f3483e397272ae4da51d4e3 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@openfifth.co.uk> >Date: Sun, 22 Feb 2026 20:18:58 +0000 >Subject: [PATCH] Bug 39224: Add SAML2 as a supported identity provider > protocol > >Adds SAML2 support to the identity provider framework: > >- New Koha::Auth::Identity::Provider::SAML2 class implementing > SAML2-specific configuration and behaviour >- Registers SAML2 in the polymorphic protocol map in > Koha::Auth::Identity::Providers > >This extends the existing OAuth/OIDC provider framework to also >handle SAML2 identity providers through the same unified interface. > >Test plan: >1. Create a SAML2 identity provider > >Sponsored-by: ByWater Solutions >--- > Koha/Auth/Identity/Provider/SAML2.pm | 60 ++++++++++++++++++++++++++++ > Koha/Auth/Identity/Providers.pm | 2 + > 2 files changed, 62 insertions(+) > create mode 100644 Koha/Auth/Identity/Provider/SAML2.pm > >diff --git a/Koha/Auth/Identity/Provider/SAML2.pm b/Koha/Auth/Identity/Provider/SAML2.pm >new file mode 100644 >index 00000000000..960f57c193e >--- /dev/null >+++ b/Koha/Auth/Identity/Provider/SAML2.pm >@@ -0,0 +1,60 @@ >+package Koha::Auth::Identity::Provider::SAML2; >+ >+# This file is part of Koha. >+# >+# Koha is free software; you can redistribute it and/or modify it >+# under the terms of the GNU General Public License as published by >+# the Free Software Foundation; either version 3 of the License, or >+# (at your option) any later version. >+# >+# Koha is distributed in the hope that it will be useful, but >+# WITHOUT ANY WARRANTY; without even the implied warranty of >+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >+# GNU General Public License for more details. >+# >+# You should have received a copy of the GNU General Public License >+# along with Koha; if not, see <https://www.gnu.org/licenses>. >+ >+use Modern::Perl; >+ >+use base qw(Koha::Auth::Identity::Provider); >+ >+=head1 NAME >+ >+Koha::Auth::Identity::Provider::SAML2 - SAML2/Shibboleth identity provider class >+ >+=head1 API >+ >+=head2 Class methods >+ >+=head3 new >+ >+ my $saml2 = Koha::Auth::Identity::Provider::SAML2->new( \%{params} ); >+ >+Overloaded constructor that sets protocol to 'SAML2'. >+ >+=cut >+ >+sub new { >+ my ( $class, $params ) = @_; >+ >+ $params->{protocol} = 'SAML2'; >+ >+ return $class->SUPER::new($params); >+} >+ >+=head2 Internal methods >+ >+=head3 mandatory_config_attributes >+ >+SAML2 providers are configured at the web-server level (e.g. mod_shib). >+Koha stores optional behavioural settings in C<config> (autocreate, sync, welcome) >+but none are mandatory. >+ >+=cut >+ >+sub mandatory_config_attributes { >+ return (); >+} >+ >+1; >diff --git a/Koha/Auth/Identity/Providers.pm b/Koha/Auth/Identity/Providers.pm >index 1cd47471d5b..a07c8d994cd 100644 >--- a/Koha/Auth/Identity/Providers.pm >+++ b/Koha/Auth/Identity/Providers.pm >@@ -23,6 +23,7 @@ use Koha::Auth::Identity::Provider; > use Koha::Auth::Identity::Provider::Hostnames; > use Koha::Auth::Identity::Provider::OAuth; > use Koha::Auth::Identity::Provider::OIDC; >+use Koha::Auth::Identity::Provider::SAML2; > > use base qw(Koha::Objects); > >@@ -95,6 +96,7 @@ sub _polymorphic_map { > return { > OAuth => 'Koha::Auth::Identity::Provider::OAuth', > OIDC => 'Koha::Auth::Identity::Provider::OIDC', >+ SAML2 => 'Koha::Auth::Identity::Provider::SAML2', > }; > } > >-- >2.53.0 >
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 39224
:
189234
|
189235
|
189236
|
189237
|
189238
|
189239
|
189240
|
189241
|
189242
|
189243
|
189244
|
193618
|
193619
|
193620
|
193621
|
193622
|
193623
|
193624
|
193625
|
193626
|
193627
|
193681
|
193682
|
193683
|
193684
|
193685
|
193686
|
193687
|
193688
|
193689
|
193690
|
193691
|
193692