providers

package
v2.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

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

Variables

This section is empty.

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 GetStratusUserAgentForUUID added in v2.5.0

func GetStratusUserAgentForUUID(uuid uuid.UUID) 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 NewAWSProvider added in v2.5.0

func NewAWSProvider(uuid uuid.UUID) *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 NewAzureProvider added in v2.5.0

func NewAzureProvider(uuid uuid.UUID) *AzureProvider

func (*AzureProvider) GetCredentials

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

func (*AzureProvider) IsAuthenticatedAgainstAzure

func (m *AzureProvider) IsAuthenticatedAgainstAzure() bool

type GCPProvider added in v2.5.0

type GCPProvider struct {
	UniqueCorrelationId uuid.UUID
	ProjectId           string
}

func NewGCPProvider added in v2.5.0

func NewGCPProvider(uuid uuid.UUID) *GCPProvider

func (*GCPProvider) GetProjectId added in v2.5.0

func (m *GCPProvider) GetProjectId() string

func (*GCPProvider) IsAuthenticated added in v2.5.0

func (m *GCPProvider) IsAuthenticated() bool

func (*GCPProvider) Options added in v2.5.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 NewK8sProvider added in v2.5.0

func NewK8sProvider(uuid uuid.UUID) *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