Skip to content

Align LDAP security config with db (Spring 7 follow-up) - #12732

Open
offtherailz wants to merge 1 commit into
geosolutions-it:masterfrom
offtherailz:ldap-align-hardening
Open

Align LDAP security config with db (Spring 7 follow-up)#12732
offtherailz wants to merge 1 commit into
geosolutions-it:masterfrom
offtherailz:ldap-align-hardening

Conversation

@offtherailz

Copy link
Copy Markdown
Member

Description

Follow-up to #12729. The Spring 7 upgrade (#12428) reworked both the db and ldap security configurations, but some of the wiring it added to the db configs was not mirrored on the ldap ones. This aligns the ldap security configuration with the db version.

Two changes, both already present in geostore-spring-security-db.xml:

  • Name the authentication manager: alias="authenticationManager" on <security:authentication-manager> and authentication-manager-ref="authenticationManager" on <security:http>.
  • Mark geoStoreUserServiceAuthenticationProvider with lazy-init="true" and depends-on="entityManager", so it follows the same init order as in the db config.

Applied to both ldap config copies:

  • product/config/ldap/geostore-spring-security-ldap.xml (used by the product WAR)
  • web/src/config/ldap/geostore-spring-security-ldap.xml

Testing

Built the product with the ldap profile and ran it against the acme-ldap test server from the LDAP documentation.

  • Tomcat starts cleanly, the web context loads.
  • Login as bill/hello returns the ADMIN role, bob/secret returns USER, and a wrong password returns 401.

Related to #12025.

…r init

Mirror the db security config on the ldap variants: name the
authentication-manager (alias + authentication-manager-ref on http),
and mark geoStoreUserServiceAuthenticationProvider lazy-init with
depends-on=entityManager. Same treatment geosolutions-it#12428 applied to the db
configs but missed on ldap.
@cla-bot cla-bot Bot added the CLA Ready label Jul 24, 2026
@offtherailz offtherailz added this to the 2026.03.00 milestone Jul 24, 2026
@offtherailz
offtherailz requested a review from axl8713 July 24, 2026 10:30
@tdipisa tdipisa linked an issue Jul 24, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update of Spring dependency

2 participants