burst/gdpr-tools 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

burst/gdpr-tools

Composer 安装命令:

composer require burst/gdpr-tools

包简介

Tools to help with GDPR compliance.

README 文档

README

Installation

composer require burst/gdpr-tools

Usage

php vendor/bin/gdpr-tools <command>

Commands

CommandDescriptionArguments
db:anonymizeanonymizes database based on a yaml configuration.file - A yaml configuration file, must end with .yml. See Configuration for details.
db:truncateTruncates database tables based on a yaml configuration.file - A yaml configuration file, must end with .yml. See Configuration for details.

Configuration

Anonimization

GDPR Tools uses Faker https://github.com/fzaninotto/Faker to anonimize data. This replaces production and personalized data not with obfuscated, unreadable data, but with dummy data which still has a readable and valid format.

For each table in the database, columns can be configured with a Faker formatter.

anonimize:
  tables:
    {{table_name}}:
    {{column_name}}:
      # Faker Formatter (required) 
      formatter: {{fakerFormatter}}
      # Unique value (optional, default false)
      unique: true
      # Array of arguments to be passes to the Faker Formatter (optional)
      args: 
        - 200

Truncate

Just a list of tables which need to be truncated

truncate:
  - table_a
  - table_b 

Example

presets:
  - drupal8

locale: nl_NL

database:
  scheme: pdo_mysql
  host: ${DB_HOST}
  port: 3306
  name: ${DB_NAME}
  user: ${DB_USER}
  password: ${DB_PASSWORD}

truncate:
  - event_log_track
  - z_tickets_log

anonymize:
  tables:
    user__field_description:
      field_description_value:
        formatter: realText
        args:
          - 300
        unique: true
    user__field_facebook:
      field_facebook_value:
        formatter: url
    user__field_google:
      field_google_value:
        formatter: url
    user__field_instagram:
      field_instagram_value:
        formatter: url
    user__field_name:
      field_name_value:
        formatter: name
    user__field_phone:
      field_phone_value:
        formatter: phoneNumber
    user__field_twitter:
      field_twitter_value:
        formatter: url

  exclude:
    users_field_data:
      uid:
        - 0 # super admin
        - 1 # admin
        - 5 # webmaster

Presets

Presets can be used to load pre-configured tables which need to be truncated and anonymized.
Current available presets are:

Configuration set in the local .yml configuration are merged with the preset config.

Locale

Text formatters can differ per locale. Any locale supported by Faker can be set.

locale: nl_NL

统计信息

  • 总下载量: 1
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-07-19

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固