Comments (12)
@erfanimani noe that we have the 'delete' option, could you do a PR to add it to the default Magento 2 config?
from masquerade.
Sounds good, you can do that with the formatter: fixed
formatter, see an example here:
from masquerade.
What tables/columns are those?
from masquerade.
I wrote the config yml based on what I saw in our clients' databases, and none of our clients use the Paypal option that comes with Magento (it's all through PSPs).
from masquerade.
Gotcha. I'll investigate which column it is next week. Possibly I can provide a PR myself. From memory however, I think payment information details aren't structured and are stored instead as a json or serialised value.
from masquerade.
We could add a custom formatter for that; https://github.com/elgentos/masquerade#custom-providers--formatters
from masquerade.
@erfanimani what's the use case for anonymising this over deleting it? (asking because I'm adding 'delete' options so that we can remove old sales data and reduce DB size for our dev environments, so it would be useful to know if there's a reason for keeping it)
from masquerade.
@johnorourke no reason! Both options would work.
from masquerade.
That's great, yeah I should be able to create a PR
from masquerade.
@erfanimani I just checked a Magento 2 open source database for Paypal and I found no personal identifiable information columns? We don't use Paypal through Magento's implementation (only through payment service providers) so I don't have real data in any of our projects in these tables so I can't be 100% sure.
mysql> show tables like '%paypal%'; [15/251]
+---------------------------------------+
| Tables_in_magento2m2 (%paypal%) |
+---------------------------------------+
| paypal_billing_agreement |
| paypal_billing_agreement_order |
| paypal_cert |
| paypal_payment_transaction |
| paypal_settlement_report |
| paypal_settlement_report_row |
+---------------------------------------+
6 rows in set (0.00 sec)
mysql> describe paypal_billing_agreement;
+-----------------+----------------------+------+-----+-------------------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------+----------------------+------+-----+-------------------+----------------+
| agreement_id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| customer_id | int(10) unsigned | NO | MUL | NULL | |
| method_code | varchar(32) | NO | | NULL | |
| reference_id | varchar(32) | NO | | NULL | |
| status | varchar(20) | NO | | NULL | |
| created_at | timestamp | NO | | CURRENT_TIMESTAMP | |
| updated_at | timestamp | YES | | NULL | |
| store_id | smallint(5) unsigned | YES | MUL | NULL | |
| agreement_label | varchar(255) | YES | | NULL | |
| agreement_data | text | YES | | NULL | |
+-----------------+----------------------+------+-----+-------------------+----------------+
10 rows in set (0.00 sec)
mysql> describe paypal_billing_agreement_order;
+--------------+------------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+--------------+------------------+------+-----+---------+-------+
| agreement_id | int(10) unsigned | NO | PRI | NULL | |
| order_id | int(10) unsigned | NO | PRI | NULL | |
+--------------+------------------+------+-----+---------+-------+
2 rows in set (0.00 sec)
mysql> describe paypal_payment_transaction;
+------------------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+------------------------+------------------+------+-----+---------+----------------+
| transaction_id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| txn_id | varchar(100) | YES | UNI | NULL | |
| additional_information | blob | YES | | NULL | |
| created_at | timestamp | YES | | NULL | |
+------------------------+------------------+------+-----+---------+----------------+
4 rows in set (0.00 sec)
mysql> describe paypal_settlement_report;
+---------------+------------------+------+-----+---------+----------------+
| Field | Type | Null | Key | Default | Extra |
+---------------+------------------+------+-----+---------+----------------+
| report_id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| report_date | date | YES | MUL | NULL | |
| account_id | varchar(64) | YES | | NULL | |
| filename | varchar(24) | YES | | NULL | |
| last_modified | timestamp | YES | | NULL | |
+---------------+------------------+------+-----+---------+----------------+
5 rows in set (0.00 sec)
mysql> describe paypal_settlement_report_row;
+-----------------------------+------------------+------+-----+----------+----------------+
| Field | Type | Null | Key | Default | Extra |
+-----------------------------+------------------+------+-----+----------+----------------+
| row_id | int(10) unsigned | NO | PRI | NULL | auto_increment |
| report_id | int(10) unsigned | NO | MUL | NULL | |
| transaction_id | varchar(19) | YES | | NULL | |
| invoice_id | varchar(127) | YES | | NULL | |
| paypal_reference_id | varchar(19) | YES | | NULL | |
| paypal_reference_id_type | varchar(3) | YES | | NULL | |
| transaction_event_code | varchar(5) | YES | | NULL | |
| transaction_initiation_date | timestamp | YES | | NULL | |
| transaction_completion_date | timestamp | YES | | NULL | |
| transaction_debit_or_credit | varchar(2) | NO | | CR | |
| gross_transaction_amount | decimal(20,6) | NO | | 0.000000 | |
| gross_transaction_currency | varchar(3) | YES | | NULL | |
| fee_debit_or_credit | varchar(2) | YES | | NULL | |
| fee_amount | decimal(20,6) | NO | | 0.000000 | |
| fee_currency | varchar(3) | YES | | NULL | |
| custom_field | varchar(255) | YES | | NULL | |
| consumer_id | varchar(127) | YES | | NULL | |
| payment_tracking_id | varchar(255) | YES | | NULL | |
| store_id | varchar(50) | YES | | NULL | |
+-----------------------------+------------------+------+-----+----------+----------------+
from masquerade.
Thanks for checking @peterjaap.
So I'm talking about this part here:
It seems it's JSON serialised data stored in sales_order_payment
/additional_information
It seems we can't truncate that table as it'll cause an error Call to a member function getAdditionalInformation() on null
.
I can create a PR that adds a config to simply add an empty object in the additional_data
column. It also has some cc fields it seems, but I don't think they're used. How does that sound? CC @johnorourke
from masquerade.
@erfanimani thanks :)
from masquerade.
Related Issues (20)
- Unable to process a line with a primary key set to zero HOT 1
- Create Github action to generate phar automatically
- Identify generating yaml with braces HOT 1
- Table does not have primary key configured, which makes impossible table anonymization. HOT 1
- The default command does nothing
- Skipping a group/table/column doesn't work
- Exceptions are not caught in the configuration context HOT 1
- PHP Warning: Wrong COM_STMT_PREPARE response size on masquerade run.
- "maximum number of steps is not set." in verbose mode HOT 1
- Provide PHP 8 support HOT 1
- download of masquerade.phar broken after 0.3.5 releae HOT 2
- Shopware 6 anonymization does not anonymize completely HOT 4
- Configuration ignored or wrong usage on my side HOT 6
- Update Faker with new FakerPHP lib HOT 1
- Fixing default package version HOT 1
- tableRanges accepts only integer PK HOT 2
- Adding config option to specify seed HOT 1
- Unable to use with Magento 2.4.4 (latest) HOT 10
- PostgreSQL compatibility HOT 1
- Run masquerade against a .sql file instead of database HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from masquerade.