xref: /aosp_15_r20/external/googleapis/google/cloud/securitycenter/v2/access.proto (revision d5c09012810ac0c9f33fe448fb6da8260d444cc9)
1*d5c09012SAndroid Build Coastguard Worker// Copyright 2023 Google LLC
2*d5c09012SAndroid Build Coastguard Worker//
3*d5c09012SAndroid Build Coastguard Worker// Licensed under the Apache License, Version 2.0 (the "License");
4*d5c09012SAndroid Build Coastguard Worker// you may not use this file except in compliance with the License.
5*d5c09012SAndroid Build Coastguard Worker// You may obtain a copy of the License at
6*d5c09012SAndroid Build Coastguard Worker//
7*d5c09012SAndroid Build Coastguard Worker//     http://www.apache.org/licenses/LICENSE-2.0
8*d5c09012SAndroid Build Coastguard Worker//
9*d5c09012SAndroid Build Coastguard Worker// Unless required by applicable law or agreed to in writing, software
10*d5c09012SAndroid Build Coastguard Worker// distributed under the License is distributed on an "AS IS" BASIS,
11*d5c09012SAndroid Build Coastguard Worker// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12*d5c09012SAndroid Build Coastguard Worker// See the License for the specific language governing permissions and
13*d5c09012SAndroid Build Coastguard Worker// limitations under the License.
14*d5c09012SAndroid Build Coastguard Worker
15*d5c09012SAndroid Build Coastguard Workersyntax = "proto3";
16*d5c09012SAndroid Build Coastguard Worker
17*d5c09012SAndroid Build Coastguard Workerpackage google.cloud.securitycenter.v2;
18*d5c09012SAndroid Build Coastguard Worker
19*d5c09012SAndroid Build Coastguard Workeroption csharp_namespace = "Google.Cloud.SecurityCenter.V2";
20*d5c09012SAndroid Build Coastguard Workeroption go_package = "cloud.google.com/go/securitycenter/apiv2/securitycenterpb;securitycenterpb";
21*d5c09012SAndroid Build Coastguard Workeroption java_multiple_files = true;
22*d5c09012SAndroid Build Coastguard Workeroption java_outer_classname = "AccessProto";
23*d5c09012SAndroid Build Coastguard Workeroption java_package = "com.google.cloud.securitycenter.v2";
24*d5c09012SAndroid Build Coastguard Workeroption php_namespace = "Google\\Cloud\\SecurityCenter\\V2";
25*d5c09012SAndroid Build Coastguard Workeroption ruby_package = "Google::Cloud::SecurityCenter::V2";
26*d5c09012SAndroid Build Coastguard Worker
27*d5c09012SAndroid Build Coastguard Worker// Represents an access event.
28*d5c09012SAndroid Build Coastguard Workermessage Access {
29*d5c09012SAndroid Build Coastguard Worker  // Associated email, such as "[email protected]".
30*d5c09012SAndroid Build Coastguard Worker  //
31*d5c09012SAndroid Build Coastguard Worker  // The email address of the authenticated user or a service account acting on
32*d5c09012SAndroid Build Coastguard Worker  // behalf of a third party principal making the request. For third party
33*d5c09012SAndroid Build Coastguard Worker  // identity callers, the `principal_subject` field is populated instead of
34*d5c09012SAndroid Build Coastguard Worker  // this field. For privacy reasons, the principal email address is sometimes
35*d5c09012SAndroid Build Coastguard Worker  // redacted. For more information, see [Caller identities in audit
36*d5c09012SAndroid Build Coastguard Worker  // logs](https://cloud.google.com/logging/docs/audit#user-id).
37*d5c09012SAndroid Build Coastguard Worker  string principal_email = 1;
38*d5c09012SAndroid Build Coastguard Worker
39*d5c09012SAndroid Build Coastguard Worker  // Caller's IP address, such as "1.1.1.1".
40*d5c09012SAndroid Build Coastguard Worker  string caller_ip = 2;
41*d5c09012SAndroid Build Coastguard Worker
42*d5c09012SAndroid Build Coastguard Worker  // The caller IP's geolocation, which identifies where the call came from.
43*d5c09012SAndroid Build Coastguard Worker  Geolocation caller_ip_geo = 3;
44*d5c09012SAndroid Build Coastguard Worker
45*d5c09012SAndroid Build Coastguard Worker  // Type of user agent associated with the finding. For example, an operating
46*d5c09012SAndroid Build Coastguard Worker  // system shell or an embedded or standalone application.
47*d5c09012SAndroid Build Coastguard Worker  string user_agent_family = 4;
48*d5c09012SAndroid Build Coastguard Worker
49*d5c09012SAndroid Build Coastguard Worker  // The caller's user agent string associated with the finding.
50*d5c09012SAndroid Build Coastguard Worker  string user_agent = 5;
51*d5c09012SAndroid Build Coastguard Worker
52*d5c09012SAndroid Build Coastguard Worker  // This is the API service that the service account made a call to, e.g.
53*d5c09012SAndroid Build Coastguard Worker  // "iam.googleapis.com"
54*d5c09012SAndroid Build Coastguard Worker  string service_name = 6;
55*d5c09012SAndroid Build Coastguard Worker
56*d5c09012SAndroid Build Coastguard Worker  // The method that the service account called, e.g. "SetIamPolicy".
57*d5c09012SAndroid Build Coastguard Worker  string method_name = 7;
58*d5c09012SAndroid Build Coastguard Worker
59*d5c09012SAndroid Build Coastguard Worker  // A string that represents the principal_subject that is associated with the
60*d5c09012SAndroid Build Coastguard Worker  // identity. Unlike `principal_email`, `principal_subject` supports principals
61*d5c09012SAndroid Build Coastguard Worker  // that aren't associated with email addresses, such as third party
62*d5c09012SAndroid Build Coastguard Worker  // principals. For most identities, the format is
63*d5c09012SAndroid Build Coastguard Worker  // `principal://iam.googleapis.com/{identity pool name}/subject/{subject}`.
64*d5c09012SAndroid Build Coastguard Worker  // Some GKE identities, such as GKE_WORKLOAD, FREEFORM, and GKE_HUB_WORKLOAD,
65*d5c09012SAndroid Build Coastguard Worker  // still use the legacy format `serviceAccount:{identity pool
66*d5c09012SAndroid Build Coastguard Worker  // name}[{subject}]`.
67*d5c09012SAndroid Build Coastguard Worker  string principal_subject = 8;
68*d5c09012SAndroid Build Coastguard Worker
69*d5c09012SAndroid Build Coastguard Worker  // The name of the service account key that was used to create or exchange
70*d5c09012SAndroid Build Coastguard Worker  // credentials when authenticating the service account that made the request.
71*d5c09012SAndroid Build Coastguard Worker  // This is a scheme-less URI full resource name. For example:
72*d5c09012SAndroid Build Coastguard Worker  //
73*d5c09012SAndroid Build Coastguard Worker  // "//iam.googleapis.com/projects/{PROJECT_ID}/serviceAccounts/{ACCOUNT}/keys/{key}".
74*d5c09012SAndroid Build Coastguard Worker  //
75*d5c09012SAndroid Build Coastguard Worker  string service_account_key_name = 9;
76*d5c09012SAndroid Build Coastguard Worker
77*d5c09012SAndroid Build Coastguard Worker  // The identity delegation history of an authenticated service account that
78*d5c09012SAndroid Build Coastguard Worker  // made the request. The `serviceAccountDelegationInfo[]` object contains
79*d5c09012SAndroid Build Coastguard Worker  // information about the real authorities that try to access Google Cloud
80*d5c09012SAndroid Build Coastguard Worker  // resources by delegating on a service account. When multiple authorities are
81*d5c09012SAndroid Build Coastguard Worker  // present, they are guaranteed to be sorted based on the original ordering of
82*d5c09012SAndroid Build Coastguard Worker  // the identity delegation events.
83*d5c09012SAndroid Build Coastguard Worker  repeated ServiceAccountDelegationInfo service_account_delegation_info = 10;
84*d5c09012SAndroid Build Coastguard Worker
85*d5c09012SAndroid Build Coastguard Worker  // A string that represents a username. The username provided depends on the
86*d5c09012SAndroid Build Coastguard Worker  // type of the finding and is likely not an IAM principal. For example, this
87*d5c09012SAndroid Build Coastguard Worker  // can be a system username if the finding is related to a virtual machine, or
88*d5c09012SAndroid Build Coastguard Worker  // it can be an application login username.
89*d5c09012SAndroid Build Coastguard Worker  string user_name = 11;
90*d5c09012SAndroid Build Coastguard Worker}
91*d5c09012SAndroid Build Coastguard Worker
92*d5c09012SAndroid Build Coastguard Worker// Identity delegation history of an authenticated service account.
93*d5c09012SAndroid Build Coastguard Workermessage ServiceAccountDelegationInfo {
94*d5c09012SAndroid Build Coastguard Worker  // The email address of a Google account.
95*d5c09012SAndroid Build Coastguard Worker  string principal_email = 1;
96*d5c09012SAndroid Build Coastguard Worker
97*d5c09012SAndroid Build Coastguard Worker  // A string representing the principal_subject associated with the identity.
98*d5c09012SAndroid Build Coastguard Worker  // As compared to `principal_email`, supports principals that aren't
99*d5c09012SAndroid Build Coastguard Worker  // associated with email addresses, such as third party principals. For most
100*d5c09012SAndroid Build Coastguard Worker  // identities, the format will be `principal://iam.googleapis.com/{identity
101*d5c09012SAndroid Build Coastguard Worker  // pool name}/subjects/{subject}` except for some GKE identities
102*d5c09012SAndroid Build Coastguard Worker  // (GKE_WORKLOAD, FREEFORM, GKE_HUB_WORKLOAD) that are still in the legacy
103*d5c09012SAndroid Build Coastguard Worker  // format `serviceAccount:{identity pool name}[{subject}]`
104*d5c09012SAndroid Build Coastguard Worker  string principal_subject = 2;
105*d5c09012SAndroid Build Coastguard Worker}
106*d5c09012SAndroid Build Coastguard Worker
107*d5c09012SAndroid Build Coastguard Worker// Represents a geographical location for a given access.
108*d5c09012SAndroid Build Coastguard Workermessage Geolocation {
109*d5c09012SAndroid Build Coastguard Worker  // A CLDR.
110*d5c09012SAndroid Build Coastguard Worker  string region_code = 1;
111*d5c09012SAndroid Build Coastguard Worker}
112