// Copyright 2026 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.securitycenter.v1;

import "google/api/field_info.proto";

option csharp_namespace = "Google.Cloud.SecurityCenter.V1";
option go_package = "cloud.google.com/go/securitycenter/apiv1/securitycenterpb;securitycenterpb";
option java_multiple_files = true;
option java_outer_classname = "ExternalExposureProto";
option java_package = "com.google.cloud.securitycenter.v1";
option php_namespace = "Google\\Cloud\\SecurityCenter\\V1";
option ruby_package = "Google::Cloud::SecurityCenter::V1";

// Details about the externally exposed resource associated with the finding.
message ExternalExposure {
  // Private IP address of the exposed endpoint.
  string private_ip_address = 1 [(google.api.field_info).format = IPV4_OR_IPV6];

  // Port number associated with private IP address.
  string private_port = 2;

  // The name and version of the service, for example, "Jupyter
  // Notebook 6.14.0".
  string exposed_service = 3;

  // Public IP address of the exposed endpoint.
  string public_ip_address = 4 [(google.api.field_info).format = IPV4_OR_IPV6];

  // Public port number of the exposed endpoint.
  string public_port = 5;

  // The resource which is running the exposed service, for example,
  // "//compute.googleapis.com/projects/{project-id}/zones/{zone}/instances/{instance}.”
  string exposed_endpoint = 6;

  // The full resource name of the load balancer firewall policy, for example,
  // "//compute.googleapis.com/projects/{project-id}/global/firewallPolicies/{policy-name}".
  string load_balancer_firewall_policy = 7;

  // The full resource name of the firewall policy of the exposed service, for
  // example,
  // "//compute.googleapis.com/projects/{project-id}/global/firewallPolicies/{policy-name}".
  string service_firewall_policy = 8;

  // The full resource name of the forwarding rule, for example,
  // "//compute.googleapis.com/projects/{project-id}/global/forwardingRules/{forwarding-rule-name}".
  string forwarding_rule = 9;

  // The full resource name of load balancer backend service, for example,
  // "//compute.googleapis.com/projects/{project-id}/global/backendServices/{name}".
  string backend_service = 10;

  // The full resource name of the instance group, for example,
  // "//compute.googleapis.com/projects/{project-id}/global/instanceGroups/{name}".
  string instance_group = 11;

  // The full resource name of the network endpoint group, for example,
  // "//compute.googleapis.com/projects/{project-id}/global/networkEndpointGroups/{name}".
  string network_endpoint_group = 12;
}
