-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Implement various compliance configuration and principle of least privilege for hardened dataset #3635
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: fast-dev
Are you sure you want to change the base?
Conversation
d673953 to
85850e0
Compare
…ud-foundation-fabric into vannick/fsi-5-wave
| ```tfvars | ||
| factories_config = { | ||
| defaults = "datasets/hardened/defaults.yaml" | ||
| folders = "datasets/hardened/folders" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update documentation which was incomplete previously.
Also mainly in this PR datasets/hardened/folders has been added with drift with classic datasets as follow mainly:
classicstill useownerandviewerrole for *-rw and *-ro service accounthardenednow use predefined and custom roles.
Tests have been done extensively already to validate the permissions are the good ones:
- stage 0 to 3 tested (except 3-secops and 3-gcve-dev) but rest has been validate
|
|
||
| # yaml-language-server: $schema=../../../../schemas/custom-role.schema.json | ||
| # the following permissions are a descoped version of storage.admin | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the roles created below ar eneeded because generally predenefined roles does not provided permissions for *. getIamPolicy
This requires creation of multiple roles so readonly service account can retrieve iam policy when doing terraform plan in pipeline
| - bigquerydatatransfer.googleapis.com | ||
| - cloudkms.googleapis.com | ||
| - logging.googleapis.com | ||
| - storage.googleapis.com |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use authoritative bindings for roles/owner, this to ensure:
- no roles owner permissions are provided
- but also, when a project is created, the creator principal is automatically being set as owner of the project. This ensure that once project is created, the owner role is removed to the creator
| keys: | ||
| bigquery: | ||
| rotation_period: 7776000s | ||
| log_buckets: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done in hardened datasets to follow NIST requirements where logs have to be made available at least for 90d.
| iac-outputs: | ||
| description: Terraform state for the org-level automation. | ||
| versioning: true | ||
| encryption_key: $kms_keys:iac-0/ew1/storage |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Compliance requirement to update storage class based on object activity
| ingress_rules: | ||
| allow-healthchecks: | ||
| description: Enable SSH, HTTP and HTTPS healthchecks | ||
| priority: 1001 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For 2-networking and 2-project-factory, i have added commented line to ensure:
- logging enablement
- enforce owner role removed for project creator
- log retention
- vpc flow logs
Those have been commented only
| var.billing_account.id | ||
| ) | ||
| ), null) | ||
| prefix = coalesce( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was buggy when both var.data_defaults.billing_account and var.billing_account.id were empty
eb13d69 to
c0d3aec
Compare
This PR focuses on tightening security controls to align with the principle of Least Privilege for the various service account, and specifically targeting hardened datasets.
It also includes configuration updates to address findings (or false positives) from compliance standards like CIS GCP, CIS GKE, and NIST, ensuring the foundation can be ready for more sensitive organization (FSI)
Main changes:
compute.disableVpcInternalIpv6as recommended by Compliance ManagerI applicable, I acknowledge that I have:
terraform fmton all modified filestools/tfdoc.py