Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PAGOPA-1841] feat: refactored queries in order to include intermediate steps #10

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

andrea-deri
Copy link
Contributor

The Technical Support APIs are a valid tool for describe events in monitoring situation. For WISP dismantling, this tool was not correctly tuned because this flow provide an high number of intermediate steps that describe the payment process in a detailed way. The previous APIs in WISP dismantling's Technical Support does not provide all the steps that were required for a detailed monitoring.
This PR contains a whole refactoring of those API. In particular, the starting query is converted into a larger set of queries that take all the necessary information from RE and returns a final batch of events with all the intermediate steps.
Also, this PR contains the conversion logic that provide the Ocp-Apim-Subscription-Key header logged in RE events to be obfuscated and secured.

List of Changes

  • refactored queries for find-by-notice-number API
  • refactored queries for find-by-iuv API
  • defined obfuscation logic on subscription-key in headers

Motivation and Context

This change is required for better perform monitoring on WISP dismantling process

How Has This Been Tested?

  • Tested in local environment
  • Tested in UAT environment

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@andrea-deri andrea-deri self-assigned this Aug 6, 2024
Copy link

github-actions bot commented Aug 6, 2024

The default action is to increase the PATCH number of SEMVER. Set IGNORE-FOR-RELEASE if you want to skip SEMVER bump. BREAKING-CHANGE and NEW-RELEASE must be run from GH Actions section manually.

Copy link

github-actions bot commented Aug 6, 2024

The default action is to increase the PATCH number of SEMVER. Set IGNORE-FOR-RELEASE if you want to skip SEMVER bump. BREAKING-CHANGE and NEW-RELEASE must be run from GH Actions section manually.

Copy link

github-actions bot commented Aug 6, 2024

Comment this PR with update_code to format the code. Consider to use pre-commit to format the code.

Copy link

sonarcloud bot commented Aug 6, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarCloud


public String obfuscateSecrets(String httpHeaders) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok to me, but why not just remove it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In certain situations, like the paaInviaRT send process, if the communication fails because of an error on Forwarder or on creditor institution, it may be useful to know whether the wisp-converter sends this header or not.

Copy link
Contributor

@cap-ang cap-ang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! 💯

just a note: check sonar issue

@andrea-deri andrea-deri merged commit c69a01b into main Aug 6, 2024
12 of 16 checks passed
@andrea-deri andrea-deri deleted the PAGOPA-1841 branch August 6, 2024 10:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants