Care for personal data
across the whole life cycle.
How catalog, classification, policies, auditing, and retention combine to take care of personal data in TDP Datacenter.
Topics on this page
- Data identification and classification
- Access control and data protection
- Monitoring data usage
- Retention and deletion of copies
Data identification and classification
Apache Atlas can gather metadata, classifications and lineage of the integrated assets.
This information makes it possible to identify tables, fields and processes that use personal data and to document their owners and purposes.
With the catalog, those who work with the data find datasets through search, understand their nature through classifications and business metadata, and trust their origin through lineage, which records where the data came from and how it was generated.
When one dataset derives from another, the classification can be propagated automatically to the related entities.
Metadata reaches Atlas through the hooks configurable in Ambari, such as those of Hive, HBase, Sqoop and Airflow (hive.atlas.hook, hbase.atlas.hook, sqoop.atlas.hook and airflow-atlas-site).
In Hive, the Atlas integration registers the Atlas hook among the post-execution hooks (hive.exec.post.hooks), which send the metadata and lineage of the executed operations to the catalog.
These integrations must be enabled in the services in use, and exported files and external systems are also part of the inventory defined by the organization.
The data content can also be validated by Great Expectations, installed by Ambari as a client Python library, with declarative rules about the data, the expectations.
For example, a customer database can have its CPF (Brazilian taxpayer ID) and e-mail fields classified, with the data origin and the transformation processes recorded in the catalog.
Atlas integrations in the services through Ambari. Classifications and metadata in the catalog interface. Details in Apache Atlas and Great Expectations.
Access control and data protection
Ranger policies in the integrated services grant teams the operations they need for their activities.
These rules work together with HDFS permissions and with the controls of the other access paths.
Identity
Users and groups
Permissions apply to the identities actually authenticated by the services.
Authorization
Resource-based policies
Access to directories, tables and other resources granted according to the purpose of the work.
Protection
Encryption and keys
HDFS encryption zones can protect files at rest with keys from Ranger KMS, configured as the HDFS key provider, with its own permissions on the keys.
Atlas classifications can take part in tag-based policies in Ranger, and the classification then guides authorization at access time.
Ranger TagSync can use Atlas as its source: with this source enabled, the catalog classifications reach Ranger as tags and decide access through tag-based policies.
Masking and row filtering are defined in resource-based policies, on the column and the table, in query services such as Hive and Trino.
A masking policy changes the displayed value of a column at query time, including by hash or by a custom expression that pseudonymizes the value, and a row-filter policy limits the rows of a table that each user or group can query.
For this, the plugins of the corresponding services must be enabled.
Ranger Admin, Atlas and Ranger integrations in Ambari, and HDFS and KMS settings. Details in Security model.
Monitoring data usage
With auditing enabled, the records of the services and of Ranger help verify who requested access, to which resources and with what result.
This trail supports the investigation of requests and the review of permissions on classified datasets.
The retention period of these records and who can query them are part of the privacy decisions of the environment.
Application logs and the audit records themselves are also part of protection and retention planning, and the fewer unnecessary personal data they carry, the lower the exposure.
Auditing in Ranger Admin and records of the services involved. Audit destinations in Security model. Use in investigations in Observability.
Retention and deletion of copies
Retention starts from the period during which the records must remain available and from all relevant representations: source files, tables, derived results and exports.
In HDFS, trash and snapshots can preserve files that no longer appear in the original path.
Replication keeps copies of the blocks for availability. It is not an independent retention mechanism for each copy.
| Location or mechanism | What goes into the planning |
|---|---|
| Hive tables and HDFS files | The table type, the format and the files that the operation on the table actually removes or preserves. |
| HDFS trash | The configured period and how long removed files remain. |
| HDFS snapshots | The snapshots that still reference the data and the retention approved for them. |
| Iceberg or Delta Lake, when used | Record deletion together with the maintenance of the format's history and files. |
| Exports and derived data | The copies and the periods defined for each destination. |
In Hive, with the transaction manager (DbTxnManager) and concurrency control enabled in Ambari (hive.txn.manager and hive.support.concurrency), transactional (ACID) tables can be used, with the deletion of specific records through DELETE.
Deletion can happen at the record level or at the dataset level, as needed, with the result verified in the systems involved.
This verification covers the stored files, as well as the catalog metadata and the access permissions.
HDFS trash, snapshot inventory and the routines of each application. References: HDFS Snapshots, Iceberg and Delta Lake.
Scenario: a contact base for a campaign
Situation: a company prepares a campaign with a contact base stored in Hive tables, with CPF and e-mail fields.
What TDP does: in Atlas, the CPF and e-mail fields are classified, and the catalog records the data origin, the lineage brought in by the Hive integration with Atlas, the owners and the purpose.
With the Ranger plugin enabled in Hive and TagSync using Atlas as its source, the classifications reach Ranger, and a tag-based policy restricts the classified fields to the group responsible for the base.
A Spark job prepares, in a separate Hive database, a table with only the fields needed for the campaign, and Ranger policies grant access to this table only to the team's group.
Effect: the campaign team works only with the fields it needs, the original base remains restricted, the exports produced are added to the inventory, and Ranger auditing records the accesses during the campaign.
At the end of the period, the approved routines remove the table and the copies, taking trash and snapshots into account, and the results are verified.