承接 ggomez/anonymization 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

ggomez/anonymization

Composer 安装命令:

composer require ggomez/anonymization

包简介

Module for database anonymization

README 文档

README

Anonimization is a PHP library that helps you to anonymize your databases in a fast and dynamic way.

Note: The data is permanently modified

Installation

composer require ggomez/anonymization

Module for database anonymisation

You only have to call the class in this way:

<?php
require_once __DIR__ . '/vendor/autoload.php';

use Anonymization\Anonymization\Anonymous as Anonymous;

$a = new Anonymous();
$a->start();

The anonymous class constructor accepts two parameters:

  • Anonymization Configuration File
  • Anonymization Configuration DataBase connection

However, the constructor uses by default the files that are in the path: vendor/ggomez/anonymization/src/Config

One of the most important parts of anonymization is the configuration file. In the path above, you will find examples of the 3 allowed formats YML, JSON, PHP.

It is very important to maintain the structure, in this case we have a database that his name is "Test", then in the second part there is the sensitive word section, in this part we are going to describe all word that we want to change, the first word is that one we want to change and the seconds is that one we want to add in the database.

In the first part only the database to be anonymized is indicated, in the second part the sensitive words that could reveal someone's identity are specified and finally, in the last section the necessary settings for the anonymization of the database are inserted.

##Database name
Data_base: Test

##Insert all sensitive information that you want to change
KeyWord:
  Psychiatry: XXXX

##Only integer numbers
Counter: 10000

##Tables that you want to change
Tables:
  fos_user:
    alias: fos_user fosu, RandomData rd
    mapping:
      email: fosu.email = |email
      email_canonical: email_canonical = rd.email
      first_name: first_name = rd.firstname
      last_name: last_name =  rd.lastname
      created_by: created_by = |User#*gmail.fr
      updated_by: updated_by = |UserJ#*
      username: username = |UserL#*
      username_canonical: username_canonical = |UserE#*
    condition: " WHERE (MOD(fosu.id,1499) +1) = rd.id"

There are 3 options for data anonymisation:

  • Generate data from a given format
  • In this case the character "asterisk" is going to become a number, for exmple if we have a user's name in this field we are going to get a generic format with successive numbers
tiers:
    alias: fos_user fos, RandomData rd
    mapping:
     username: fos.username = |User#*
  • Generate new data from the RandomData table
    • When executing the library, a temporary table is loaded containing random data that can be used to anonymize complete tables
    tel: t.tel = rd.phone
  • Generate new data
    • If you want to generate a random data, such as an address or phone number, you can do it with the following syntax
    email: email = |email

In all cases it is recommended to use a condition, especially the following syntax is recommended in cases where you want to use the RandomData table, this to get different results in each line of the table

condition: ' WHERE (MOD(t.id,1499) +1) = rd.id'

ggomez/anonymization 适用场景与选型建议

ggomez/anonymization 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 23 次下载、GitHub Stars 达 0, 最近一次更新时间为 2018 年 06 月 29 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「data base」 「anonymization」 「Base de données」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 ggomez/anonymization 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ggomez/anonymization 我们能提供哪些服务?
定制开发 / 二次开发

基于 ggomez/anonymization 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-06-29