[Geoserver-devel] [JIRA] (GEOS-10740) Service enabled does not respect minimal/custom service names

Jody Garnett created an issue

GeoServer / ImprovementGEOS-10740

Service enabled does not respect minimal/custom service names

Issue Type:

ImprovementImprovement

Affects Versions:

2.22-RC

Assignee:

Unassigned

Components:

Main, Security

Created:

09/Nov/22 6:32 AM

Priority:

MediumMedium

Reporter:

Jody Garnett

Follow on to https://osgeo-org.atlassian.net/browse/GEOS-10702 ; the same problem is found in other code that assumes service.getName() is a useful value.

The root cause is the file contents being structured like:

<wms>
  <id>wms</id>
  <enabled>true</enabled>
  <name>GeoServer WMS</name>
  <title>GeoServer Web Map Service</title>

And code trying to check using info.getName() rather than info.getId(), as we learned apparently info.getId() is not especially safe either.

ServiceDescriptionProvider.isAvailable() is checking ServiceResourceProvider.getServicesForResource(layer) and needs constant it can trust to check against.

a) On review getServicesForResource(layer) checks if the ResourceInfo is compatible with the service and does not check if the service is enabled for the layer.

b) Checking ResourceInfo.getDisabledServices() list; and it is called by DisabledServiceResourceFilter (which also provides an system property org.geoserver.service.disabled used disable services externally)

Add Comment

Add Comment

Get Jira notifications on your phone! Download the Jira Cloud app for Android or iOS


This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100210-sha1:ffe1a02)

Atlassian logo