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.securitycenter.v1; 18 19option csharp_namespace = "Google.Cloud.SecurityCenter.V1"; 20option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb"; 21option java_multiple_files = true; 22option java_outer_classname = "DatabaseProto"; 23option java_package = "com.google.cloud.securitycenter.v1"; 24option php_namespace = "Google\\Cloud\\SecurityCenter\\V1"; 25option ruby_package = "Google::Cloud::SecurityCenter::V1"; 26 27// Represents database access information, such as queries. A database may be a 28// sub-resource of an instance (as in the case of Cloud SQL instances or Cloud 29// Spanner instances), or the database instance itself. Some database resources 30// might not have the [full resource 31// name](https://google.aip.dev/122#full-resource-names) populated because these 32// resource types, such as Cloud SQL databases, are not yet supported by Cloud 33// Asset Inventory. In these cases only the display name is provided. 34message Database { 35 // Some database resources may not have the [full resource 36 // name](https://google.aip.dev/122#full-resource-names) populated because 37 // these resource types are not yet supported by Cloud Asset Inventory (e.g. 38 // Cloud SQL databases). In these cases only the display name will be 39 // provided. 40 // The [full resource name](https://google.aip.dev/122#full-resource-names) of 41 // the database that the user connected to, if it is supported by Cloud Asset 42 // Inventory. 43 string name = 1; 44 45 // The human-readable name of the database that the user connected to. 46 string display_name = 2; 47 48 // The username used to connect to the database. The username might not be an 49 // IAM principal and does not have a set format. 50 string user_name = 3; 51 52 // The SQL statement that is associated with the database access. 53 string query = 4; 54 55 // The target usernames, roles, or groups of an SQL privilege grant, which is 56 // not an IAM policy change. 57 repeated string grantees = 5; 58 59 // The version of the database, for example, POSTGRES_14. 60 // See [the complete 61 // list](https://cloud.google.com/sql/docs/mysql/admin-api/rest/v1/SqlDatabaseVersion). 62 string version = 6; 63} 64