Skip to content

feat: add transform_fpe benchmark test type for Format Preserving Encryption (FPE) support#257

Open
abhijeetvlokhande wants to merge 2 commits into
hashicorp:mainfrom
abhijeetvlokhande:feature/transform-fpe-benchmark
Open

feat: add transform_fpe benchmark test type for Format Preserving Encryption (FPE) support#257
abhijeetvlokhande wants to merge 2 commits into
hashicorp:mainfrom
abhijeetvlokhande:feature/transform-fpe-benchmark

Conversation

@abhijeetvlokhande

@abhijeetvlokhande abhijeetvlokhande commented Mar 12, 2026

Copy link
Copy Markdown

Summary

This PR adds a new transform_fpe benchmark test type to support Format Preserving Encryption (FPE) benchmarking using Vault's Transform Secrets Engine.

Changes

  • Add benchmarktests/target_secret_transform_fpe.go implementing the transform_fpe test type
  • Add docs/tests/secret-transform-fpe.md with configuration and usage documentation
  • Add unit tests for transform_fpe
  • Add an HCL fixture for config parsing coverage

Features

  • Supports all three tweak sources: internal, generated, and supplied
  • Automatically creates the FPE template, transformation, and role during setup
  • Cleans up created resources when cleanup = true

Testing

Added unit coverage for:

  • registration of transform_fpe
  • HCL config parsing
  • setup / target / cleanup flow against a mocked Vault API

Targeted test status:

  • go test ./benchmarktests -run TransformFPETest -v passes

Repo-wide test status:

  • go test ./... still only fails in the repo's existing Docker-backed tests under test-fixtures when Docker is unavailable (Cannot connect to the Docker daemon at unix:///var/run/docker.sock)

HCP validation output:

  • supplied tweak: count 2240, throughput 37.154109 req/s, mean 268.279325ms, p95 288.924115ms, p99 341.030866ms, success 100%
  • internal tweak: count 2229, throughput 36.985815 req/s, mean 269.681022ms, p95 279.109931ms, p99 363.232827ms, success 100%
  • generated tweak: count 2289, throughput 37.958554 req/s, mean 262.850362ms, p95 272.670632ms, p99 309.930134ms, success 100%

…ryption (FPE) support

- Add new transform_fpe test type in benchmarktests/target_secret_transform_fpe.go
- Supports all three tweak sources: internal, generated, and supplied
- Add documentation in docs/tests/secret-transform-fpe.md
- Update .gitignore to exclude sensitive test config files and logs
@abhijeetvlokhande
abhijeetvlokhande requested a review from a team as a code owner March 12, 2026 19:34
@abhijeetvlokhande
abhijeetvlokhande requested review from arslan23-push and catamtz and removed request for a team March 12, 2026 19:34
@hashicorp-cla-app

hashicorp-cla-app Bot commented Mar 12, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@abhijeetvlokhande

Copy link
Copy Markdown
Author

Added unit coverage for transform_fpe and updated the PR description with fresh HCP validation output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants