Authkey extension throws NoSuchMethodError, 2.26.1 after Dec 4, 2024

Updating my docker based geoserver with geoserver-2.26-SNAPSHOT-authkey-plugin.zip last weekend I now get the error java.lang.NoSuchMethodError: ‘java.lang.String org.geoserver.security.GeoServerAuthenticationKeyFilter.authenticateFromCache(org.geoserver.security.filter.AuthenticationCachingFilter, javax.servlet.http.HttpServletRequest, boolean)’

This happens on any request to geoserver.
Removing the authkey authentication from the default filter chain, solved the problem - but is no solution.

Comparing to a geoserver instance without this problem Commit 6218a5e on Dec 9, 2024
src/extension/authkey/src/main/java/org/geoserver/security/GeoServerAuthenticationKeyFilter.java
maybe introduced this problem? Can anyone have a look on this?

Using Download geoserver-2.26.1-authkey-plugin.zip (GeoServer) instead of SNAPSHOT, the problem is gone.
gs-authkey-2.26.1.jar is from 18.11.2024

Hello @overkamp and welcome to the user forum.

I am not sure who is working with authkey as a develper presently, I guess we can look at the change you found: GEOS-11625: Add "Challenge Anonymous Sessions" Option to AuthKey Filt… · geoserver/geoserver@6218a5e · GitHub

Indeed it looks like it was part of a recent pull-request GEOS-11625: Add "Challenge Anonymous Sessions" Option to AuthKey Filter by afabiani · Pull Request #8066 · geoserver/geoserver · GitHub by @afabiani.

Alessandro there seems to be a problem with recent change mentioned above …

Hi Stefan,
quick clarification question… are you trying to use a nightly build of the authkey module with a GeoServer released version? If so, the two code bases are out of synch and are not guaranteed to work, the “no such method” error is not unexpected in that case.

A better test is to use a nightly build of GeoServer along with the same day nightly build of the authkey module. Does that work?

Cheers
Andrea

I will try tomorrow an report back. Thanks for the hint.

Yes, it works. sorry for the confusion.

1 Like