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
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
Click to show internal directories.
Click to hide internal directories.