eclipse-tractusx / sig-release

https://eclipse-tractusx.github.io/sig-release
Apache License 2.0
8 stars 8 forks source link

Clearinghouse Connection Management and SD Document Job Handling #796

Open jjeroch opened 1 month ago

jjeroch commented 1 month ago

Summary:

This epic encompasses the development of a feature toggle to enable or disable the clearinghouse connectivity for Self-Description (SD) functionalities and the creation of a backend job to retrigger SD document creation for customers affected by the toggle's disablement. The need for such features arises from the current portal's implementation, which mandates the clearinghouse compliance process for creating signed json.ld for the SD legal person. Due to the instability and immaturity of the job handling SD creation, a toggle is planned for deactivation to allow users to continue with registration without the SD step. Additionally, a mechanism is needed to retrospectively generate SDs for customers who registered while the toggle was disabled.

Why:

The toggle provides an immediate workaround to bypass the current mandatory clearinghouse compliance process, which is not stable enough for reliable operation. By introducing this toggle, administrators can mitigate the impact of the job's instability on registration flows, ensuring business continuity. The subsequent job retriggering capability ensures that once the system is stable or the feature is re-enabled, the necessary SD documents can be generated for compliance and completeness.

Acceptance Criteria:

Implementation Notes:

Implementation Steps:


Test Cases for Feature Toggle CLEARINGHOUSE_CONNECT_DISABLED

  1. Toggle Accessibility

    • Verify that the toggle is accessible only to system administrators.
    • Ensure that changes to the toggle require a system restart to take effect.
  2. Toggle Functionality

    • Confirm that enabling the toggle disables the clearinghouse connectivity (incl SD Factory).
    • Confirm that disabling the toggle enables the clearinghouse connectivity (incl SD Factory).
    • Validate that application processes and connector registrations proceed without SD step when the toggle is off.
      • retest application approval process (use existing test case flow but exclude the test case for SD cretion for legal person) - run the test till the user can access the portal completely.
      • test the connector registration (managed and owned) and run the test till the connector is active. The existing test cases are good enough, the only difference is, that the connector gets no SD document and is automatically active.
  3. System Stability

    • Test that the system remains stable when the toggle is switched on and off.
    • Ensure that no SD document creation jobs are triggered while the toggle is disabled. (verify via logs)

Test Cases for GET API Endpoint

  1. API Accessibility and Security

    • Verify that the endpoints are accessible only to authenticated users with proper authorization. (CX Admin)
    • Verify that non-authorized users are not able to access the endpoints to retrieve the SD Status per company (anything beside CX Admin)
  2. API Functionality

    • Confirm that the API correctly identifies active companies with missing LegalPerson SD documents.
    • Confirm that the API correctly identifies active connectors of active companies with missing SD documents.
    • Verify that the API response with an empty array if no missing SD document records are existing.
  3. Error Handling

    • Ensure that the endpoint responds with proper error messages for bad requests or server errors.

Test Cases for Administrator-Triggered Job

  1. Job Triggering

    • Verify that only administrators can trigger the job. ~Confirm that the job can be triggered only when the toggle is reactivated.~
  2. Job Execution

    • Test the job's ability to create SD documents for all affected business partners.
    • Validate that the job handles errors gracefully and logs them accordingly.
      • if a selection of the retriggered companies/objects did run unsuccessfully (decline by SD Factory, decline by clearinghouse, decline by portal due to existing SD)
      • if none of the retriggered companies/objects did run successsfully

Test Cases for UI Notifications

  1. Notification Design and Delivery

    • Verify that the UI notifications about the status of the clearinghouse SD connectivity are clear and informative.
    • Confirm that notifications are delivered in a timely manner to the appropriate users.
  2. Notification Content

    • Check that the notification content accurately reflects the current status of the clearinghouse SD connectivity.

Additional Test Scenarios

  1. Scalability Testing
    • Verify that the system can handle a large number of SD document creation jobs (e.g. 200 missing documents).

Linked Tickets

High Prio

jjeroch commented 1 month ago

Late delivered. Reason: Go-Live Task Force decision with Association

Special Request!

jjeroch commented 1 month ago

@MaximilianHauer & @jjeroch Please add test cases ++ Deep Dive needed! Monday: 8am

jjeroch commented 1 month ago

Test Cases added ✅

jjeroch commented 1 month ago

Open discussion: with the deactivation the SD endpoint could get deactivated (e.g. managed by policy) - security is given by the workflow validations (CH is not allowed to submit data for a application in an invalid status - process worker) @MaximilianHauer

++ further specification of the runtime impact (https://github.com/eclipse-tractusx/portal-backend/issues/855) ++ re-trigger impact for closed application process workers/application checklists to be discussed/designed and correctly implemented. (https://github.com/eclipse-tractusx/portal-backend/issues/813)

Detail sessions to be planned

evegufy commented 3 weeks ago

Committers: @evegufy @Phil91 @ntruchsess @oyo

Phil91 commented 2 weeks ago

@MaximilianHauer I've added the ticket https://github.com/eclipse-tractusx/portal-backend/issues/903 to handle the retrigger process