Bug 40650 - Identity providers lack support for extended patron attribute type mapping
Summary: Identity providers lack support for extended patron attribute type mapping
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Authentication (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-08-14 08:59 UTC by Oliver Behnke
Modified: 2025-08-14 08:59 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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