Skip to content

Commit

Permalink
feat: release SensitiveAction Cloud Logging payload to v1
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 476083958
  • Loading branch information
Google APIs authored and Copybara-Service committed Sep 22, 2022
1 parent 210422e commit fafd03f
Show file tree
Hide file tree
Showing 2 changed files with 193 additions and 0 deletions.
127 changes: 127 additions & 0 deletions google/cloud/sensitiveaction/logging/v1/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# This file was automatically generated by BuildFileGenerator

##############################################################################
# Common
##############################################################################
load("@rules_proto//proto:defs.bzl", "proto_library")

##############################################################################
# Java
##############################################################################
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
"cc_proto_library",
"csharp_grpc_library",
"csharp_proto_library",
"go_proto_library",
"java_grpc_library",
"java_proto_library",
"moved_proto_library",
"php_grpc_library",
"php_proto_library",
"py_grpc_library",
"py_proto_library",
"ruby_grpc_library",
"ruby_proto_library",
)

# This is an API workspace, having public visibility by default makes perfect sense.
package(default_visibility = ["//visibility:public"])

proto_library(
name = "logging_proto",
srcs = [
"sensitive_action_payload.proto",
],
deps = [
"//google/cloud/securitycenter/v1:securitycenter_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

java_proto_library(
name = "logging_java_proto",
deps = [":logging_proto"],
)

java_grpc_library(
name = "logging_java_grpc",
srcs = [":logging_proto"],
deps = [":logging_java_proto"],
)

go_proto_library(
name = "logging_go_proto",
compilers = ["@io_bazel_rules_go//proto:go_grpc"],
importpath = "google.golang.org/genproto/googleapis/cloud/sensitiveaction/logging/v1",
protos = [":logging_proto"],
deps = [
"//google/cloud/securitycenter/v1:securitycenter_go_proto",
],
)

moved_proto_library(
name = "logging_moved_proto",
srcs = [":logging_proto"],
deps = [
"//google/cloud/securitycenter/v1:securitycenter_proto",
"@com_google_protobuf//:timestamp_proto",
],
)

py_proto_library(
name = "logging_py_proto",
deps = [":logging_moved_proto"],
)

py_grpc_library(
name = "logging_py_grpc",
srcs = [":logging_moved_proto"],
deps = [":logging_py_proto"],
)

php_proto_library(
name = "logging_php_proto",
deps = [":logging_proto"],
)

php_grpc_library(
name = "logging_php_grpc",
srcs = [":logging_proto"],
deps = [":logging_php_proto"],
)

ruby_proto_library(
name = "logging_ruby_proto",
deps = [":logging_proto"],
)

ruby_grpc_library(
name = "logging_ruby_grpc",
srcs = [":logging_proto"],
deps = [":logging_ruby_proto"],
)

csharp_proto_library(
name = "logging_csharp_proto",
deps = [":logging_proto"],
)

csharp_grpc_library(
name = "logging_csharp_grpc",
srcs = [":logging_proto"],
deps = [":logging_csharp_proto"],
)

cc_proto_library(
name = "logging_cc_proto",
deps = [":logging_proto"],
)

cc_grpc_library(
name = "logging_cc_grpc",
srcs = [":logging_proto"],
grpc_only = True,
deps = [":logging_cc_proto"],
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
// Copyright 2022 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

syntax = "proto3";

package google.cloud.sensitiveaction.logging.v1;

import "google/cloud/securitycenter/v1/access.proto";
import "google/protobuf/timestamp.proto";

option csharp_namespace = "Google.Cloud.SensitiveAction.Logging.V1";
option go_package = "google.golang.org/genproto/googleapis/cloud/sensitiveaction/logging/v1;logging";
option java_multiple_files = true;
option java_outer_classname = "SensitiveActionPayloadProto";
option java_package = "com.google.cloud.sensitiveaction.logging.v1";
option php_namespace = "Google\\Cloud\\SensitiveAction\\Logging\\V1";
option ruby_package = "Google::Cloud::SensitiveAction::Logging::V1";

// Payload proto for sensitiveaction.googleapis.com/action
// Platform Log event that describes a sensitive action
message SensitiveAction {
// Used to reference a specific Cloud Logging LogEntry.
message SourceLogId {
// The GCP resource (organization, folder, or project) that the LogEntry
// came from.
string resource_container = 1;

// The timestamp of the LogEntry.
google.protobuf.Timestamp log_time = 2;

// The insert_id of the LogEntry.
string insert_id = 3;

// A link to the Cloud Logging dashboard with a query for the LogEntry.
string query_uri = 4;
}

// The type of action (eg. "change_organization_policy").
string action_type = 1;

// The time this action was detected.
google.protobuf.Timestamp action_time = 2;

// GCP resources that are involved in the action.
repeated string affected_resources = 3;

// Cloud Logging entries that were used to identify the action.
repeated SourceLogId source_log_ids = 4;

// Link to documentation where you can learn more about sensitive actions.
string learn_more_uri = 5;

// Access details associated to the sensitive action.
google.cloud.securitycenter.v1.Access access = 6;
}

0 comments on commit fafd03f

Please sign in to comment.