You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
including GitHub Actions to schedule daily audits and Add documentati… (#39116)
* including GitHub Actions to schedule daily audits and Add documentation for the changes made to manage keys created outside of the Google Cloud Secret Manager key rotation system
* correcting a typo in the file name
* Fix PreCommit GHA and PreCommit Whitespace, and preparing the test of the action from the pull request
* Testing the GitHub action from the PR
* Remove the pull request configuration from the github Action
|[ Modify the GCP User Roles according to the infra/users.yml file ](https://github.com/apache/beam/actions/workflows/beam_Infrastructure_UsersPermissions.yml)| N/A |[](https://github.com/apache/beam/actions/workflows/beam_Infrastructure_UsersPermissions.yml?query=event%3Aschedule)|
547
547
|[ Service Account Keys Management ](https://github.com/apache/beam/actions/workflows/beam_Infrastructure_ServiceAccountKeys.yml)| N/A |[](https://github.com/apache/beam/actions/workflows/beam_Infrastructure_ServiceAccountKeys.yml?query=event%3Aschedule)|
548
+
|[ Unmanaged Service Accounts Keys Audit ](https://github.com/apache/beam/actions/workflows/beam_Infrastructure_AuditUnmanagedKeys.yml)| N/A |[](https://github.com/apache/beam/actions/workflows/beam_Infrastructure_AuditUnmanagedKeys.yml?query=event%3Aschedule)|
Copy file name to clipboardExpand all lines: infra/enforcement/README.md
+9-3Lines changed: 9 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -134,8 +134,9 @@ The enforcement tools are integrated with GitHub Actions to provide automated co
134
134
135
135
### Workflow Configuration
136
136
137
-
The GitHub Actions workflow (`.github/workflows/beam_Infrastructure_PolicyEnforcer.yml`) runs:
138
-
- **Schedule**: Weekly on Mondays at 9:00 AM UTC
137
+
The repository includes workflows for different security domains:
138
+
- **IAM Policy Enforcer** (`.github/workflows/beam_Infrastructure_PolicyEnforcer.yml`): Runs weekly on Mondays at 9:00 AM UTC.
139
+
- **Unmanaged Keys Audit** (`.github/workflows/beam_Infrastructure_AuditUnmanagedKeys.yml`): Runs daily at 00:00 UTC. It manages the continuous execution of the `account_keys.py` script to swiftly detect rogue service account keys generated outside the official rotation system.
139
140
- **Manual trigger**: Can be triggered manually via `workflow_dispatch`
140
141
- **Actions**: Runs both IAM and Account Keys enforcement with the `announce` action
- **check**: Validates service account keys and their permissions against defined policies and reports any differences (default behavior)
173
-
- **announce**: Creates or updates a GitHub issue and sends an email notification when service account keys policies differ from the defined ones. If no open issue exists, creates a new one; if an open issue exists, updates the issue body with current violations
174
+
- **announce**: Creates or updates a GitHub issue and sends an email notification when service account keys policies differ from the defined ones.
175
+
- For general configuration errors, it updates the main compliance issue.
176
+
- **For unmanaged/rogue keys (Security Alerts)**, it consolidates alerts into a dedicated `[SECURITY]` issue acting as a live dashboard. It updates the issue by placing the newest audit report at the top and moving the previous reports into a collapsed `<details>` history section. If the keys are revoked and the infrastructure becomes healthy, the system automatically resolves and closes the issue.
174
177
- **print**: Prints announcement details for testing purposes without creating actual GitHub issues or sending emails
175
178
- **generate**: Updates the compliance file to match the current GCP service account keys and Secret Manager permissions
176
179
@@ -183,6 +186,9 @@ The Account Keys enforcement tool provides the following capabilities:
183
186
- **Permission Validation**: Ensures that Secret Manager permissions match the declared authorized users
184
187
- **Compliance Reporting**: Identifies missing service accounts, undeclared managed secrets, and permission mismatches
185
188
- **Automatic Remediation**: Can automatically update the compliance file to match current infrastructure state
189
+
- **Unmanaged Key Detection**: Identifies physical keys in IAM that were created outside the automated rotation system by comparing them against the legal, managed keys registered in Google Cloud Secret Manager.
190
+
- **Stateful Security Alerts**: Consolidates security violations into a single, dynamically updated GitHub issue, keeping a collapsed `<details>` history of past scans to prevent alert fatigue.
191
+
- **Self-Healing Resolution**: Automatically closes the security GitHub issue when all unmanaged keys have been successfully revoked.
0 commit comments