-
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
Merged
Merged
Implement various compliance configuration and principle of least privilege for hardened dataset #3635
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
0a8c8af
Merge branch 'fast-dev' of https://github.com/GoogleCloudPlatform/clo…
vannicktrinquier 85850e0
Implement principle of least priviledge to hardened datasets
vannicktrinquier d7b5b30
Merge branch 'fast-dev' of https://github.com/GoogleCloudPlatform/clo…
vannicktrinquier c0d3aec
Update test for hardened dataset
vannicktrinquier 43ad8a8
Merge branch 'fast-dev' into vannick/fsi-5-wave
vannicktrinquier File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
fast/stages/0-org-setup/datasets/hardened/folders/data-platform/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../schemas/folder.schema.json | ||
|
|
||
| name: Data Platform |
52 changes: 52 additions & 0 deletions
52
fast/stages/0-org-setup/datasets/hardened/folders/data-platform/dev/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,52 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../../schemas/folder.schema.json | ||
|
|
||
| name: Development | ||
| iam_by_principals: | ||
| $iam_principals:service_accounts/iac-0/iac-dp-dev-rw: | ||
| - roles/bigquery.admin | ||
| - roles/composer.admin | ||
| - roles/compute.xpnAdmin | ||
| - roles/dataflow.admin | ||
| - roles/iam.serviceAccountAdmin | ||
| - roles/logging.admin | ||
| - roles/pubsub.admin | ||
| - roles/resourcemanager.folderAdmin | ||
| - roles/resourcemanager.projectCreator | ||
| - roles/resourcemanager.projectDeleter | ||
| - roles/resourcemanager.projectIamAdmin | ||
| - roles/serviceusage.serviceUsageAdmin | ||
| - roles/storage.admin | ||
| $iam_principals:service_accounts/iac-0/iac-dp-dev-ro: | ||
| - roles/bigquery.dataViewer | ||
| - roles/bigquery.jobUser | ||
| - roles/browser | ||
| - roles/composer.user | ||
| - roles/datacatalog.viewer | ||
| - roles/dataflow.viewer | ||
| - roles/logging.viewer | ||
| - roles/pubsub.viewer | ||
| - roles/resourcemanager.folderViewer | ||
| - roles/resourcemanager.tagViewer | ||
| - roles/serviceusage.serviceUsageViewer | ||
| - roles/storage.bucketViewer | ||
| - roles/storage.objectViewer | ||
| - $custom_roles:folder_viewer | ||
| - $custom_roles:logging_viewer | ||
| - $custom_roles:service_account_viewer | ||
| - $custom_roles:storage_viewer | ||
| tag_bindings: | ||
| environment: $tag_values:environment/development |
19 changes: 19 additions & 0 deletions
19
fast/stages/0-org-setup/datasets/hardened/folders/data-platform/prod/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../../schemas/folder.schema.json | ||
|
|
||
| name: Production | ||
| tag_bindings: | ||
| environment: $tag_values:environment/production |
73 changes: 73 additions & 0 deletions
73
fast/stages/0-org-setup/datasets/hardened/folders/networking/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../schemas/folder.schema.json | ||
|
|
||
| name: Networking | ||
| iam_by_principals: | ||
| $iam_principals:service_accounts/iac-0/iac-networking-rw: | ||
| - roles/compute.networkAdmin | ||
| - roles/compute.securityAdmin | ||
| - roles/compute.xpnAdmin | ||
| - roles/dns.admin | ||
| - roles/iam.networkAdmin | ||
| - roles/logging.admin | ||
| - roles/resourcemanager.folderAdmin | ||
| - roles/resourcemanager.projectCreator | ||
| - roles/resourcemanager.projectDeleter | ||
| - roles/resourcemanager.projectIamAdmin | ||
| - roles/resourcemanager.tagUser | ||
| - roles/serviceusage.serviceUsageAdmin | ||
| $iam_principals:service_accounts/iac-0/iac-networking-ro: | ||
| - roles/browser | ||
| - roles/compute.networkViewer | ||
| - roles/dns.reader | ||
| - roles/logging.viewer | ||
| - roles/resourcemanager.folderViewer | ||
| - roles/resourcemanager.tagViewer | ||
| - roles/serviceusage.serviceUsageViewer | ||
| - $custom_roles:service_networking_viewer | ||
| $iam_principals:service_accounts/iac-0/iac-pf-rw: | ||
| - $custom_roles:service_project_network_admin | ||
| $iam_principals:service_accounts/iac-0/iac-pf-ro: | ||
| - roles/compute.viewer | ||
| - $custom_roles:project_iam_viewer | ||
| iam_bindings: | ||
| dp_dev_rw: | ||
| members: | ||
| - $iam_principals:service_accounts/iac-0/iac-dp-dev-rw | ||
| role: $custom_roles:service_project_network_admin | ||
| condition: | ||
| expression: | | ||
| resource.matchTag('${organization.id}/environment', 'development') | ||
| title: Data platform dev service project admin. | ||
| dp_dev_ro: | ||
| role: roles/compute.networkViewer | ||
| members: | ||
| - $iam_principals:service_accounts/iac-0/iac-dp-dev-ro | ||
| condition: | ||
| title: Data platform dev network viewer. | ||
| expression: | | ||
| resource.matchTag('${organization.id}/environment', 'development') | ||
| project_factory: | ||
| role: roles/resourcemanager.projectIamAdmin | ||
| members: | ||
| - $iam_principals:service_accounts/iac-0/iac-pf-rw | ||
| condition: | ||
| title: Project factory delegated IAM grant. | ||
| expression: | | ||
| api.getAttribute('iam.googleapis.com/modifiedGrantsByRole', []).hasOnly([ | ||
| 'roles/compute.networkUser', 'roles/composer.sharedVpcAgent', | ||
| 'roles/container.hostServiceAgentUser', 'roles/vpcaccess.user' | ||
| ]) |
33 changes: 33 additions & 0 deletions
33
fast/stages/0-org-setup/datasets/hardened/folders/networking/dev/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../../schemas/folder.schema.json | ||
|
|
||
| name: Development | ||
| iam: | ||
| $custom_roles:project_iam_viewer: | ||
| - $iam_principals:service_accounts/iac-0/iac-dp-dev-ro | ||
| iam_bindings: | ||
| dp_dev: | ||
| role: roles/resourcemanager.projectIamAdmin | ||
| members: | ||
| - $iam_principals:service_accounts/iac-0/iac-dp-dev-rw | ||
| condition: | ||
| title: Data platform dev delegated IAM grant. | ||
| expression: | | ||
| api.getAttribute('iam.googleapis.com/modifiedGrantsByRole', []).hasOnly([ | ||
| '${custom_roles.service_project_network_admin}' | ||
| ]) | ||
| tag_bindings: | ||
| environment: $tag_values:environment/development |
19 changes: 19 additions & 0 deletions
19
fast/stages/0-org-setup/datasets/hardened/folders/networking/prod/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../../schemas/folder.schema.json | ||
|
|
||
| name: Production | ||
| tag_bindings: | ||
| environment: $tag_values:environment/production |
53 changes: 53 additions & 0 deletions
53
fast/stages/0-org-setup/datasets/hardened/folders/security/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../schemas/folder.schema.json | ||
|
|
||
| name: Security | ||
| iam_by_principals: | ||
| $iam_principals:service_accounts/iac-0/iac-security-rw: | ||
| - roles/cloudkms.admin | ||
| - roles/logging.admin | ||
| - roles/resourcemanager.folderAdmin | ||
| - roles/resourcemanager.projectCreator | ||
| - roles/resourcemanager.projectDeleter | ||
| - roles/resourcemanager.projectIamAdmin | ||
| - roles/resourcemanager.tagUser | ||
| - roles/securitycenter.admin | ||
| - roles/serviceusage.serviceUsageAdmin | ||
| $iam_principals:service_accounts/iac-0/iac-security-ro: | ||
| - roles/browser | ||
| - roles/cloudkms.viewer | ||
| - roles/logging.viewer | ||
| - roles/resourcemanager.folderViewer | ||
| - roles/resourcemanager.tagViewer | ||
| - roles/securitycenter.viewer | ||
| - roles/serviceusage.serviceUsageViewer | ||
| - $custom_roles:logging_viewer | ||
| $iam_principals:service_accounts/iac-0/iac-pf-rw: | ||
| - roles/cloudkms.cryptoKeyEncrypterDecrypter | ||
| $iam_principals:service_accounts/iac-0/iac-pf-ro: | ||
| - roles/cloudkms.viewer | ||
| - $custom_roles:project_iam_viewer | ||
| iam_bindings: | ||
| project_factory: | ||
| role: roles/resourcemanager.projectIamAdmin | ||
| members: | ||
| - $iam_principals:service_accounts/iac-0/iac-pf-rw | ||
| condition: | ||
| title: Project factory delegated IAM grant. | ||
| expression: | | ||
| api.getAttribute('iam.googleapis.com/modifiedGrantsByRole', []).hasOnly([ | ||
| 'roles/cloudkms.cryptoKeyEncrypterDecrypter' | ||
| ]) |
25 changes: 25 additions & 0 deletions
25
fast/stages/0-org-setup/datasets/hardened/folders/security/dev/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../0-org-setup/schemas/folder.schema.json | ||
|
|
||
| name: Development | ||
| parent: $folder_ids:security | ||
| tag_bindings: | ||
| environment: $tag_values:environment/development | ||
| iam_by_principals: | ||
| $iam_principals:service_accounts/iac-0/iac-dp-dev-ro: | ||
| - $custom_roles:cloudkms_viewer | ||
| $iam_principals:service_accounts/iac-0/iac-pf-ro: | ||
| - $custom_roles:cloudkms_viewer |
20 changes: 20 additions & 0 deletions
20
fast/stages/0-org-setup/datasets/hardened/folders/security/prod/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../0-org-setup/schemas/folder.schema.json | ||
|
|
||
| name: Production | ||
| parent: $folder_ids:security | ||
| tag_bindings: | ||
| environment: $tag_values:environment/production |
47 changes: 47 additions & 0 deletions
47
fast/stages/0-org-setup/datasets/hardened/folders/teams/.config.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Copyright 2025 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| # yaml-language-server: $schema=../../../../schemas/folder.schema.json | ||
|
|
||
| name: Teams | ||
| iam_by_principals: | ||
| $iam_principals:service_accounts/iac-0/iac-pf-rw: | ||
| - roles/bigquery.admin | ||
| - roles/container.admin | ||
| - roles/iam.serviceAccountAdmin | ||
| - roles/logging.admin | ||
| - roles/pubsub.admin | ||
| - roles/resourcemanager.folderAdmin | ||
| - roles/resourcemanager.projectCreator | ||
| - roles/resourcemanager.projectDeleter | ||
| - roles/resourcemanager.projectIamAdmin | ||
| - roles/resourcemanager.tagUser | ||
| - roles/serviceusage.serviceUsageAdmin | ||
| - roles/storage.admin | ||
| - $custom_roles:service_project_network_admin | ||
| $iam_principals:service_accounts/iac-0/iac-pf-ro: | ||
| - roles/bigquery.dataViewer | ||
| - roles/bigquery.jobUser | ||
| - roles/browser | ||
| - roles/compute.viewer | ||
| - roles/container.clusterViewer | ||
| - roles/logging.viewer | ||
| - roles/pubsub.viewer | ||
| - roles/resourcemanager.folderViewer | ||
| - roles/resourcemanager.tagViewer | ||
| - roles/serviceusage.serviceUsageViewer | ||
| - $custom_roles:logging_viewer | ||
| - $custom_roles:service_account_viewer | ||
| tag_bindings: | ||
| context: $tag_values:context/project-factory |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.