xref: /aosp_15_r20/external/googleapis/google/rpc/context/audit_context.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2022 Google LLC
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15syntax = "proto3";
16
17package google.rpc.context;
18
19import "google/protobuf/struct.proto";
20
21option cc_enable_arenas = true;
22option go_package = "google.golang.org/genproto/googleapis/rpc/context;context";
23option java_multiple_files = true;
24option java_outer_classname = "AuditContextProto";
25option java_package = "com.google.rpc.context";
26
27// `AuditContext` provides information that is needed for audit logging.
28message AuditContext {
29  // Serialized audit log.
30  bytes audit_log = 1;
31
32  // An API request message that is scrubbed based on the method annotation.
33  // This field should only be filled if audit_log field is present.
34  // Service Control will use this to assemble a complete log for Cloud Audit
35  // Logs and Google internal audit logs.
36  google.protobuf.Struct scrubbed_request = 2;
37
38  // An API response message that is scrubbed based on the method annotation.
39  // This field should only be filled if audit_log field is present.
40  // Service Control will use this to assemble a complete log for Cloud Audit
41  // Logs and Google internal audit logs.
42  google.protobuf.Struct scrubbed_response = 3;
43
44  // Number of scrubbed response items.
45  int32 scrubbed_response_item_count = 4;
46
47  // Audit resource name which is scrubbed.
48  string target_resource = 5;
49}
50