> For the complete documentation index, see [llms.txt](https://cortex-docs.paloaltonetworks.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-project-audit-logging-is-not-configured-properly-across-all-services-and-all-users-in-a-project.md). Agents can also search and read this documentation through its [MCP server](https://cortex-docs.paloaltonetworks.com/~gitbook/mcp).

# GCP Project audit logging is not configured properly across all services and all users in a project

### Synopsis

| Field               | Value                                                                                               |
| ------------------- | --------------------------------------------------------------------------------------------------- |
| Rule Type           | Detection                                                                                           |
| Finding Type        | GCP Project audit logging is not configured properly across all services and all users in a project |
| Finding ID          | 60000269                                                                                            |
| Generates a Finding | This detection rule also generates a finding                                                        |
| Severity            | Informational                                                                                       |
| Category            | CONFIGURATION                                                                                       |
| Cloud Providers     | GCP                                                                                                 |
| Platform Module     | CSPM                                                                                                |
| Asset Types         | GOOGLE\_CLOUD\_IAM\_AUDIT\_CONFIG                                                                   |

### Description

Inadequate configuration of GCP project audit logging across all services and users leaves the environment vulnerable to undetected malicious activity and misconfigurations.

The policy assesses the completeness of Cloud Audit Logging, encompassing all services and users within a project. Insufficient logging allows attackers to perform unauthorized actions, such as data exfiltration or privilege escalation, without leaving a traceable audit trail. Lack of comprehensive logging hinders incident response and forensics investigations.

A misconfiguration in audit logging jeopardizes data integrity and confidentiality, leading to potential regulatory non-compliance and reputational damage. Complete audit logging ensures accountability and aids in detecting and responding to security incidents promptly, enabling timely remediation and minimizing potential impact.

To mitigate this, enforce comprehensive Cloud Audit Logging across all GCP services and for all users, ensuring no exceptions are made. Regularly review and update audit logging configurations to reflect evolving security needs and incorporate new services. Implement a system for monitoring and alerting on audit log gaps to promptly address any misconfigurations.

### Remediation

1. To read the project's IAM policy and store it in a file run a command:

   ```
   gcloud projects get-iam-policy [PROJECT_ID] > /tmp/policy.yaml
   ```
2. Edit policy in /tmp/policy.yaml, adding or changing only the audit logs configuration to:

   ```
   auditConfigs:
   - auditLogConfigs:
   	- logType: DATA_WRITE
   	- logType: DATA_READ
   service: allServices
   ```

   Note: Make sure 'exemptedMembers:' is not set, as audit logging should be enabled for all the users.
3. To set audit config run:

   ```
   gcloud projects set-iam-policy [PROJECT_ID] /tmp/policy.yaml
   ```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://cortex-docs.paloaltonetworks.com/posture-rules/cloud-saas-active-directory-posture-rules/cortex-posture-query-based-rules/detection-rules-by-name/gcp-project-audit-logging-is-not-configured-properly-across-all-services-and-all-users-in-a-project.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
