xref: /aosp_15_r20/external/googleapis/google/cloud/identitytoolkit/logging/request_log.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1// Copyright 2023 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.cloud.identitytoolkit.logging;
18
19import "google/protobuf/struct.proto";
20import "google/rpc/status.proto";
21
22option go_package = "cloud.google.com/go/identitytoolkit/logging/loggingpb;loggingpb";
23option java_multiple_files = true;
24option java_outer_classname = "RequestLogProto";
25option java_package = "com.google.cloud.identitytoolkit.logging";
26
27// Log of a request to Identitytoolkit. This proto is modeled after
28// google.cloud.audit.AuditLog so that consumers can easily query
29// for requests regardless of whether those requests were logged via
30// Cloud Audit Logging or Identitytoolkit request logging.
31message RequestLog {
32  // The name of the service method or operation.
33  // For API calls, this should be the name of the API method.
34  // For example,
35  //
36  //     "google.datastore.v1.Datastore.RunQuery"
37  //     "google.logging.v1.LoggingService.DeleteLog"
38  string method_name = 1;
39
40  // The status of the overall operation.
41  google.rpc.Status status = 2;
42
43  // Metadata about the operation.
44  RequestMetadata request_metadata = 3;
45
46  // The operation request. This may not include all request parameters,
47  // such as those that are too large, privacy-sensitive, or duplicated
48  // elsewhere in the log record.
49  // It should never include user-generated data, such as file contents.
50  // When the JSON object represented here has a proto equivalent, the proto
51  // name will be indicated in the `@type` property.
52  google.protobuf.Struct request = 4;
53
54  // The operation response. This may not include all response elements,
55  // such as those that are too large, privacy-sensitive, or duplicated
56  // elsewhere in the log record.
57  // It should never include user-generated data, such as file contents.
58  // When the JSON object represented here has a proto equivalent, the proto
59  // name will be indicated in the `@type` property.
60  google.protobuf.Struct response = 5;
61
62  // The number of items returned from a List or Query API method,
63  // if applicable.
64  int64 num_response_items = 6;
65
66  // Other service-specific data about the request, response, and other
67  // information associated with the current event.
68  google.protobuf.Struct metadata = 7;
69}
70
71// Metadata about the request.
72message RequestMetadata {
73  // The IP address of the caller.
74  string caller_ip = 1;
75
76  // The user agent of the caller.
77  // This information is not authenticated and should be treated
78  // accordingly.
79  //
80  // For example:
81  //
82  // +   `google-api-python-client/1.4.0`:
83  //     The request was made by the Google API client for Python.
84  // +   `Cloud SDK Command Line Tool apitools-client/1.0 gcloud/0.9.62`:
85  //     The request was made by the Google Cloud SDK CLI (gcloud).
86  // +   `AppEngine-Google; (+http://code.google.com/appengine; appid:
87  //      s~my-project`:
88  //     The request was made from the `my-project` App Engine app.
89  // NOLINT
90  string caller_supplied_user_agent = 2;
91}
92