Skip to content

Conversation

vannicktrinquier
Copy link
Collaborator

@vannicktrinquier vannicktrinquier commented Oct 14, 2025

This PR is adding:

  • FAST datasets hardened based on preventive and detective controls using OP, CuOP, Custom SHA and Monitoring Alerts)
  • Only low risk controls have been included in this PR (more to be added in subsequent PR)
  • Testing done successfully for following stages: stage org, stage vpc-sc, stage networking-a, stage gke, stage data-platform, stage security in development organization.

A set of controls stored in folder /datasets/hardened is provided. This set of controls is based of various library built in PSO Public repositories. Those libraries have been build in such as a way to set of controls can be exported to Cloud Foundation Fabric Terraform Format

This PR contains changed to datasets/hardened

  • List of preventive and detective controls in datasets/hardened folder in both Stage 0 and Stage 1 (VPC-SC)
  • Stage 1 VPC-SC is configured enforcing mode for VPC-SC
  • Documentation added with potential troubleshooting help with README.md with list of controls added

I applicable, I acknowledge that I have:

  • Read the contributing guide
  • Ran terraform fmt on all modified files
  • Regenerated the relevant README.md files using tools/tfdoc.py
  • Made sure all relevant tests pass

@vannicktrinquier vannicktrinquier force-pushed the fast-fsi-dev branch 2 times, most recently from daacdc0 to 4c345e7 Compare October 14, 2025 04:21
org_policy_custom_constraints = "${local.paths.organization}/custom-constraints"
custom_roles = "${local.paths.organization}/custom-roles"
tags = "${local.paths.organization}/tags"
scc_sha_custom_modules = "${local.paths.organization}/scc-sha-custom-modules"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding support for scc_custom_sha. If not present those will not be deployed (needed for non SCC/P or SCC/E organization)

monitoring_logging_bucket_name = module.factory.projects["log-0"]["log_buckets"]["log-0/audit-logs"]
}

module "monitoring-alerts-project" {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New module added to deploy if present in /observability foder monitoring alerts and log based metrics. For now, only a small samples is provided. But it will be increases across time


# yaml-language-server: $schema=../../schemas/perimeter.schema.json

status:
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Enforce VPC-SC (not dry-run anymore as in classic/ folder)

iam_by_principals = {
for k, v in each.value.project_config.iam_by_principals :
lookup(var.factories_config.context.iam_principals, k, k) => v
for principal, roles_list in {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor fix to allow having same groups to be reused across.
For example:

factories_config = {
  context = {
    iam_principals = {
      data-consumer-bi = "group:[email protected]"
      data-domain-0    =  "group:[email protected]"
      data-platform    =  "group:[email protected]"
....
    }
  }
}

Without this, it will fails because of non unique key


Just like before, we manually remove several resources (GCS buckets and BQ datasets). Note that `terrafom destroy` will fail. This is expected; just continue with the rest of the steps.

Also, you can't create a custom constraint with the same name than a previously deleted custom constraint. To avoid issues during next future reprovisionning, *it is recommended to remove from Terraform state custom constraints*.
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See datasets/hardened/README.md for more details but a custom constraint deleted can be recreated with the same name. To avoid this, it is recommended to not delete them until a fix is released

}
enablement_state = each.value.enablement_state

depends_on = [
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ensure bindings done before deploying.

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.

1 participant