Skip to content

Anonymous access does not seem to work for OIDC auth#9278

Open
davidblasby wants to merge 1 commit into
geonetwork:mainfrom
GeoCat:_anonyous_oidc
Open

Anonymous access does not seem to work for OIDC auth#9278
davidblasby wants to merge 1 commit into
geonetwork:mainfrom
GeoCat:_anonyous_oidc

Conversation

@davidblasby

@davidblasby davidblasby commented May 14, 2026

Copy link
Copy Markdown
Contributor

For OIDC (config-security-openidconnect.xml), the new org.fao.geonet.security.GrantViewMdAuthorityFilter is not present. This adds it in.

I expect there are other security configurations that don't have this included.

Fixes #9277

Checklist

  • I have read the contribution guidelines
  • Pull request provided for main branch, backports managed with label
  • Good housekeeping of code, cleaning up comments, tests, and documentation
  • Clean commit history broken into understandable chucks, avoiding big commits with hundreds of files, cautious of reformatting and whitespace changes
  • Clean commit messages, longer verbose messages are encouraged
  • API Changes are identified in commit messages
  • Testing provided for features or enhancements using automatic tests
  • User documentation provided for new features or enhancements in manual
  • Build documentation provided for development instructions in README.md files
  • Library management using pom.xml dependency management. Update build documentation with intended library use and library tutorials or documentation

@davidblasby

Copy link
Copy Markdown
Contributor Author

This requires #9276 or you will not be able to select the "Share unpublished record preview" button.

testing notes:

docker run -e KC_BOOTSTRAP_ADMIN_PASSWORD=admin -e KC_BOOTSTRAP_ADMIN_USERNAME=admin  -p 7777:8080 -d --name simple_keycloak --rm dblasby2/simple_keycloak  start-dev

keycloak admin:  http://localhost:7777/

admin user-pass:geocat/geocat

add "http://localhost:8080/*" as valid redirect url for client "geocat-live" in realm "GeoCat-LIVE"

OIDC login: user_sample1/user_sample1. or admin/admin

realm: GeoCat-LIVE
client: geocat-live
client secret: CNwDTAKypmFhkzdfx25r7syg56VfdHuH


config: http://localhost:7777/realms/GeoCat-LIVE/.well-known/openid-configuration

env vars: 

GEONETWORK_SECURITY_TYPE=openidconnect;OPENIDCONNECT_CLIENTID=geocat-live;OPENIDCONNECT_CLIENTSECRET=CNwDTAKypmFhkzdfx25r7syg56VfdHuH;OPENIDCONNECT_SERVERMETADATA_CONFIG_URL=http://localhost:7777/realms/GeoCat-LIVE/.well-known/openid-configuration;OPENIDCONNECT_IDTOKENROLELOCATION=resource_access.geocat-live.roles;OPENIDCONNECT_ROLECONVERTER=GeoNetworkAdmin=Administrator,GeonetworkEditor=Editor

@ianwallen ianwallen added the bug label May 15, 2026
@ianwallen ianwallen added this to the 4.4.11 milestone May 15, 2026
@ianwallen ianwallen changed the title [9277] Anonymous access does not seem to work for OIDC auth Anonymous access does not seem to work for OIDC auth May 15, 2026
@ianwallen
ianwallen self-requested a review May 15, 2026 15:41
@tylerjmchugh

Copy link
Copy Markdown
Contributor

Can the same be done for openidconnectbearer? That is the type we use. I tried doing it myself to test these changes but I am still prompted for login.

@tylerjmchugh

Copy link
Copy Markdown
Contributor

It would also be nice if there was some ui config or setting to disable this feature as not everyone may want it

@josegar74 josegar74 modified the milestones: 4.4.11, 4.4.12 Jun 2, 2026
@fxprunayre fxprunayre modified the milestones: 4.4.12, 4.4.13 Jul 8, 2026
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.

Anonymous access does not seem to work for OIDC auth

6 participants