sts

package
v1.19.1-0...-4baae3d Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	ClusterCloudCredentialName  = "cluster"
	RoleArnParameterName        = "sts-role-arn"
	RoleSessionName             = "Red-Hat-cloud-resources-operator"
	CredsSecretName             = "sts-credentials"
	CredsSecretRoleARNKeyName   = "role_arn"
	CredsSecretTokenPathKeyName = "web_identity_token_file"
	CredsRoleEnvKey             = "ROLE_ARN"
	CredsTokenPathEnvKey        = "TOKEN_PATH"
	CredsS3AccessKeyId          = "s3-access-key-id"
	CredsS3SecretAccessKey      = "s3-secret-access-key"
)

#nosec G101 -- This is a false positive

Variables

This section is empty.

Functions

func CreateSTSARNSecret

func CreateSTSARNSecret(ctx context.Context, client k8sclient.Client, installationNamespace, operatorNamespace string) (integreatlyv1alpha1.StatusPhase, error)

CreateSTSARNSecret create the STS arn secret - should be already validated in preflight checks

func GetSTSCredentials

func GetSTSCredentials(ctx context.Context, client k8sclient.Client, namespace string) (string, string, error)

GetSTSCredentials retrieves the STS secret used by CRO

func GetSTSCredentialsFromEnvVar

func GetSTSCredentialsFromEnvVar() (string, string, error)

GetSTSCredentialsFromEnvVar Gets the role arn and token file path from environment variable Should only be used in functional test container

func GetSTSRoleARN

func GetSTSRoleARN(ctx context.Context, client k8sclient.Client, namespace string) (string, error)

GetSTSRoleARN retrieves the role ARN addon parameter to be used by CRO

func IsClusterSTS

func IsClusterSTS(ctx context.Context, client k8sclient.Client, log logger.Logger) (bool, error)

func ValidateAddOnStsRoleArnParameterPattern

func ValidateAddOnStsRoleArnParameterPattern(client k8sclient.Client, namespace string) (bool, error)

ValidateAddOnStsRoleArnParameterPattern is checking if STS addon parameter Pattern is valid Parameter is Valid only in case: 1. Parameter exists and value matching AWS Role ARN pattern Parameter is Not valid in other cases: 2. parameter exists and value is NOT matching AWS Role ARN pattern 3. parameter exists and value is empty 4. parameter does not exist

Types

This section is empty.

Jump to

Keyboard shortcuts

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