providers

package
v2.4.6 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KubeconfigDefaultPath = ".kube/config"
)
View Source
const StratusUserAgent = "stratus-red-team"

Variables

View Source
var DefaultClientOptions = arm.ClientOptions{
	ClientOptions: azcore.ClientOptions{
		Telemetry: policy.TelemetryOptions{ApplicationID: UniqueExecutionId.String(), Disabled: false},
	},
}
View Source
var UniqueExecutionId = uuid.New()

Functions

func GetKubeConfigPath

func GetKubeConfigPath() string

GetKubeConfigPath returns the path of the kubeconfig, with the following priority: 1. KUBECONFIG environment variable 2. $HOME/.kube/config

func GetStratusUserAgent

func GetStratusUserAgent() string

Types

type AWSProvider

type AWSProvider struct {
	UniqueCorrelationId uuid.UUID // unique value injected in the user-agent, to differentiate Stratus Red Team executions
	// contains filtered or unexported fields
}

func AWS

func AWS() *AWSProvider

func (*AWSProvider) GetConnection

func (m *AWSProvider) GetConnection() aws.Config

func (*AWSProvider) IsAuthenticatedAgainstAWS

func (m *AWSProvider) IsAuthenticatedAgainstAWS() bool

type AzureProvider

type AzureProvider struct {
	Credentials         *azidentity.DefaultAzureCredential
	ClientOptions       *arm.ClientOptions
	SubscriptionID      string
	UniqueCorrelationId uuid.UUID // unique value injected in the user-agent, to differentiate Stratus Red Team executions
}

func Azure

func Azure() *AzureProvider

func (*AzureProvider) GetCredentials

func (m *AzureProvider) GetCredentials() *azidentity.DefaultAzureCredential

func (*AzureProvider) IsAuthenticatedAgainstAzure

func (m *AzureProvider) IsAuthenticatedAgainstAzure() bool

type GcpProvider added in v2.3.0

type GcpProvider struct {
	UniqueCorrelationId uuid.UUID
	ProjectId           string
}

func GCP added in v2.3.0

func GCP() *GcpProvider

func (*GcpProvider) GetProjectId added in v2.3.0

func (m *GcpProvider) GetProjectId() string

func (*GcpProvider) IsAuthenticated added in v2.3.0

func (m *GcpProvider) IsAuthenticated() bool

func (*GcpProvider) Options added in v2.3.0

func (m *GcpProvider) Options() option.ClientOption

type K8sProvider

type K8sProvider struct {
	RestConfig          *rest.Config
	UniqueCorrelationId uuid.UUID // unique value injected in the user-agent, to differentiate Stratus Red Team executions
	// contains filtered or unexported fields
}

func K8s

func K8s() *K8sProvider

func (*K8sProvider) GetClient

func (m *K8sProvider) GetClient() *kubernetes.Clientset

GetClient is used to authenticate with Kubernetes and build the client from a kubeconfig

func (*K8sProvider) GetRestConfig

func (m *K8sProvider) GetRestConfig() *rest.Config

func (*K8sProvider) IsAuthenticated

func (m *K8sProvider) IsAuthenticated() bool

Jump to

Keyboard shortcuts

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