Google Cloud access logs and connection logs let you diagnose access denials, resource management errors, and connection failures in a Chrome Enterprise Premium secure gateway. You can query and correlate these entries in the Logs Explorer to inspect policy evaluations, client context, and upstream routing status.
To record and view these events,
configure ADMIN_READ Data Access audit logs
for the BeyondCorp API (beyondcorp.googleapis.com, listed as BeyondCorp
Enterprise API in the Google Cloud console),
enable secure gateway logging,
and make sure that you have the
Private Logs Viewer
role (roles/logging.privateLogViewer) to view Data Access audit logs.
End user access
Google Cloud access logs provide valuable insights into user access patterns and can help you troubleshoot access denial errors. These logs record both successful and denied access attempts, offering a comprehensive view of user interactions with your applications. In cases of denied access, the logs include detailed information about the reasons for denial, such as the specific access levels that were not met.
The logs also contain metadata, such as timestamps, user identities, and resource details, providing further context for analysis and troubleshooting. To filter the logs relevant to secure gateway access, use the following filter:
resource.type="audited_resource"
resource.labels.method="AuthorizeUser"
resource.labels.service="beyondcorp.googleapis.com"
Access log field reference
Each entry is written to the log name
projects/PROJECT_ID/logs/cloudaudit.googleapis.com%2Fdata_access,
where PROJECT_ID is your Google Cloud project ID.
The following table describes the access log fields:
| Field path | Type | Description |
|---|---|---|
timestamp |
string | Timestamp when the authorization check occurred. |
severity |
string | Log severity (INFO or ERROR). |
resource.type |
string | Monitored resource type (always audited_resource). |
resource.labels.project_id |
string | Your Google Cloud project ID. |
resource.labels.service |
string | Audited service name (always beyondcorp.googleapis.com). |
resource.labels.method |
string | Audited method name (always AuthorizeUser). |
protoPayload.@type |
string | Audit log payload type (type.googleapis.com/google.cloud.audit.AuditLog). |
protoPayload.serviceName |
string | API service name (beyondcorp.googleapis.com). |
protoPayload.methodName |
string | Invoked method name (AuthorizeUser). |
protoPayload.resourceName |
string | Target application resource path, using the project number. |
protoPayload.status.code |
integer | Omitted (status is {}) when access is granted, or a non-zero status code when access is denied. For example, 7 (PERMISSION_DENIED) indicates failed end-user access checks, and 9 (FAILED_PRECONDITION) indicates a missing upstream resource or missing Virtual Private Cloud (VPC) network permission on the service account. |
protoPayload.authenticationInfo.principalEmail |
string | Authenticated end-user email address. |
protoPayload.authorizationInfo[].permission |
string | Checked permission (beyondcorp.sgApplications.access). |
protoPayload.authorizationInfo[].granted |
boolean | true when all authorization checks (Identity and Access Management (IAM), Context-Aware Access, and upstream VPC permissions) pass, or false on any denial. |
protoPayload.requestMetadata.callerIp |
string | End-user client public IPv4 or IPv6 address. |
protoPayload.requestMetadata.callerSuppliedUserAgent |
string | Client browser User-Agent header. |
protoPayload.requestMetadata.requestAttributes.host |
string | Target destination host:port requested by the browser. |
protoPayload.requestMetadata.requestAttributes.auth.accessLevels[] |
string[] | Access Context Manager access level resource names satisfied by the request. |
protoPayload.metadata.request_id |
string | Unique request ID (UUIDv4) that matches jsonPayload.requestId in application tunnel connection logs. |
protoPayload.metadata.device_id |
string | Chrome Enterprise or Endpoint Verification device identifier. |
protoPayload.metadata.device_state |
string | Evaluated device sync and organization state (Normal, Unknown, Cross Organization, or Out of Sync). |
protoPayload.metadata.unsatisfied_access_levels[] |
string[] | Evaluated access levels that weren't met. Omitted if none failed. |
protoPayload.metadata.oauth_client_id |
string | Legacy OAuth 2.0 client ID field (always empty "" for secure gateway requests). |
protoPayload.metadata.application_upstream |
string | Upstream VPC network path. Included for private web apps only. |
Sample access log entry
The following sample shows an access log entry for an authorized private web app connection:
{
"logName": "projects/my-project/logs/cloudaudit.googleapis.com%2Fdata_access",
"timestamp": "2026-11-17T14:30:00.123456Z",
"severity": "INFO",
"resource": {
"type": "audited_resource",
"labels": {
"project_id": "my-project",
"service": "beyondcorp.googleapis.com",
"method": "AuthorizeUser"
}
},
"protoPayload": {
"@type": "type.googleapis.com/google.cloud.audit.AuditLog",
"serviceName": "beyondcorp.googleapis.com",
"methodName": "AuthorizeUser",
"resourceName": "projects/123456789012/locations/global/securityGateways/corp-sg/applications/intranet-app",
"status": {},
"authenticationInfo": {
"principalEmail": "dana@example.com"
},
"authorizationInfo": [
{
"resource": "projects/123456789012/locations/global/securityGateways/corp-sg/applications/intranet-app",
"permission": "beyondcorp.sgApplications.access",
"granted": true,
"permissionType": "ADMIN_READ"
}
],
"requestMetadata": {
"callerIp": "203.0.113.10",
"callerSuppliedUserAgent": "Mozilla/5.0 ...",
"requestAttributes": {
"host": "intranet.example.com:443",
"auth": {
"accessLevels": [
"accessPolicies/987654321/accessLevels/corp_managed_device"
]
}
}
},
"metadata": {
"request_id": "550e8400-e29b-41d4-a716-446655440000",
"device_id": "device-abc-123",
"device_state": "Normal",
"oauth_client_id": "",
"application_upstream": "projects/my-vpc-project/global/networks/prod-vpc"
}
}
}
Secure gateway resource issues
To troubleshoot issues when creating, updating, or deleting secure gateway
resources, exclude AuthorizeUser checks with the following filter:
resource.type="audited_resource"
resource.labels.service="beyondcorp.googleapis.com"
resource.labels.method!="AuthorizeUser"
Secure gateway connection issues
Connection logs capture transport-level tunnel establishment, regional routing,
HTTP status codes, and connection setup latency after you enable secure gateway
logging on the secure gateway resource. Each entry pairs standard
Cloud Logging
httpRequest field
metadata with a structured SecurityGatewayRequestLog payload in jsonPayload.
To query connection logs in the Logs Explorer, use the following filter:
resource.type="beyondcorp.googleapis.com/SecurityGateway"
Connection log field reference
Each entry is written to the log name
projects/PROJECT_ID/logs/beyondcorp.googleapis.com%2Frequests,
where PROJECT_ID is your Google Cloud project ID.
The following table describes the connection log fields:
| Field path | Type | Description |
|---|---|---|
timestamp |
string | Timestamp when the secure gateway finished tunnel setup or request processing and emitted the log entry. |
severity |
string | INFO for 2xx responses and 407 proxy challenges, or ERROR for failures. |
resource.type |
string | Monitored resource type (always beyondcorp.googleapis.com/SecurityGateway). |
resource.labels.resource_container |
string | Your Google Cloud project ID. |
resource.labels.security_gateway_id |
string | Secure gateway resource identifier. |
resource.labels.location |
string | Gateway location (global). |
httpRequest.requestMethod |
string | CONNECT for app tunnels, or GET for service discovery (service discovery requests don't emit AuthorizeUser access logs). |
httpRequest.requestUrl |
string | Secure gateway proxy or service discovery endpoint URL. Inner app URL paths, headers, and payloads aren't logged because HTTP CONNECT tunnels TLS end-to-end. |
httpRequest.status |
integer | HTTP status code returned to the client (for example, 200, 403, or 502). |
httpRequest.remoteIp |
string | End-user client public IPv4 or IPv6 address. |
httpRequest.userAgent |
string | Client browser User-Agent header. |
httpRequest.latency |
string | Gateway tunnel setup and request processing duration (for example, 0.085s). |
jsonPayload.@type |
string | Connection log payload type (type.googleapis.com/google.cloud.beyondcorp.securitygateways.v1.SecurityGatewayRequestLog). |
jsonPayload.requestId |
string | Unique request ID (UUIDv4) that matches protoPayload.metadata.request_id in access logs. |
jsonPayload.statusCode |
string | Diagnostic failure code for routing, DNS, or transport errors. Omitted when tunnel setup succeeds, on 407 proxy challenges, and on 401 or 403 access denials. |
jsonPayload.context.profileId |
string | Calling user's Chrome browser profile identifier. Omitted if not sent. |
jsonPayload.context.applicationId |
string | Matched secure gateway application resource ID. Omitted if no application matched. |
jsonPayload.context.ingressRegion |
string | Google Cloud region where client traffic entered the secure gateway. |
jsonPayload.context.egressRegion |
string | Google Cloud region that traffic transited to when routed to a different region than ingressRegion. Omitted for same-region routing or if no upstream route was resolved. |
jsonPayload.downstreamRequest.authority |
string | Target host:port requested in HTTP CONNECT, or service discovery host:port in GET requests. |
jsonPayload.upstreamRequest.protocol |
string | Upstream transport protocol: TCP for private web apps and software as a service (SaaS) apps, or HTTPS for external PROXY_GATEWAY and API_GATEWAY upstreams. Omitted if no upstream route was resolved. |
jsonPayload.upstreamRequest.backendEndpoint |
string | Destination HOST:PORT or IP_ADDRESS:PORT. Omitted if no upstream route was resolved. |
jsonPayload.upstreamResponse.status |
integer | HTTP status code from the tunnel or upstream response, such as 200. Omitted if no upstream response was received. |
Connection failure status codes
When a connection fails (severity: ERROR) because of a routing, DNS, or
transport issue, jsonPayload.statusCode records one of the following
diagnostic codes. For 401 or 403 access denials, statusCode is omitted.
To find the denial reason, correlate jsonPayload.requestId with
protoPayload.metadata.request_id in the access log.
statusCode value |
Failure condition |
|---|---|
route_application_not_found |
Target host:port didn't match any application endpoint matcher. |
route_dns_resolution_failed |
Cloud DNS couldn't resolve the target private hostname. |
route_not_found |
Secure gateway couldn't resolve the upstream route or target VPC network. |
route_service_discovery_not_enabled |
Client called the service discovery endpoint while service discovery was disabled. |
route_application_api_gateway_not_found |
Secure gateway couldn't find an application with the API_GATEWAY schema for external service discovery. |
connection_timeout |
Backend connection timed out or reached stream idle or duration limits. |
upstream_unavailable |
Destination reset the connection or timed out before responding. |
upstream_invalid_response |
Upstream server returned a non-200, invalid, or unparseable response. |
downstream_remote_disconnect |
Client closed the connection before the response completed. |
Sample connection log entry
The following sample shows the connection log entry that corresponds to the
sample access log entry, correlated by requestId:
{
"logName": "projects/my-project/logs/beyondcorp.googleapis.com%2Frequests",
"timestamp": "2026-11-17T14:30:00.210000Z",
"severity": "INFO",
"resource": {
"type": "beyondcorp.googleapis.com/SecurityGateway",
"labels": {
"resource_container": "my-project",
"security_gateway_id": "corp-sg",
"location": "global"
}
},
"httpRequest": {
"requestMethod": "CONNECT",
"requestUrl": "https://via.prod.securegateway.goog",
"status": 200,
"remoteIp": "203.0.113.10",
"userAgent": "Mozilla/5.0 ...",
"latency": "0.085s"
},
"jsonPayload": {
"@type": "type.googleapis.com/google.cloud.beyondcorp.securitygateways.v1.SecurityGatewayRequestLog",
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"context": {
"profileId": "profile-xyz-789",
"applicationId": "intranet-app",
"ingressRegion": "europe-west1",
"egressRegion": "us-central1"
},
"downstreamRequest": {
"authority": "intranet.example.com:443"
},
"upstreamRequest": {
"protocol": "TCP",
"backendEndpoint": "intranet.example.com:443"
},
"upstreamResponse": {
"status": 200
}
}
}
To view both the access log and connection log for a single request in the Logs Explorer, filter by the shared request ID:
protoPayload.metadata.request_id="REQUEST_ID" OR jsonPayload.requestId="REQUEST_ID"
Replace REQUEST_ID with the request UUID from either log
entry.
Export and route logs
Both access logs and connection logs are stored as standard Cloud Logging
LogEntry records in your Google Cloud project. You can query them in
the Logs Explorer or route them by using
Cloud Logging sinks to log
buckets, BigQuery, Cloud Storage, or Pub/Sub. To ingest
these logs into Google Security Operations, use
direct Google Cloud log ingestion
for Data Access audit logs, and route connection logs to a
Cloud Storage bucket to configure a
Google SecOps Cloud Storage feed.