Bug 40650

Summary: Identity providers lack support for extended patron attribute type mapping
Product: Koha Reporter: Oliver Behnke <oliver.behnke>
Component: AuthenticationAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: dpavlin
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40596
GIT URL: Change sponsored?: ---
Patch complexity: --- Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Oliver Behnke 2025-08-14 08:59:06 UTC
Hi,

so far we've been using LDAP authentication and with extended attribute type mapping (on register and login/update) but we have to move to OIDC. Thankfully there's an identity provider (IdP) for that. Great! However, testing and code inspection indicate that extended patron attributes can't be used for IdP mapping. When I try that I get:

> There was an error authenticating to external identity provider
> No property <ATTRIBUTE> for Koha::Patron

At first glance, the code seems to support that assessment. For instance, the "update_on_auth" feature [1] calls set() which isn't overridden in Koha::Patron so Koha::Object.set() is being called [2], which of course isn't aware of those patron-specific extended attributes, eventually triggering the error above.

To me that omission is a regression as existing auth methods like LDAP do support mapping extended patron attributes. Without that we can't rely on using identity providers since we'd lose required functionality.

Thanks

[1] https://github.com/Koha-Community/Koha/blob/8d31c2e06733fbc0f599ea99fe46df50cae7c163/Koha/Auth/Client.pm#L88
[2] https://github.com/Koha-Community/Koha/blob/8d31c2e06733fbc0f599ea99fe46df50cae7c163/Koha/Object.pm#L323