-
Bug
-
Resolution: Done
-
Major
-
Logging 5.5.0
-
False
-
None
-
False
-
NEW
-
OBSDA-59 - CloudWatch log forwarding add-on needs to support STS installations
-
VERIFIED
-
Log Collection - Sprint 221
when the partition is not aws, the role_arn validation failed
https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
role_arn: arn:aws-us-gov:iam::225746144451:role/anli-sts-25690-openshift-logging-cloudwatch-credentials
"status": {
"conditions": [
],
"outputs": {
"cloudwatch": [
]
}
$// ParseRoleArn search for matching valid arn within the 'role_arn' key
func ParseRoleArn(secret *corev1.Secret) string {
roleArnString := security.GetFromSecret(secret, constants.AWSWebIdentityRoleKey)
if roleArnString != "" {
reg := regexp.MustCompile(`(arn:aws:(iam|sts)::\d
:role\/\S+)\s?`)
roleArn := reg.FindStringSubmatch(roleArnString)
if roleArn != nil
}
return ""
}