request_log.proto 3.5 KB

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