-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
refactor(business_profile): use concrete types for JSON fields #5531
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…fig` and `payout_link_config` fields within `Secret` in diesel and domain models This also requires the `webhook_details` field in merchant account to be wrapped within `Secret`.
…ation_connector_details` in v2 diesel and domain models
SanchithHegde
added
A-framework
Area: Framework
S-waiting-on-review
Status: This PR has been implemented and needs to be reviewed
C-refactor
Category: Refactor
api-v2
labels
Aug 5, 2024
hyperswitch-bot
bot
added
the
M-api-contract-changes
Metadata: This PR involves API contract changes
label
Aug 5, 2024
Narayanbhat166
previously approved these changes
Aug 6, 2024
jarnura
requested changes
Aug 6, 2024
…ves on diesel models
…ead of `serde_json::Value` for `authentication_connector_details` in diesel and domain models
…on::Value` for `webhook_details` in diesel and domain models
…nessPayoutLinkConfig` instead of `serde_json::Value` in diesel and domain models
…wn on `BusinessProfileUpdate` enum
SanchithHegde
changed the title
refactor(business_profile): wrap some JSON fields within
refactor(business_profile): use concrete types for JSON fields
Aug 6, 2024
Secret
SanchithHegde
force-pushed
the
business-profile-secret-json-fields
branch
from
August 6, 2024 22:28
7f36de0
to
752ed4a
Compare
jarnura
approved these changes
Aug 7, 2024
Narayanbhat166
approved these changes
Aug 7, 2024
pixincreate
removed
the
S-waiting-on-review
Status: This PR has been implemented and needs to be reviewed
label
Aug 7, 2024
pixincreate
added a commit
that referenced
this pull request
Aug 7, 2024
…e-connector-label-cypress * 'main' of github.com:juspay/hyperswitch: feat(core): add support for payment links localization (#5530) refactor(router): refactor `merchant_connector_account` retrieve and delete v2 apis (#5528) feat(cypress): add core flow tests (#5546) feat(cypress): add mandates and refunds variation cases (#5513) feat(cypress): add configs for not overriding screenshots (#5524) refactor(business_profile): use concrete types for JSON fields (#5531) feat(customer_v2): add customer create v2 endpoint (#5444) refactor(connector): added amount conversion framework for Mifinity (#5460) refactor(connector): added amount conversion framework for Boku (#5459) chore(version): 2024.08.07.0
5 tasks
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
A-framework
Area: Framework
api-v2
C-refactor
Category: Refactor
M-api-contract-changes
Metadata: This PR involves API contract changes
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Type of Change
Description
This PR involves using concrete types for the
webhook_details
,payment_link_config
andpayout_link_config
fields in the business profile v1 domain and diesel models instead ofserde_json::Value
. As part of this change, thewebhook_details
within the merchant account domain and diesel models had to be updated as well.Motivation and Context
This serves two purposes, to prevent sensitive information from possibly being logged, and to reduce the overall number of changes involved in the migration towards business profile v2 APIs.
How did you test it?
Sanity testing with Postman, ensuring that nothing around the merchant account or business profile APIs is broken.
In addition, I've confirmed from the logs that the affected fields (for example,
webhook_details
) are not being logged in plaintext inINSERT
/UPDATE
database queries.Screenshot of
webhook_details
being masked (specifically, password and URL fields) during business profile insert operation:Checklist
cargo +nightly fmt --all
cargo clippy