Fix GDM name display for google/generic oidc brokers#1369
Fix GDM name display for google/generic oidc brokers#1369nooreldeenmansour wants to merge 1 commit intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes GDM user preview showing the email instead of the user’s full name for the google and generic OIDC brokers by aligning the parsed ID token claim with the standard OIDC name claim (and updating test mocks + goldens accordingly).
Changes:
- Map
GenericProvider’s display-name (GECOS) field to the OIDC standardnameclaim instead of the non-standardgecosclaim. - Update the mock provider claims parsing and
genericproviderunit test to usename. - Refresh broker golden outputs to reflect
gecosbeing populated from thenameclaim.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| authd-oidc-brokers/internal/providers/genericprovider/genericprovider.go | Parse display name from standard OIDC name claim for generic/google flows. |
| authd-oidc-brokers/internal/testutils/provider.go | Align mock provider claim parsing with name so tests reflect real providers. |
| authd-oidc-brokers/internal/providers/genericprovider/genericprovider_test.go | Update test claims to supply name and validate resulting user GECOS. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Successfully_authenticate_user_with_password/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Successfully_authenticate_user_with_device_auth_and_newpassword/second_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Owner_extra_groups_configured_but_user_does_not_become_owner/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Owner_extra_groups_configured/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Extra_groups_configured/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Authenticating_with_qrcode_reacquires_token/second_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Authenticating_with_password_when_provider_supports_device_registration/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Authenticating_with_password_when_provider_authentication_is_forced/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Authenticating_with_password_refreshes_groups/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Authenticating_with_password_refreshes_expired_token/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Authenticating_with_password_keeps_old_groups_if_fetching_groups_fails/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Authenticating_with_device_auth_when_provider_supports_device_registration/second_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Authenticating_when_the_auth_data_secret_field_uses_the_old_name/first_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestIsAuthenticated/Authenticating_still_allowed_if_token_is_missing_scopes/second_call | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestConcurrentIsAuthenticated/First_auth_starts_first_then_second_starts_and_first_finishes/second_auth | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestConcurrentIsAuthenticated/First_auth_starts_first_then_second_starts_and_first_finishes/first_auth | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestConcurrentIsAuthenticated/First_auth_starts_first_but_second_finishes_first_and_is_registered_as_the_owner/second_auth | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestConcurrentIsAuthenticated/First_auth_starts_first_but_second_finishes_first/second_auth | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestConcurrentIsAuthenticated/First_auth_starts_first_but_second_finishes_first/first_auth | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestConcurrentIsAuthenticated/First_auth_starts_and_finishes_before_second/second_auth | Golden update: gecos now reflects display name from name claim. |
| authd-oidc-brokers/internal/broker/testdata/golden/TestConcurrentIsAuthenticated/First_auth_starts_and_finishes_before_second/first_auth | Golden update: gecos now reflects display name from name claim. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1369 +/- ##
==========================================
- Coverage 86.24% 80.08% -6.17%
==========================================
Files 99 20 -79
Lines 6690 984 -5706
Branches 111 0 -111
==========================================
- Hits 5770 788 -4982
+ Misses 860 196 -664
+ Partials 60 0 -60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
adombeck
left a comment
There was a problem hiding this comment.
The changes look good to me, but please squash the commit which updates the tests, so that the tests pass for each commit (for better git bisect results).
|
How about we mention in the |
tests: update golden files and fixtures for GDM full name display fix
bbafb40 to
f20b247
Compare
|
@adombeck squashed the test commit. |
Closes #1368
UDENG-9509