OpenIdentityPlatform / OpenAM

OpenAM is an open access management solution that includes Authentication, SSO, Authorization, Federation, Entitlements and Web Services Security.
https://www.openidentityplatform.org/openam
Other
773 stars 151 forks source link

OAuth2 realm config - updating 'scopes supported' requires a restart #790

Closed lscorcia closed 1 month ago

lscorcia commented 1 month ago

Describe the bug Hi, very small issue here. When editing the "scopes supported" field in the OAuth2 realm config, a server restart is required to make sure the scopes are updated in the metadata endpoint. It should be possible to update those at runtime.

To Reproduce Steps to reproduce the behavior:

  1. Go to Services > OAuth2 Provider
  2. Click on Supported Scopes, add a new scope
  3. Visit the metadata endpoint https://yourhost/openam/oauth2/realms/root/.well-known/openid-configuration
  4. See the new scope is missing.
  5. Restart the webapp
  6. Visit the metadata endpoint, see that the new scope is now present.

Expected behavior The new scope should be immediately visible.

Screenshots immagine

Additional context It seems that the issue was already fixed in the other fork openam-jp: https://github.com/openam-jp/openam/pull/155/files . The fix should be applicable to this project too by applying the same change here:

https://github.com/OpenIdentityPlatform/OpenAM/blob/48357235bd38c0019b4432215d9fdfd83fcc6da3/openam-oauth2/src/main/java/org/forgerock/oauth2/core/RealmOAuth2ProviderSettings.java#L1036-L1038

vharseko commented 1 month ago

please check artifacts from https://github.com/OpenIdentityPlatform/OpenAM/actions/runs/10936877974