Greenmask 0.2.0b1 (pre-release)¶
This major beta release introduces new features and refactored transformers, significantly enhancing Greenmask's flexibility to better meet business needs.
Changes overview¶
- Introduced dynamic parameters in the transformers
- Most transformers now support dynamic parameters where applicable.
- Dynamic parameters are strictly enforced. If you need to cast values to another type, Greenmask provides templates
and predefined cast functions accessible via
cast_to
. These functions cover frequent operations such asUnixTimestampToDate
andIntToBool
.
- The transformation logic has been significantly refactored, making transformers more customizable and flexible than before.
-
Introduced transformation engines
random
- generates transformer values based on pseudo-random algorithms.hash
- generates transformer values using hash functions. Currently, it utilizessha3
hash functions, which are secure but perform slowly. In the stable release, there will be an option to choose betweensha3
andSipHash
.
Notable changes¶
Core¶
- Introduced the
Parametrizer
interface, now implemented for both dynamic and static parameters. - Renamed most of the toolkit types for enhanced clarity and comprehensive documentation coverage.
- Refactored the
Driver
initialization logic. - Added validation warnings for overridden types in the
Driver
. - Migrated existing built-in transformers to utilize the new
Parametrizer
interface. - Implemented a new abstraction,
TransformationContext
, as the first step towards enabling new feature transformation conditions (#34). - Optimized most transformers for performance in both dynamic and static modes. While dynamic mode offers flexibility, static mode ensures performance remains high. Using only the necessary transformation features helps keep transformation time predictable.
Documentation¶
Documentation has been significantly refactored. New information about features and updates to transformer descriptions have been added.
Transformers¶
-
RandomEmail - Introduces a new transformer that supports both random and deterministic engines. It allows for flexible email value generation; you can use column values in the template and choose to keep the original domain or select any from the
domains
parameter. -
NoiseDate, NoiseFloat, NoiseInt - These transformers support both random and deterministic engines, offering dynamic mode parameters that control the noise thresholds within the
min
andmax
range. Unlike previous implementations which used a singleratio
parameter, the new release featuresmin_ratio
andmax_ratio
parameters to define noise values more precisely. Utilizing thehash
engine in these transformers enhances security by complicating statistical analysis for attackers, especially when the same salt is used consistently over long periods. -
NoiseNumeric - A newly implemented transformer, sharing features with
NoiseInt
andNoiseFloat
, but specifically designed for numeric values (large integers or floats). It provides adecimal
parameter to handle values with fractions. -
RandomChoice - Now supports the
hash
engine -
RandomDate, RandomFloat, RandomInt - Now enhanced with hash engine support. Threshold parameters
min
andmax
have been updated to support dynamic mode, allowing for more flexible configurations. -
RandomNumeric - A new transformer specifically designed for numeric types (large integers or floats), sharing similar features with
RandomInt
andRandomFloat
, but tailored for handling huge numeric values. -
RandomString - Now supports hash engine mode
-
RandomUnixTimestamp - This new transformer generates Unix timestamps with selectable units (
second
,millisecond
,microsecond
,nanosecond
). Similar in function toRandomDate
, it supports the hash engine and dynamic parameters formin
andmax
thresholds, with the ability to override these units usingmin_unit
andmax_unit
parameters. -
RandomUuid - Added hash engine support
-
RandomPerson - Implemented a new transformer that replaces
RandomName
,RandomLastName
,RandomFirstName
,RandomFirstNameMale
,RandomFirstNameFemale
,RandomTitleMale
, andRandomTitleFemale
. This new transformer offers enhanced customizability while providing similar functionalities as the previous versions. It generates personal data such asFirstName
,LastName
, andTitle
, based on the providedgender
parameter, which now supports dynamic mode. Future minor versions will allow for overriding the default names database. -
Added tsModify - a new template function for time.Time objects modification
-
Introduced a new RandomIp transformer capable of generating a random IP address based on the specified netmask.
-
Added a new RandomMac transformer for generating random Mac addresses.
-
Deleted transformers include
RandomMacAddress
,RandomIPv4
,RandomIPv6
,RandomUnixTime
,RandomTitleMale
,RandomTitleFemale
,RandomFirstName
,RandomFirstNameMale
,RandomFirstNameFemale
,RandomLastName
, andRandomName
due to the introduction of more flexible and unified options.
Full Changelog: v0.1.14...v0.2.0b1¶
Playground usage for beta version¶
If you want to run a Greenmask playground for the beta version v0.2.0b1 execute:
git checkout tags/v0.2.0b1 -b v0.2.0b1
docker-compose run greenmask-from-source
Links¶
Feel free to reach out to us if you have any questions or need assistance: