Bug and confusing behaviour when trying to set a custom NameID format which is already known to the module

Created on 29 August 2024, 4 months ago

Hello all,

I have been setting up this module with a custom NameID of "urn:oasis:names:tc:SAML:2.0:nameid-format:transient":

However, every time I saved the form, one of two things was occurring; either:

1) the NameID format was reset to "Transient" and, because nowhere in the interface is the actual value of "Transient" shown, I didn't understand why my selection of "Other" wasn't persisting after save, or:

2) The "Custom NameID" option was still selected, but the custom NameID format field contained an asterisk:

Those of you familiar with this module will know that, when building the form, if a custom NameID format is entered which is already known to the module, the code in samlauth/src/Form/SamlauthConfigureTrait.php in function addNameID(array &$build, array $schema_definition, Config $config) tries to select the already-known NameID format and should clear the custom NameID field.

However, there seems to be a bug which causes the custom NameID field's value to be set to *, and the user interface doesn't explicitly list the various NameID formats.

I have coded up a fix which:

1. Adds the full NameID format string into the drop-down select options, after the "User-friendly" name, so administrators can see the exact format name when configuring NameID, and

2. Fixes the problem where the custom NameID field's value is being incorrectly set to "*".

One moment while I figure out how to do issue forks...

/Alex

🐛 Bug report
Status

Active

Version

3.10

Component

User interface

Created by

🇬🇧United Kingdom alexharries

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024