config

package
v0.0.0-...-e3b4d4c Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CIS_K8S       = "cis_k8s"
	CIS_EKS       = "cis_eks"
	CIS_AWS       = "cis_aws"
	CIS_GCP       = "cis_gcp"
	CIS_AZURE     = "cis_azure"
	ProviderAWS   = "aws"
	ProviderAzure = "azure"
	ProviderGCP   = "gcp"
)

https://github.com/elastic/integrations/tree/main/packages/cloud_security_posture/data_stream/findings/agent/stream

View Source
const (
	DefaultNamespace   = "default"
	VulnerabilityType  = "vuln_mgmt"
	AssetInventoryType = "asset_inventory"
)
View Source
const (
	AzureClientCredentialsTypeARMTemplate     = "arm_template"
	AzureClientCredentialsTypeManagedIdentity = "managed_identity"
	AzureClientCredentialsTypeManual          = "manual"
	AzureClientCredentialsTypeSecret          = "service_principal_with_client_secret"
	AzureClientCredentialsTypeCertificate     = "service_principal_with_client_certificate"
	AzureClientCredentialsTypeCloudConnectors = "cloud_connectors"
)
View Source
const (
	SingleAccount       = "single-account"
	OrganizationAccount = "organization-account"
)
View Source
const (
	CloudConnectorsLocalRoleEnvVar  = "CLOUD_CONNECTORS_LOCAL_ROLE"
	CloudConnectorsGlobalRoleEnvVar = "CLOUD_CONNECTORS_GLOBAL_ROLE"
	CloudResourceIDEnvVar           = "CLOUD_RESOURCE_ID"
	CloudConnectorsJWTPathEnvVar    = "CLOUD_CONNECTORS_ID_TOKEN_FILE"
)
View Source
const (
	CloudbeatGCPListAssetPageSizeEnvVar = "CLOUDBEAT_GCP_LIST_ASSETS_PAGE_SIZE"
	CloudbeatGCPListAssetTimeoutEnvVar  = "CLOUDBEAT_GCP_LIST_ASSETS_TIMEOUT"
)

Variables

Functions

This section is empty.

Types

type AwsConfig

type AwsConfig struct {
	Cred                  aws.ConfigAWS `config:"credentials"`
	AccountType           string        `config:"account_type"`
	CloudConnectors       bool          `config:"supports_cloud_connectors"`
	CloudConnectorsConfig CloudConnectorsConfig
}

type AzureClientOpt

type AzureClientOpt struct {
	ClientCredentialsType     string `config:"type"`
	ClientID                  string `config:"client_id"`
	TenantID                  string `config:"tenant_id"`
	ClientSecret              string `config:"client_secret"`
	ClientUsername            string `config:"client_username"`
	ClientPassword            string `config:"client_password"`
	ClientCertificatePath     string `config:"client_certificate_path"`
	ClientCertificatePassword string `config:"client_certificate_password"`
}

type AzureConfig

type AzureConfig struct {
	Credentials AzureClientOpt `config:"credentials"`
	// SingleAccount or OrganizationAccount
	AccountType string `config:"account_type"`
}

type CloudConfig

type CloudConfig struct {
	Aws   AwsConfig   `config:"aws"`
	Gcp   GcpConfig   `config:"gcp"`
	Azure AzureConfig `config:"azure"`
}

type CloudConnectorsConfig

type CloudConnectorsConfig struct {
	LocalRoleARN  string
	GlobalRoleARN string
	ResourceID    string
}

type Config

type Config struct {
	Benchmark              string                  `config:"config.v1.benchmark"`
	Type                   string                  `config:"config.v1.type"`
	Deployment             string                  `config:"config.v1.deployment"`
	AssetInventoryProvider string                  `config:"config.v1.asset_inventory_provider"`
	CloudConfig            CloudConfig             `config:"config.v1"`
	KubeConfig             string                  `config:"kube_config"`
	Period                 time.Duration           `config:"period"`
	Processors             processors.PluginConfig `config:"processors"`
	BundlePath             string                  `config:"bundle_path"`
	PackagePolicyId        string                  `config:"package_policy_id"`
	PackagePolicyRevision  int                     `config:"revision"`
	Index                  string                  `config:"index"`
}

func New

func New(cfg *config.C) (*Config, error)

func (*Config) Datastream

func (c *Config) Datastream() string

Datastream returns the name of a Data Stream to publish Cloudbeat events to.

func (*Config) DatastreamNamespace

func (c *Config) DatastreamNamespace() string

DatastreamNamespace returns the inferred namespace setting from the Agent Policy

type Fetcher

type Fetcher struct {
	Name string `config:"name"` // Name of the fetcher
}

type GcpCallOpt

type GcpCallOpt struct {
	ListAssetsTimeout  time.Duration `config:"list_assets_timeout"`
	ListAssetsPageSize int32         `config:"list_assets_page_size"`
}

type GcpClientOpt

type GcpClientOpt struct {
	CredentialsJSON     string `config:"credentials_json"`
	CredentialsFilePath string `config:"credentials_file_path"`
}

type GcpConfig

type GcpConfig struct {
	// empty for OrganizationAccount
	ProjectId string `config:"project_id"`

	// empty for SingleAccount
	OrganizationId string `config:"organization_id"`

	// SingleAccount or OrganizationAccount
	AccountType string `config:"account_type"`

	GcpCallOpt GcpCallOpt `config:"call_options"`

	GcpClientOpt `config:"credentials"`
}

Jump to

Keyboard shortcuts

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