config

package
v0.0.0-...-56579fc Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2024 License: Apache-2.0 Imports: 8 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"
	AzureClientCredentialsTypeUsernamePassword = "service_principal_with_client_username_and_password"
)
View Source
const (
	SingleAccount       = "single-account"
	OrganizationAccount = "organization-account"
)

Variables

Functions

This section is empty.

Types

type AwsConfig

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

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 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.

type Fetcher

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

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"`

	GcpClientOpt `config:"credentials"`
}

Jump to

Keyboard shortcuts

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