Skip to content

Conversation

@marius-mather
Copy link
Contributor

@marius-mather marius-mather commented Nov 24, 2025

When user accounts are managed through a single OIDC provider, we want to disable editing of username/email address/password within Galaxy and have them managed at the OIDC provider. This PR disables the username/email/password change UI within Galaxy and instead shows a read-only profile page with a link to the external OIDC profile.

Builds on #20287.

Changes:

  • Add a profile_url option to OIDC backend config
  • Add a new user preferences widget for showing/linking to the OIDC profile
  • Disable username, email and password change based on config

Screenshots:

User preferences page with new profile widget added and "change password" removed (the existing "Manage Information" widget needs to be maintained for managing Galaxy-specific information like addresses and links to other external accounts)

Screenshot 2025-11-13 at 3 43 52 pm

New OIDC profile widget:

Screenshot 2025-11-24 at 3 33 50 pm

How to test the changes?

(Select all options that apply)

  • I've included appropriate automated tests.
  • This is a refactoring of components with existing test coverage.
  • Instructions for manual testing are as follows:
    1. [add testing steps and prerequisites here if you didn't write automated tests covering all your changes]

License

  • I agree to license these and all my past contributions to the core galaxy codebase under the MIT license.

@github-actions github-actions bot added area/UI-UX area/API area/auth Authentication and authorization labels Nov 24, 2025
@github-actions github-actions bot added this to the 26.0 milestone Nov 24, 2025
@bernt-matthias
Copy link
Contributor

bernt-matthias commented Nov 24, 2025

I remember that there was a config variable where the UI for changing this information was just disabled. I authenticate against LDAP and also don't want my users to change this.

Just can't find the config at the moment. Edit:

#enable_account_interface: true

@marius-mather
Copy link
Contributor Author

In our case, we want to make sure username and email can't be edited in Galaxy, since these will come from the OIDC provider, but we still want to allow for Galaxy-specific information like addresses and other integrations (e.g. Zenodo). enable_account_interface: false disables these as well (or at least the addresses), so we need to do something a bit more complex than just having everything hinge on enable_account_interface

@nuwang
Copy link
Member

nuwang commented Dec 2, 2025

@marius-mather At the backend working group meeting, the general consensus was that we should just repurpose enable_account_interface for this. The original behaviour of hiding everything, including user properties, is undesirable, so doing what this PR does with the existing enable_account_interface switch makes the most sense.

}
is_galaxy_app = trans.webapp.name == "galaxy"
if (trans.app.config.enable_account_interface and not trans.app.config.use_remote_user) or not is_galaxy_app:
allow_profile_edit = trans.app.config.enable_account_interface
Copy link
Member

@nuwang nuwang Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The old behaviour of not letting remote users edit profile should also be preserved I think, so we can just revert that last commit.

Suggested change
allow_profile_edit = trans.app.config.enable_account_interface
allow_profile_edit = (
trans.app.config.enable_account_interface
and not trans.app.config.use_remote_user
and not trans.app.config.disable_local_accounts
)

I think what this PR was doing already was correct.

@nuwang
Copy link
Member

nuwang commented Dec 11, 2025

@ahmedhamidawan Would you also be able to do a quick once over please? I've tested it out and it all works as expected. A lot of this stuff is handled in legacy mako, so Marius has introduced a new vue component that handles just the OIDC profile info, which seems fine to me, but would appreciate your input.

Copy link
Member

@nuwang nuwang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! Thanks @marius-mather

Copy link
Member

@ahmedhamidawan ahmedhamidawan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just these minor suggestions above. Otherwise, ran locally, code and the preference both look good! Thank you!

@marius-mather
Copy link
Contributor Author

@ahmedhamidawan thanks, I've implemented your suggestion for the redirect logic

@ahmedhamidawan ahmedhamidawan merged commit a2f6a42 into galaxyproject:dev Dec 16, 2025
60 of 62 checks passed
@galaxyproject galaxyproject deleted a comment from github-actions bot Dec 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants