trace.proto 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979
  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.networkmanagement.v1beta1;
  16. option csharp_namespace = "Google.Cloud.NetworkManagement.V1Beta1";
  17. option go_package = "google.golang.org/genproto/googleapis/cloud/networkmanagement/v1beta1;networkmanagement";
  18. option java_multiple_files = true;
  19. option java_outer_classname = "TraceProto";
  20. option java_package = "com.google.cloud.networkmanagement.v1beta1";
  21. option php_namespace = "Google\\Cloud\\NetworkManagement\\V1beta1";
  22. option ruby_package = "Google::Cloud::NetworkManagement::V1beta1";
  23. // Trace represents one simulated packet forwarding path.
  24. //
  25. // * Each trace contains multiple ordered steps.
  26. // * Each step is in a particular state with associated configuration.
  27. // * State is categorized as final or non-final states.
  28. // * Each final state has a reason associated.
  29. // * Each trace must end with a final state (the last step).
  30. // ```
  31. // |---------------------Trace----------------------|
  32. // Step1(State) Step2(State) --- StepN(State(final))
  33. // ```
  34. message Trace {
  35. // Derived from the source and destination endpoints definition specified by
  36. // user request, and validated by the data plane model.
  37. // If there are multiple traces starting from different source locations, then
  38. // the endpoint_info may be different between traces.
  39. EndpointInfo endpoint_info = 1;
  40. // A trace of a test contains multiple steps from the initial state to the
  41. // final state (delivered, dropped, forwarded, or aborted).
  42. //
  43. // The steps are ordered by the processing sequence within the simulated
  44. // network state machine. It is critical to preserve the order of the steps
  45. // and avoid reordering or sorting them.
  46. repeated Step steps = 2;
  47. }
  48. // A simulated forwarding path is composed of multiple steps.
  49. // Each step has a well-defined state and an associated configuration.
  50. message Step {
  51. // Type of states that are defined in the network state machine.
  52. // Each step in the packet trace is in a specific state.
  53. enum State {
  54. // Unspecified state.
  55. STATE_UNSPECIFIED = 0;
  56. // Initial state: packet originating from a Compute Engine instance.
  57. // An InstanceInfo is populated with starting instance information.
  58. START_FROM_INSTANCE = 1;
  59. // Initial state: packet originating from the internet.
  60. // The endpoint information is populated.
  61. START_FROM_INTERNET = 2;
  62. // Initial state: packet originating from a VPC or on-premises network
  63. // with internal source IP.
  64. // If the source is a VPC network visible to the user, a NetworkInfo
  65. // is populated with details of the network.
  66. START_FROM_PRIVATE_NETWORK = 3;
  67. // Initial state: packet originating from a Google Kubernetes Engine cluster
  68. // master. A GKEMasterInfo is populated with starting instance information.
  69. START_FROM_GKE_MASTER = 21;
  70. // Initial state: packet originating from a Cloud SQL instance.
  71. // A CloudSQLInstanceInfo is populated with starting instance information.
  72. START_FROM_CLOUD_SQL_INSTANCE = 22;
  73. // Initial state: packet originating from a Cloud function.
  74. // A CloudFunctionInfo is populated with starting function information.
  75. START_FROM_CLOUD_FUNCTION = 23;
  76. // Config checking state: verify ingress firewall rule.
  77. APPLY_INGRESS_FIREWALL_RULE = 4;
  78. // Config checking state: verify egress firewall rule.
  79. APPLY_EGRESS_FIREWALL_RULE = 5;
  80. // Config checking state: verify route.
  81. APPLY_ROUTE = 6;
  82. // Config checking state: match forwarding rule.
  83. APPLY_FORWARDING_RULE = 7;
  84. // Config checking state: packet sent or received under foreign IP
  85. // address and allowed.
  86. SPOOFING_APPROVED = 8;
  87. // Forwarding state: arriving at a Compute Engine instance.
  88. ARRIVE_AT_INSTANCE = 9;
  89. // Forwarding state: arriving at a Compute Engine internal load balancer.
  90. ARRIVE_AT_INTERNAL_LOAD_BALANCER = 10;
  91. // Forwarding state: arriving at a Compute Engine external load balancer.
  92. ARRIVE_AT_EXTERNAL_LOAD_BALANCER = 11;
  93. // Forwarding state: arriving at a Cloud VPN gateway.
  94. ARRIVE_AT_VPN_GATEWAY = 12;
  95. // Forwarding state: arriving at a Cloud VPN tunnel.
  96. ARRIVE_AT_VPN_TUNNEL = 13;
  97. // Forwarding state: arriving at a VPC connector.
  98. ARRIVE_AT_VPC_CONNECTOR = 24;
  99. // Transition state: packet header translated.
  100. NAT = 14;
  101. // Transition state: original connection is terminated and a new proxied
  102. // connection is initiated.
  103. PROXY_CONNECTION = 15;
  104. // Final state: packet could be delivered.
  105. DELIVER = 16;
  106. // Final state: packet could be dropped.
  107. DROP = 17;
  108. // Final state: packet could be forwarded to a network with an unknown
  109. // configuration.
  110. FORWARD = 18;
  111. // Final state: analysis is aborted.
  112. ABORT = 19;
  113. // Special state: viewer of the test result does not have permission to
  114. // see the configuration in this step.
  115. VIEWER_PERMISSION_MISSING = 20;
  116. }
  117. // A description of the step. Usually this is a summary of the state.
  118. string description = 1;
  119. // Each step is in one of the pre-defined states.
  120. State state = 2;
  121. // This is a step that leads to the final state Drop.
  122. bool causes_drop = 3;
  123. // Project ID that contains the configuration this step is validating.
  124. string project_id = 4;
  125. // Configuration or metadata associated with each step.
  126. // The configuration is filtered based on viewer's permission. If a viewer
  127. // has no permission to view the configuration in this step, for non-final
  128. // states a special state is populated (VIEWER_PERMISSION_MISSING), and for
  129. // final state the configuration is cleared.
  130. oneof step_info {
  131. // Display information of a Compute Engine instance.
  132. InstanceInfo instance = 5;
  133. // Display information of a Compute Engine firewall rule.
  134. FirewallInfo firewall = 6;
  135. // Display information of a Compute Engine route.
  136. RouteInfo route = 7;
  137. // Display information of the source and destination under analysis.
  138. // The endpoint information in an intermediate state may differ with the
  139. // initial input, as it might be modified by state like NAT,
  140. // or Connection Proxy.
  141. EndpointInfo endpoint = 8;
  142. // Display information of a Compute Engine forwarding rule.
  143. ForwardingRuleInfo forwarding_rule = 9;
  144. // Display information of a Compute Engine VPN gateway.
  145. VpnGatewayInfo vpn_gateway = 10;
  146. // Display information of a Compute Engine VPN tunnel.
  147. VpnTunnelInfo vpn_tunnel = 11;
  148. // Display information of a VPC connector.
  149. VpcConnectorInfo vpc_connector = 21;
  150. // Display information of the final state "deliver" and reason.
  151. DeliverInfo deliver = 12;
  152. // Display information of the final state "forward" and reason.
  153. ForwardInfo forward = 13;
  154. // Display information of the final state "abort" and reason.
  155. AbortInfo abort = 14;
  156. // Display information of the final state "drop" and reason.
  157. DropInfo drop = 15;
  158. // Display information of the load balancers.
  159. LoadBalancerInfo load_balancer = 16;
  160. // Display information of a Google Cloud network.
  161. NetworkInfo network = 17;
  162. // Display information of a Google Kubernetes Engine cluster master.
  163. GKEMasterInfo gke_master = 18;
  164. // Display information of a Cloud SQL instance.
  165. CloudSQLInstanceInfo cloud_sql_instance = 19;
  166. // Display information of a Cloud function.
  167. CloudFunctionInfo cloud_function = 20;
  168. }
  169. }
  170. // For display only. Metadata associated with a Compute Engine instance.
  171. message InstanceInfo {
  172. // Name of a Compute Engine instance.
  173. string display_name = 1;
  174. // URI of a Compute Engine instance.
  175. string uri = 2;
  176. // Name of the network interface of a Compute Engine instance.
  177. string interface = 3;
  178. // URI of a Compute Engine network.
  179. string network_uri = 4;
  180. // Internal IP address of the network interface.
  181. string internal_ip = 5;
  182. // External IP address of the network interface.
  183. string external_ip = 6;
  184. // Network tags configured on the instance.
  185. repeated string network_tags = 7;
  186. // Service account authorized for the instance.
  187. string service_account = 8 [deprecated = true];
  188. }
  189. // For display only. Metadata associated with a Compute Engine network.
  190. message NetworkInfo {
  191. // Name of a Compute Engine network.
  192. string display_name = 1;
  193. // URI of a Compute Engine network.
  194. string uri = 2;
  195. // The IP range that matches the test.
  196. string matched_ip_range = 4;
  197. }
  198. // For display only. Metadata associated with a VPC firewall rule, an implied
  199. // VPC firewall rule, or a hierarchical firewall policy rule.
  200. message FirewallInfo {
  201. // The firewall rule's type.
  202. enum FirewallRuleType {
  203. // Unspecified type.
  204. FIREWALL_RULE_TYPE_UNSPECIFIED = 0;
  205. // Hierarchical firewall policy rule. For details, see
  206. // [Hierarchical firewall policies
  207. // overview](https://cloud.google.com/vpc/docs/firewall-policies).
  208. HIERARCHICAL_FIREWALL_POLICY_RULE = 1;
  209. // VPC firewall rule. For details, see
  210. // [VPC firewall rules
  211. // overview](https://cloud.google.com/vpc/docs/firewalls).
  212. VPC_FIREWALL_RULE = 2;
  213. // Implied VPC firewall rule. For details, see
  214. // [Implied
  215. // rules](https://cloud.google.com/vpc/docs/firewalls#default_firewall_rules).
  216. IMPLIED_VPC_FIREWALL_RULE = 3;
  217. // Implicit firewall rules that are managed by serverless VPC access to
  218. // allow ingress access. They are not visible in the Google Cloud console.
  219. // For details, see [VPC connector's implicit
  220. // rules](https://cloud.google.com/functions/docs/networking/connecting-vpc#restrict-access).
  221. SERVERLESS_VPC_ACCESS_MANAGED_FIREWALL_RULE = 4;
  222. }
  223. // The display name of the VPC firewall rule. This field is not applicable
  224. // to hierarchical firewall policy rules.
  225. string display_name = 1;
  226. // The URI of the VPC firewall rule. This field is not applicable to
  227. // implied firewall rules or hierarchical firewall policy rules.
  228. string uri = 2;
  229. // Possible values: INGRESS, EGRESS
  230. string direction = 3;
  231. // Possible values: ALLOW, DENY
  232. string action = 4;
  233. // The priority of the firewall rule.
  234. int32 priority = 5;
  235. // The URI of the VPC network that the firewall rule is associated with.
  236. // This field is not applicable to hierarchical firewall policy rules.
  237. string network_uri = 6;
  238. // The target tags defined by the VPC firewall rule. This field is not
  239. // applicable to hierarchical firewall policy rules.
  240. repeated string target_tags = 7;
  241. // The target service accounts specified by the firewall rule.
  242. repeated string target_service_accounts = 8;
  243. // The hierarchical firewall policy that this rule is associated with.
  244. // This field is not applicable to VPC firewall rules.
  245. string policy = 9;
  246. // The firewall rule's type.
  247. FirewallRuleType firewall_rule_type = 10;
  248. }
  249. // For display only. Metadata associated with a Compute Engine route.
  250. message RouteInfo {
  251. // Type of route:
  252. enum RouteType {
  253. // Unspecified type. Default value.
  254. ROUTE_TYPE_UNSPECIFIED = 0;
  255. // Route is a subnet route automatically created by the system.
  256. SUBNET = 1;
  257. // Static route created by the user, including the default route to the
  258. // internet.
  259. STATIC = 2;
  260. // Dynamic route exchanged between BGP peers.
  261. DYNAMIC = 3;
  262. // A subnet route received from peering network.
  263. PEERING_SUBNET = 4;
  264. // A static route received from peering network.
  265. PEERING_STATIC = 5;
  266. // A dynamic route received from peering network.
  267. PEERING_DYNAMIC = 6;
  268. }
  269. // Type of next hop:
  270. enum NextHopType {
  271. // Unspecified type. Default value.
  272. NEXT_HOP_TYPE_UNSPECIFIED = 0;
  273. // Next hop is an IP address.
  274. NEXT_HOP_IP = 1;
  275. // Next hop is a Compute Engine instance.
  276. NEXT_HOP_INSTANCE = 2;
  277. // Next hop is a VPC network gateway.
  278. NEXT_HOP_NETWORK = 3;
  279. // Next hop is a peering VPC.
  280. NEXT_HOP_PEERING = 4;
  281. // Next hop is an interconnect.
  282. NEXT_HOP_INTERCONNECT = 5;
  283. // Next hop is a VPN tunnel.
  284. NEXT_HOP_VPN_TUNNEL = 6;
  285. // Next hop is a VPN gateway. This scenario only happens when tracing
  286. // connectivity from an on-premises network to Google Cloud through a VPN.
  287. // The analysis simulates a packet departing from the on-premises network
  288. // through a VPN tunnel and arriving at a Cloud VPN gateway.
  289. NEXT_HOP_VPN_GATEWAY = 7;
  290. // Next hop is an internet gateway.
  291. NEXT_HOP_INTERNET_GATEWAY = 8;
  292. // Next hop is blackhole; that is, the next hop either does not exist or is
  293. // not running.
  294. NEXT_HOP_BLACKHOLE = 9;
  295. // Next hop is the forwarding rule of an Internal Load Balancer.
  296. NEXT_HOP_ILB = 10;
  297. // Next hop is a
  298. // [router appliance
  299. // instance](https://cloud.google.com/network-connectivity/docs/network-connectivity-center/concepts/ra-overview).
  300. NEXT_HOP_ROUTER_APPLIANCE = 11;
  301. }
  302. // Type of route.
  303. RouteType route_type = 8;
  304. // Type of next hop.
  305. NextHopType next_hop_type = 9;
  306. // Name of a Compute Engine route.
  307. string display_name = 1;
  308. // URI of a Compute Engine route.
  309. // Dynamic route from cloud router does not have a URI.
  310. // Advertised route from Google Cloud VPC to on-premises network also does
  311. // not have a URI.
  312. string uri = 2;
  313. // Destination IP range of the route.
  314. string dest_ip_range = 3;
  315. // Next hop of the route.
  316. string next_hop = 4;
  317. // URI of a Compute Engine network.
  318. string network_uri = 5;
  319. // Priority of the route.
  320. int32 priority = 6;
  321. // Instance tags of the route.
  322. repeated string instance_tags = 7;
  323. }
  324. // For display only. Metadata associated with a Compute Engine forwarding rule.
  325. message ForwardingRuleInfo {
  326. // Name of a Compute Engine forwarding rule.
  327. string display_name = 1;
  328. // URI of a Compute Engine forwarding rule.
  329. string uri = 2;
  330. // Protocol defined in the forwarding rule that matches the test.
  331. string matched_protocol = 3;
  332. // Port range defined in the forwarding rule that matches the test.
  333. string matched_port_range = 6;
  334. // VIP of the forwarding rule.
  335. string vip = 4;
  336. // Target type of the forwarding rule.
  337. string target = 5;
  338. // Network URI. Only valid for Internal Load Balancer.
  339. string network_uri = 7;
  340. }
  341. // For display only. Metadata associated with a load balancer.
  342. message LoadBalancerInfo {
  343. // The type definition for a load balancer:
  344. enum LoadBalancerType {
  345. // Type is unspecified.
  346. LOAD_BALANCER_TYPE_UNSPECIFIED = 0;
  347. // Internal TCP/UDP load balancer.
  348. INTERNAL_TCP_UDP = 1;
  349. // Network TCP/UDP load balancer.
  350. NETWORK_TCP_UDP = 2;
  351. // HTTP(S) proxy load balancer.
  352. HTTP_PROXY = 3;
  353. // TCP proxy load balancer.
  354. TCP_PROXY = 4;
  355. // SSL proxy load balancer.
  356. SSL_PROXY = 5;
  357. }
  358. // The type definition for a load balancer backend configuration:
  359. enum BackendType {
  360. // Type is unspecified.
  361. BACKEND_TYPE_UNSPECIFIED = 0;
  362. // Backend Service as the load balancer's backend.
  363. BACKEND_SERVICE = 1;
  364. // Target Pool as the load balancer's backend.
  365. TARGET_POOL = 2;
  366. }
  367. // Type of the load balancer.
  368. LoadBalancerType load_balancer_type = 1;
  369. // URI of the health check for the load balancer.
  370. string health_check_uri = 2;
  371. // Information for the loadbalancer backends.
  372. repeated LoadBalancerBackend backends = 3;
  373. // Type of load balancer's backend configuration.
  374. BackendType backend_type = 4;
  375. // Backend configuration URI.
  376. string backend_uri = 5;
  377. }
  378. // For display only. Metadata associated with a specific load balancer backend.
  379. message LoadBalancerBackend {
  380. // State of a health check firewall configuration:
  381. enum HealthCheckFirewallState {
  382. // State is unspecified. Default state if not populated.
  383. HEALTH_CHECK_FIREWALL_STATE_UNSPECIFIED = 0;
  384. // There are configured firewall rules to allow health check probes to the
  385. // backend.
  386. CONFIGURED = 1;
  387. // There are firewall rules configured to allow partial health check ranges
  388. // or block all health check ranges.
  389. // If a health check probe is sent from denied IP ranges,
  390. // the health check to the backend will fail. Then, the backend will be
  391. // marked unhealthy and will not receive traffic sent to the load balancer.
  392. MISCONFIGURED = 2;
  393. }
  394. // Name of a Compute Engine instance or network endpoint.
  395. string display_name = 1;
  396. // URI of a Compute Engine instance or network endpoint.
  397. string uri = 2;
  398. // State of the health check firewall configuration.
  399. HealthCheckFirewallState health_check_firewall_state = 3;
  400. // A list of firewall rule URIs allowing probes from health check IP ranges.
  401. repeated string health_check_allowing_firewall_rules = 4;
  402. // A list of firewall rule URIs blocking probes from health check IP ranges.
  403. repeated string health_check_blocking_firewall_rules = 5;
  404. }
  405. // For display only. Metadata associated with a Compute Engine VPN gateway.
  406. message VpnGatewayInfo {
  407. // Name of a VPN gateway.
  408. string display_name = 1;
  409. // URI of a VPN gateway.
  410. string uri = 2;
  411. // URI of a Compute Engine network where the VPN gateway is configured.
  412. string network_uri = 3;
  413. // IP address of the VPN gateway.
  414. string ip_address = 4;
  415. // A VPN tunnel that is associated with this VPN gateway.
  416. // There may be multiple VPN tunnels configured on a VPN gateway, and only
  417. // the one relevant to the test is displayed.
  418. string vpn_tunnel_uri = 5;
  419. // Name of a Google Cloud region where this VPN gateway is configured.
  420. string region = 6;
  421. }
  422. // For display only. Metadata associated with a Compute Engine VPN tunnel.
  423. message VpnTunnelInfo {
  424. // Types of VPN routing policy. For details, refer to [Networks and Tunnel
  425. // routing](https://cloud.google.com/network-connectivity/docs/vpn/concepts/choosing-networks-routing/).
  426. enum RoutingType {
  427. // Unspecified type. Default value.
  428. ROUTING_TYPE_UNSPECIFIED = 0;
  429. // Route based VPN.
  430. ROUTE_BASED = 1;
  431. // Policy based routing.
  432. POLICY_BASED = 2;
  433. // Dynamic (BGP) routing.
  434. DYNAMIC = 3;
  435. }
  436. // Name of a VPN tunnel.
  437. string display_name = 1;
  438. // URI of a VPN tunnel.
  439. string uri = 2;
  440. // URI of the VPN gateway at local end of the tunnel.
  441. string source_gateway = 3;
  442. // URI of a VPN gateway at remote end of the tunnel.
  443. string remote_gateway = 4;
  444. // Remote VPN gateway's IP address.
  445. string remote_gateway_ip = 5;
  446. // Local VPN gateway's IP address.
  447. string source_gateway_ip = 6;
  448. // URI of a Compute Engine network where the VPN tunnel is configured.
  449. string network_uri = 7;
  450. // Name of a Google Cloud region where this VPN tunnel is configured.
  451. string region = 8;
  452. // Type of the routing policy.
  453. RoutingType routing_type = 9;
  454. }
  455. // For display only. The specification of the endpoints for the test.
  456. // EndpointInfo is derived from source and destination Endpoint and validated
  457. // by the backend data plane model.
  458. message EndpointInfo {
  459. // Source IP address.
  460. string source_ip = 1;
  461. // Destination IP address.
  462. string destination_ip = 2;
  463. // IP protocol in string format, for example: "TCP", "UDP", "ICMP".
  464. string protocol = 3;
  465. // Source port. Only valid when protocol is TCP or UDP.
  466. int32 source_port = 4;
  467. // Destination port. Only valid when protocol is TCP or UDP.
  468. int32 destination_port = 5;
  469. // URI of the network where this packet originates from.
  470. string source_network_uri = 6;
  471. // URI of the network where this packet is sent to.
  472. string destination_network_uri = 7;
  473. // URI of the source telemetry agent this packet originates from.
  474. string source_agent_uri = 8;
  475. }
  476. // Details of the final state "deliver" and associated resource.
  477. message DeliverInfo {
  478. // Deliver target types:
  479. enum Target {
  480. // Target not specified.
  481. TARGET_UNSPECIFIED = 0;
  482. // Target is a Compute Engine instance.
  483. INSTANCE = 1;
  484. // Target is the internet.
  485. INTERNET = 2;
  486. // Target is a Google API.
  487. GOOGLE_API = 3;
  488. // Target is a Google Kubernetes Engine cluster master.
  489. GKE_MASTER = 4;
  490. // Target is a Cloud SQL instance.
  491. CLOUD_SQL_INSTANCE = 5;
  492. // Target is a published service using [Private Service
  493. // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-services).
  494. PSC_PUBLISHED_SERVICE = 6;
  495. // Target is all Google APIs using [Private Service
  496. // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
  497. PSC_GOOGLE_API = 7;
  498. // Target is VPC-SC using [Private Service
  499. // Connect](https://cloud.google.com/vpc/docs/configure-private-service-connect-apis).
  500. PSC_VPC_SC = 8;
  501. }
  502. // Target type where the packet is delivered to.
  503. Target target = 1;
  504. // URI of the resource that the packet is delivered to.
  505. string resource_uri = 2;
  506. }
  507. // Details of the final state "forward" and associated resource.
  508. message ForwardInfo {
  509. // Forward target types.
  510. enum Target {
  511. // Target not specified.
  512. TARGET_UNSPECIFIED = 0;
  513. // Forwarded to a VPC peering network.
  514. PEERING_VPC = 1;
  515. // Forwarded to a Cloud VPN gateway.
  516. VPN_GATEWAY = 2;
  517. // Forwarded to a Cloud Interconnect connection.
  518. INTERCONNECT = 3;
  519. // Forwarded to a Google Kubernetes Engine Container cluster master.
  520. GKE_MASTER = 4;
  521. // Forwarded to the next hop of a custom route imported from a peering VPC.
  522. IMPORTED_CUSTOM_ROUTE_NEXT_HOP = 5;
  523. // Forwarded to a Cloud SQL instance.
  524. CLOUD_SQL_INSTANCE = 6;
  525. }
  526. // Target type where this packet is forwarded to.
  527. Target target = 1;
  528. // URI of the resource that the packet is forwarded to.
  529. string resource_uri = 2;
  530. }
  531. // Details of the final state "abort" and associated resource.
  532. message AbortInfo {
  533. // Abort cause types:
  534. enum Cause {
  535. // Cause is unspecified.
  536. CAUSE_UNSPECIFIED = 0;
  537. // Aborted due to unknown network.
  538. // The reachability analysis cannot proceed because the user does not have
  539. // access to the host project's network configurations, including firewall
  540. // rules and routes. This happens when the project is a service project and
  541. // the endpoints being traced are in the host project's network.
  542. UNKNOWN_NETWORK = 1;
  543. // Aborted because the IP address(es) are unknown.
  544. UNKNOWN_IP = 2;
  545. // Aborted because no project information can be derived from the test
  546. // input.
  547. UNKNOWN_PROJECT = 3;
  548. // Aborted because the user lacks the permission to access all or part of
  549. // the network configurations required to run the test.
  550. PERMISSION_DENIED = 4;
  551. // Aborted because no valid source endpoint is derived from the input test
  552. // request.
  553. NO_SOURCE_LOCATION = 5;
  554. // Aborted because the source and/or destination endpoint specified in
  555. // the test are invalid. The possible reasons that an endpoint is
  556. // invalid include: malformed IP address; nonexistent instance or
  557. // network URI; IP address not in the range of specified network URI; and
  558. // instance not owning the network interface in the specified network.
  559. INVALID_ARGUMENT = 6;
  560. // Aborted because traffic is sent from a public IP to an instance without
  561. // an external IP.
  562. NO_EXTERNAL_IP = 7;
  563. // Aborted because none of the traces matches destination information
  564. // specified in the input test request.
  565. UNINTENDED_DESTINATION = 8;
  566. // Aborted because the number of steps in the trace exceeding a certain
  567. // limit which may be caused by routing loop.
  568. TRACE_TOO_LONG = 9;
  569. // Aborted due to internal server error.
  570. INTERNAL_ERROR = 10;
  571. // Aborted because the source endpoint could not be found.
  572. SOURCE_ENDPOINT_NOT_FOUND = 11;
  573. // Aborted because the source network does not match the source endpoint.
  574. MISMATCHED_SOURCE_NETWORK = 12;
  575. // Aborted because the destination endpoint could not be found.
  576. DESTINATION_ENDPOINT_NOT_FOUND = 13;
  577. // Aborted because the destination network does not match the destination
  578. // endpoint.
  579. MISMATCHED_DESTINATION_NETWORK = 14;
  580. // Aborted because the test scenario is not supported.
  581. UNSUPPORTED = 15;
  582. }
  583. // Causes that the analysis is aborted.
  584. Cause cause = 1;
  585. // URI of the resource that caused the abort.
  586. string resource_uri = 2;
  587. // List of project IDs that the user has specified in the request but does
  588. // not have permission to access network configs. Analysis is aborted in this
  589. // case with the PERMISSION_DENIED cause.
  590. repeated string projects_missing_permission = 3;
  591. }
  592. // Details of the final state "drop" and associated resource.
  593. message DropInfo {
  594. // Drop cause types:
  595. enum Cause {
  596. // Cause is unspecified.
  597. CAUSE_UNSPECIFIED = 0;
  598. // Destination external address cannot be resolved to a known target. If
  599. // the address is used in a Google Cloud project, provide the project ID
  600. // as test input.
  601. UNKNOWN_EXTERNAL_ADDRESS = 1;
  602. // A Compute Engine instance can only send or receive a packet with a
  603. // foreign IP address if ip_forward is enabled.
  604. FOREIGN_IP_DISALLOWED = 2;
  605. // Dropped due to a firewall rule, unless allowed due to connection
  606. // tracking.
  607. FIREWALL_RULE = 3;
  608. // Dropped due to no routes.
  609. NO_ROUTE = 4;
  610. // Dropped due to invalid route. Route's next hop is a blackhole.
  611. ROUTE_BLACKHOLE = 5;
  612. // Packet is sent to a wrong (unintended) network. Example: you trace a
  613. // packet from VM1:Network1 to VM2:Network2, however, the route configured
  614. // in Network1 sends the packet destined for VM2's IP addresss to Network3.
  615. ROUTE_WRONG_NETWORK = 6;
  616. // Packet with internal destination address sent to the internet gateway.
  617. PRIVATE_TRAFFIC_TO_INTERNET = 7;
  618. // Instance with only an internal IP address tries to access Google API and
  619. // services, but private Google access is not enabled.
  620. PRIVATE_GOOGLE_ACCESS_DISALLOWED = 8;
  621. // Instance with only an internal IP address tries to access external hosts,
  622. // but Cloud NAT is not enabled in the subnet, unless special configurations
  623. // on a VM allow this connection.
  624. NO_EXTERNAL_ADDRESS = 9;
  625. // Destination internal address cannot be resolved to a known target. If
  626. // this is a shared VPC scenario, verify if the service project ID is
  627. // provided as test input. Otherwise, verify if the IP address is being
  628. // used in the project.
  629. UNKNOWN_INTERNAL_ADDRESS = 10;
  630. // Forwarding rule's protocol and ports do not match the packet header.
  631. FORWARDING_RULE_MISMATCH = 11;
  632. // Forwarding rule does not have backends configured.
  633. FORWARDING_RULE_NO_INSTANCES = 12;
  634. // Firewalls block the health check probes to the backends and cause
  635. // the backends to be unavailable for traffic from the load balancer.
  636. // For more details, see [Health check firewall
  637. // rules](https://cloud.google.com/load-balancing/docs/health-checks#firewall_rules).
  638. FIREWALL_BLOCKING_LOAD_BALANCER_BACKEND_HEALTH_CHECK = 13;
  639. // Packet is sent from or to a Compute Engine instance that is not in a
  640. // running state.
  641. INSTANCE_NOT_RUNNING = 14;
  642. // The type of traffic is blocked and the user cannot configure a firewall
  643. // rule to enable it. See [Always blocked
  644. // traffic](https://cloud.google.com/vpc/docs/firewalls#blockedtraffic) for
  645. // more details.
  646. TRAFFIC_TYPE_BLOCKED = 15;
  647. // Access to Google Kubernetes Engine cluster master's endpoint is not
  648. // authorized. See [Access to the cluster
  649. // endpoints](https://cloud.google.com/kubernetes-engine/docs/how-to/private-clusters#access_to_the_cluster_endpoints)
  650. // for more details.
  651. GKE_MASTER_UNAUTHORIZED_ACCESS = 16;
  652. // Access to the Cloud SQL instance endpoint is not authorized.
  653. // See [Authorizing with authorized
  654. // networks](https://cloud.google.com/sql/docs/mysql/authorize-networks) for
  655. // more details.
  656. CLOUD_SQL_INSTANCE_UNAUTHORIZED_ACCESS = 17;
  657. // Packet was dropped inside Google Kubernetes Engine Service.
  658. DROPPED_INSIDE_GKE_SERVICE = 18;
  659. // Packet was dropped inside Cloud SQL Service.
  660. DROPPED_INSIDE_CLOUD_SQL_SERVICE = 19;
  661. // Packet was dropped because there is no peering between the originating
  662. // network and the Google Managed Services Network.
  663. GOOGLE_MANAGED_SERVICE_NO_PEERING = 20;
  664. // Packet was dropped because the Cloud SQL instance has neither a private
  665. // nor a public IP address.
  666. CLOUD_SQL_INSTANCE_NO_IP_ADDRESS = 21;
  667. // Packet could be dropped because the Cloud function is not in an active
  668. // status.
  669. CLOUD_FUNCTION_NOT_ACTIVE = 22;
  670. // Packet could be dropped because no VPC connector is set.
  671. VPC_CONNECTOR_NOT_SET = 23;
  672. // Packet could be dropped because the VPC connector is not in a running
  673. // state.
  674. VPC_CONNECTOR_NOT_RUNNING = 24;
  675. // Packet could be dropped because it was sent from a different region
  676. // to a regional forwarding without global access.
  677. FORWARDING_RULE_REGION_MISMATCH = 25;
  678. // Privte Service Connect (PSC) connection is not in accepted state.
  679. PSC_CONNECTION_NOT_ACCEPTED = 26;
  680. }
  681. // Cause that the packet is dropped.
  682. Cause cause = 1;
  683. // URI of the resource that caused the drop.
  684. string resource_uri = 2;
  685. }
  686. // For display only. Metadata associated with a Google Kubernetes Engine (GKE)
  687. // cluster master.
  688. message GKEMasterInfo {
  689. // URI of a GKE cluster.
  690. string cluster_uri = 2;
  691. // URI of a GKE cluster network.
  692. string cluster_network_uri = 4;
  693. // Internal IP address of a GKE cluster master.
  694. string internal_ip = 5;
  695. // External IP address of a GKE cluster master.
  696. string external_ip = 6;
  697. }
  698. // For display only. Metadata associated with a Cloud SQL instance.
  699. message CloudSQLInstanceInfo {
  700. // Name of a Cloud SQL instance.
  701. string display_name = 1;
  702. // URI of a Cloud SQL instance.
  703. string uri = 2;
  704. // URI of a Cloud SQL instance network or empty string if the instance does
  705. // not have one.
  706. string network_uri = 4;
  707. // Internal IP address of a Cloud SQL instance.
  708. string internal_ip = 5;
  709. // External IP address of a Cloud SQL instance.
  710. string external_ip = 6;
  711. // Region in which the Cloud SQL instance is running.
  712. string region = 7;
  713. }
  714. // For display only. Metadata associated with a Cloud function.
  715. message CloudFunctionInfo {
  716. // Name of a Cloud function.
  717. string display_name = 1;
  718. // URI of a Cloud function.
  719. string uri = 2;
  720. // Location in which the Cloud function is deployed.
  721. string location = 3;
  722. // Latest successfully deployed version id of the Cloud function.
  723. int64 version_id = 4;
  724. }
  725. // For display only. Metadata associated with a VPC connector.
  726. message VpcConnectorInfo {
  727. // Name of a VPC connector.
  728. string display_name = 1;
  729. // URI of a VPC connector.
  730. string uri = 2;
  731. // Location in which the VPC connector is deployed.
  732. string location = 3;
  733. }