EntityDescriptorItemIdPopulationStage can issue ConstraintViolation at run time with bad data

Description

EntityDescriptorItemIdPopulationStage will throw a constraint violation exception at run time with bad data:

  • An EntityDescriptor lacking an entityID attribute entirely,

  • An EntityDescriptor whose entityID is an empty string.

Neither of these situations is schema-valid (entityID is use="required" and of type anyURI, so must be present and cannot be empty) but an exception is probably the wrong result as it will terminate the whole pipeline.

This probably isn’t reachable by most deployers as a bad entityID would be caught by schema validation in most deployments.

One option would be to turn this into an ErrorStatus, but I’m wary of doing that for something that isn’t an intentional check.

A reasonable alternative would be to treat it in the same way as the stage currently treats an item which isn’t an EntityDescriptor, and just complete silently.

Environment

None

Activity

Ian YoungMarch 28, 2023 at 2:07 PM

Done, commit 44ba0d6d.

Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Created March 27, 2023 at 2:54 PM
Updated May 16, 2024 at 12:37 PM
Resolved March 28, 2023 at 2:12 PM

Flag notifications