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

Proposing New Component - Obfuscate Card Number - Areteans #92

Open
s-thutupalli opened this issue Nov 27, 2024 · 3 comments
Open

Proposing New Component - Obfuscate Card Number - Areteans #92

s-thutupalli opened this issue Nov 27, 2024 · 3 comments
Labels
invalid This doesn't seem right

Comments

@s-thutupalli
Copy link

Title: Obfuscate Card Number

Overview

A Number Masking React Component is a user interface utility designed to display sensitive numerical data, such as card numbers, in a masked format for security and privacy. This component is commonly used in financial and e-commerce applications to prevent exposure of complete card numbers, showing only the last few digits for identification purposes.

For example, a credit card number like 1234 5678 9012 3456 can be masked as 1234 5678 90** ****. This ensures sensitive information is hidden while still allowing users to recognize their card.

Usage

This component is ideal for any scenario requiring secure handling and display of sensitive numerical data, particularly in financial and payment-related contexts.

Apart from masking the input, component also provides a toggle to hide/show the user details like name, expiry date, card type, masked card number on the card layout derived from a decision table and output it via datapage.

As of now, logic is in place to check the starting digit of the card number and returning the card provider (ex: Mastercard) using cardTypeprop.

Configurations:

dataPageName – will be name of the datapage which will be the source to determine the card type.

cardTypeprop – property reference to which the card type is mapped in the above mentioned datapage.

isShowCard – toggle to show/hide the card layout.

Dependencies:

Styled Components

npm install styled-components

Component benefits

  1. Enhanced Privacy and Security -->
    a) Mask Sensitive Data: Displays only the last few digits of the card number.
    b) Compliance with Regulations: Helps meet privacy and security standards like PCI DSS by ensuring that full card numbers are not exposed unnecessarily.

  2. Better User Experience – Obfuscated card numbers convey a sense of security, making users feel safer while interacting with the application.

  3. Popular Use cases:
    a) Payment Gateways: To display saved cards securely.
    b) Order History: Showing transaction details while maintaining privacy.
    c) Account Settings: Listing linked cards or payment methods.

Attached the component code and detailed description with images below.

Obfuscate_Card_Number.docx
ObfuscateCardNumber.zip

@ricmars
Copy link
Collaborator

ricmars commented Dec 1, 2024

Using a custom component to obfuscate the string is not the correct approach - you should configure the property on the server using access control policy to hide the value from the server so that the value is not sent to the server - if you want to hide on the client during input - you can use the password input component.
https://academy.pega.com/topic/creating-access-control-policy/v2
https://docs.pega.com/bundle/platform/page/platform/security/create-access-control-policy.html

see example
demo_accesscontrol

@ricmars ricmars added the invalid This doesn't seem right label Dec 1, 2024
@ricmars
Copy link
Collaborator

ricmars commented Dec 1, 2024

If you disagree with my response above, please add more comments.
If I don't see any update in a couple of days, I will close this issue as no action.

@s-thutupalli
Copy link
Author

One of our client’s requirements is to mask the value only at client side, as we will be needing the unmasked values top pass in the request to external web services. Hence, using access control policy would be maintenance overhead, as it masks the value at server side as well and has some limitations.

Please find attachment for more details.

ObfuscateCradNumber.docx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants