Saved SSO scopes read back doubled after a restart #448

Closed
opened 2026-11-14 03:20:10 -05:00 by claude · 0 comments
Owner

Found while the wiki SSO page (#435) was checked against a live run.

After PATCH /api/sso-settings with scopes: ["openid","profile","email"] and a restart, GET /api/sso-settings returns ["openid","profile","email","openid","profile","email"].

Cause (from reading the code, to confirm): OidcSsoOptions.Scopes (OidcSsoOptions.cs, about line 86) is initialised with the three default scopes, and the configuration binder appends the saved values to an initialised list instead of replacing it.

Wanted

  • The saved list replaces the defaults; the defaults apply only when nothing is saved. A test that saves a list, rebuilds the options from configuration and reads back exactly that list (including a list that drops a default scope).
  • Check what is sent to the identity provider today (a duplicated scope parameter) and whether a list without profile or email can be expressed at all.
  • Look for the same pattern in the other options classes: any list-valued option with a non-empty initialiser.
Found while the wiki SSO page (#435) was checked against a live run. After `PATCH /api/sso-settings` with `scopes: ["openid","profile","email"]` and a restart, `GET /api/sso-settings` returns `["openid","profile","email","openid","profile","email"]`. **Cause (from reading the code, to confirm):** `OidcSsoOptions.Scopes` (`OidcSsoOptions.cs`, about line 86) is initialised with the three default scopes, and the configuration binder appends the saved values to an initialised list instead of replacing it. **Wanted** - The saved list replaces the defaults; the defaults apply only when nothing is saved. A test that saves a list, rebuilds the options from configuration and reads back exactly that list (including a list that drops a default scope). - Check what is sent to the identity provider today (a duplicated scope parameter) and whether a list without `profile` or `email` can be expressed at all. - Look for the same pattern in the other options classes: any list-valued option with a non-empty initialiser.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#448
No description provided.