Skip to content

Enhancement [CAT-FR-CO-05] On-Demand Asset Validation#38

Open
peleskek wants to merge 6 commits into
eclipse-xfsc:mainfrom
federated-catalogue-enhancements-2026:merge-to-upstream/CAT-FR-CO-05-On-Demand-Validation
Open

Enhancement [CAT-FR-CO-05] On-Demand Asset Validation#38
peleskek wants to merge 6 commits into
eclipse-xfsc:mainfrom
federated-catalogue-enhancements-2026:merge-to-upstream/CAT-FR-CO-05-On-Demand-Validation

Conversation

@peleskek
Copy link
Copy Markdown
Contributor

📦 [CAT-FR-CO-05] On-Demand Asset Validation — Architecture Documentation

🚀 Summary

Requirement: CAT-FR-CO-05 — On-Demand Asset Validation

This change is part of the Enhancement of XFSC Federated Catalogue. Details can be found here (permalink):

https://github.com/eclipse-xfsc/docs/blob/f3c6e6b6fbcc87732a1dfe83f060fa58a9a97873/federated-catalogue/src/docs/CAT%20Enhancement/CAT_Enhancement_Specifications%20v1.0.pdf

Documents the on-demand asset validation feature in the arc42 architecture — building block view, runtime view, and cross-cutting concepts.

✅ What's in this PR

Modified files:

  • 05_building_block_view.adoc

    • Add On-Demand Asset Validation Service section: AssetValidationService interface and
      its ValidationStrategy SPI with three implementations (ShaclValidationStrategy,
      JsonSchemaValidationStrategy, XmlSchemaValidationStrategy); ShaclValidationExecutor
      as the shared SHACL engine (used by both upload verification and on-demand paths) with
      configurable timeout (federated-catalogue.validation.shacl.timeout-seconds, default 10 s)
      and pool size; single-asset vs multi-asset dispatch rules (multi-asset restricted to SHACL,
      max federated-catalogue.validation.max-assets-per-request assets, default 20);
      POST /assets/validate endpoint reference (CAT-FR-CO-05)
    • Document asset deletion cascade: AssetStoreImpl publishes AssetDeletedEvent on deletion;
      ValidationResultCleanupListener deletes all associated validation results atomically at
      BEFORE_COMMIT via ValidationResultStore.deleteByAssetId()
    • Update ValidationResultStore class diagram to reflect the full interface: findAll,
      syncToGraph, deleteByAssetId
    • Document validator_type values: SHACL, JSON_SCHEMA, XML_SCHEMA, TRUST_FRAMEWORK
    • Document SchemaValidationService scope: SHACL validation for the upload verification
      and revalidation paths; cross-reference to the new on-demand section
    • Update admin table: JSON Schema and XML Schema validation is active via
      AssetValidationService; OWL module toggle remains unwired
  • 06_runtime_view.adoc

    • Verify Credential procedure: on-demand validation of stored assets routes through
      AssetValidationService (SHACL, JSON Schema, XML Schema); upload-flow SchemaValidationService
      is gated by federated-catalogue.verification.schema and shares ShaclValidationExecutor
      with the on-demand path
    • Delete Participant sequence diagram: Note over AssetStore captures the AssetDeletedEvent
      cascade that cleans up validation results before commit, with cross-reference to
      _validation_result_storage
  • 08_concepts.adoc

    • New Input Parsing Security cross-cutting concept: XXE hardening
      (FEATURE_SECURE_PROCESSING + empty ACCESS_EXTERNAL_DTD/ACCESS_EXTERNAL_SCHEMA) in
      XmlSchemaValidationStrategy and XML parsers; SSRF protection via JSON $ref scheme
      allowlist in JsonSchemaValidationStrategy; SPARQL injection prevention via
      requireSafeIri in SparqlGraphStore. Policy: every new validator or store accepting
      user-supplied content adopts the same posture and ships a security-path test

🔍 Related Issues

Related to PR federated-catalogue — CAT-FR-CO-05 On-Demand Asset Validation https://github.com/eclipse-xfsc/federated-catalogue/pull/43
Implements documentation for CAT-FR-CO-05 (On-Demand Asset Validation)

📋 Checklist

  • I've updated documentation if necessary
  • My changes follow the project's coding style

Sw3eks and others added 6 commits April 30, 2026 08:58
…itecture guide

- Added Validation Result Storage to the building block view summary.
- Detailed the PostgreSQL schema (`VALIDATION_RESULT` table) and data model for persisting on-demand credential validation outcomes.
- Documented the REST API endpoints for retrieval and the graph re-projection mechanism for `FAILED` records during graph rebuilts.
* docs(CAT-FR-LM-04): document validation result lifecycle in schema validation service

Add result storage and lifecycle rules (OutdatedReason enum, OUTDATED
marking on update/revoke, cascade delete on asset delete).

* feat(CAT-FR-LM-04): cleanup

* feat(CAT-FR-LM-04): resolve comment

---------

Co-authored-by: saackef <fabian.saacke@msg.group>
* [CAT-FR-CO-05] on demand validation docs

   - Add On-Demand Asset Validation Service section: AssetValidationService,
      ValidationStrategy pattern (ShaclValidationStrategy, JsonSchemaValidationStrategy,
      XmlSchemaValidationStrategy), ShaclValidationExecutor shared engine,
      multi-asset cardinality rules, max-assets-per-request and timeout config
    - Document asset deletion cascade: AssetDeletedEvent -> ValidationResultCleanupListener
      -> ValidationResultStore.deleteByAssetId (BEFORE_COMMIT atomicity)
    - validator_type column lists SHACL, JSON_SCHEMA, XML_SCHEMA, TRUST_FRAMEWORK
    - On-demand validation endpoint is POST /assets/validate
    - ValidationResultStore class diagram includes findAll, syncToGraph, deleteByAssetId
    - SchemaValidationService is scoped to the upload/revalidation path
    - Admin table reflects JSON Schema and XML Schema wiring through AssetValidationService
    - Component table refers to "asset validation"
    - Verify Credential procedure (chapter 6): on-demand validation routes through
      AssetValidationService (SHACL/JSON/XML); SchemaValidationService remains the
      upload-flow path, gated by federated-catalogue.verification.schema
    - Delete Participant sequence (chapter 6): note the AssetDeletedEvent cascade that
      cleans up validation results before commit
    - Input Parsing Security cross-cutting concept (chapter 8): XXE hardening
      (FEATURE_SECURE_PROCESSING + empty external DTD/schema access), SSRF protection
      via JSON $ref scheme allowlist, and SPARQL injection prevention via requireSafeIri

* [CAT-FR-CO-05] remove requirement ids
@peleskek peleskek changed the title Merge to upstream/cat fr co 05 on demand validation Enhancement [CAT-FR-CO-05] On-Demand Asset Validation May 12, 2026
@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants