extnat

package
v1.0.50 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 30, 2026 License: MIT Imports: 21 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	TargetIDCloudNat             = "com.steadybit.extension_gcp.cloud-nat"
	CloudNatDisassociateActionId = "com.steadybit.extension_gcp.cloud-nat.disassociate-subnets"
)

Variables

This section is empty.

Functions

func NewNatDiscovery

func NewNatDiscovery() discovery_kit_sdk.TargetDiscovery

Types

type CloudNatDisassociateState

type CloudNatDisassociateState struct {
	ProjectID   string
	Region      string
	RouterName  string
	NatName     string
	NatSnapshot []byte // proto.Marshal of the original computepb.RouterNat
	// SourceMode is the NAT's sourceSubnetworkIpRangesToNat mode, captured for
	// human-readable Prepare/Start/Stop messages. Set to the literal string
	// GCP returned (e.g. LIST_OF_SUBNETWORKS, ALL_SUBNETWORKS_ALL_IP_RANGES).
	SourceMode string
	// SubnetCount is only meaningful when SourceMode is LIST_OF_SUBNETWORKS —
	// the other modes NAT every subnet in the region without populating an
	// explicit list, so this field stays 0 there.
	SubnetCount int
}

CloudNatDisassociateState captures the entire original NAT proto so the attack can restore it byte-identically on stop. We serialise via proto.Marshal (base64 in JSON) rather than snapshotting individual fields because a LIST_OF_SUBNETWORKS NAT can't survive an empty subnetworks list — the only way to disassociate a NAT from all its subnetworks in GCP is to remove the NAT entry from the router entirely, then re-add it.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL