Skip to content

add OIDC SSO authentication mode via activeadmin-oidc#1980

Merged
dmitry-sinina merged 6 commits intomasterfrom
feature/oidc-sso
Apr 10, 2026
Merged

add OIDC SSO authentication mode via activeadmin-oidc#1980
dmitry-sinina merged 6 commits intomasterfrom
feature/oidc-sso

Conversation

@Fivell
Copy link
Copy Markdown
Contributor

@Fivell Fivell commented Apr 10, 2026

  • Add AdminUserOidcHandler concern (omniauthable + trackable + ip_allowable, password auth disabled via valid_password? returning false)
  • File-gated mode selection: config/oidc.yml > config/ldap.yml > database
  • AdminUser.external_auth? helper replaces ldap?-only guards in admin UI
  • on_login hook filters IdP roles against AdminUser.available_roles, falls back to default_roles, denies login when no role matches
  • Migration adds provider, uid, oidc_raw_info columns + partial unique index
  • Login view conditionally hides password form in OIDC mode, uses form_tag + submit_tag for SSO button to match ActiveAdmin theme CSS
  • Gem sourced from github: activeadmin-plugins/activeadmin-oidc

Fivell added 2 commits April 10, 2026 10:00
- Add AdminUserOidcHandler concern (omniauthable + trackable + ip_allowable,
  password auth disabled via valid_password? returning false)
- File-gated mode selection: config/oidc.yml > config/ldap.yml > database
- AdminUser.external_auth? helper replaces ldap?-only guards in admin UI
- on_login hook filters IdP roles against AdminUser.available_roles,
  falls back to default_roles, denies login when no role matches
- Migration adds provider, uid, oidc_raw_info columns + partial unique index
- Login view conditionally hides password form in OIDC mode, uses
  form_tag + submit_tag for SSO button to match ActiveAdmin theme CSS
- Gem sourced from github: activeadmin-plugins/activeadmin-oidc
…O issue

- Fix Bundler/OrderedGems and Layout offenses
- Fix valid_password? override shadowed by Devise MRO (use define_method after devise call)
- Fix .configuration -> .config typo in OIDC feature specs
- Fix route spec to use actual request instead of route_to matcher
- Fix admin_users_form spec to use string paths instead of missing helpers
- Fix initializer spec: stub AdminUser.available_roles, add persisted?/enabled? doubles
- Remove admin_user_class test (initializer no longer sets it)
@Fivell
Copy link
Copy Markdown
Contributor Author

Fivell commented Apr 10, 2026

image

Fivell added 4 commits April 10, 2026 11:14
Remove manual OmniAuth strategy registration, view path overrides,
and test stubs — all now handled by the activeadmin-oidc gem's engine
and built-in test helpers.
…dmin

The on_login lambda intersects IdP-claimed roles with
AdminUser.available_roles (root, user, reporter). Using admin caused
empty intersection and login denial.
- Use RFC-compliant test emails (alice@test.com instead of alice@test)
  to pass AdminUser email format validation
- Fix admin_users_form_spec URLs: yeti-web uses root namespace so
  paths are /admin_users not /admin/admin_users
- Update gem to d6dbc83 which fixes OmniAuth 2.x CSRF check in
  test mode stubs
@Fivell Fivell requested a review from dmitry-sinina April 10, 2026 11:49
@dmitry-sinina dmitry-sinina changed the title WIP add OIDC SSO authentication mode via activeadmin-oidc add OIDC SSO authentication mode via activeadmin-oidc Apr 10, 2026
@dmitry-sinina dmitry-sinina merged commit 69d512b into master Apr 10, 2026
15 checks passed
@Fivell Fivell deleted the feature/oidc-sso branch April 11, 2026 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants