Skip to content

geonetwork: not overriding as intended? #87

Open
@severo

Description

@severo

In config-security-georchestra.xml, we have:

<ctx:property-override location="WEB-INF/config-security/config-security-overrides.properties" order="2"/>
<ctx:property-override location="file:${georchestra.datadir}/geonetwork/geonetwork-security-overrides.properties" order="1" ignore-resource-not-found="true" />
<!-- using the one from the geOrchestra datadir first (if available) -->
<ctx:property-placeholder location="file:${georchestra.datadir}/geonetwork/geonetwork.properties" ignore-resource-not-found="true" ignore-unresolvable="true" order="1"/>

and the comments seem to mean that file:${georchestra.datadir}/geonetwork/geonetwork.properties would be the file of highest priority to override the beans properties.

But the property-placeholder tag used is not intended for that, it only provides the XML Spring configuration file with values for the placeholders. Meanwhile, the property-override tag used in the previous two lines is intended to directly replace the properties of bean, without using a placeholder. To do that, the properties inside the file:${georchestra.datadir}/geonetwork/geonetwork-security-overrides.properties file, for example, explicitly mention the bean to be modified (see , it will replace the mapping[name] property inside the ldapUserContextMapper bean).

I don't know if it's the expected behavior, but clearly, the file:${georchestra.datadir}/geonetwork/geonetwork.properties file shouldn't be used with the property-override tag, since the format of the strings is different between the "placeholder" and the "override" properties files.

Note that it's somewhat related to georchestra/georchestra#2123.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions