Firefly States Redactor

The Firefly states redactor is a self-hosted solution for securely handling Terraform state files. It fetches state files from remote sources, scans for sensitive data, and redacts secrets before mirroring the files to an S3 bucket. This helps organizations ensure that sensitive information is not exposed in their infrastructure state management workflows.

Features

  • Fetches Terraform state files from supported remote sources (e.g., S3, Terraform Cloud, ArgoCD).

  • Identifies and redacts sensitive data within state files.

  • Mirrors redacted state files to a designated S3 bucket.

  • Integrates with Gitleaks to further scan for secrets.

  • Can be deployed as a Kubernetes CronJob or as an ECS Fargate task.

Architecture

The redactor is deployed as a Kubernetes CronJob or ECS Fargate task that runs every 2 hours by default. It is designed for EKS clusters and uses IAM roles for access to S3. The redactor can also be run on ECS Fargate for organizations preferring AWS-native orchestration.

Firefly States Redactor Architecture

Prerequisites

  • An EKS cluster (for Kubernetes deployment) or an ECS cluster (for AWS Fargate deployment).

  • An S3 bucket for storing redacted state files.

  • IAM role with the following permissions:

    • s3:GetBucket, s3:ListBucket, s3:GetObject, s3:PutObject.

    • (Optional) kms:Decrypt if the bucket is encrypted.

  • Credentials for the remote state provider (e.g., Terraform Cloud token, ArgoCD token).

Installation (Kubernetes Helm)

To install the states redactor using Helm:

Configuration Examples (values.yaml)

Terraform Cloud

S3 Bucket

Running on ECS (Terraform Module)

You can also run the states redactor on ECS Fargate using the provided Terraform module:

References

Need Help?

Reach out to your Firefly Customer Success manager or email [email protected] for assistance with your states redactor configuration.

Last updated

Was this helpful?