diff --git a/insights/specs/datasources/aws.py b/insights/specs/datasources/aws.py index 77c8436883..4aafb8d0c2 100644 --- a/insights/specs/datasources/aws.py +++ b/insights/specs/datasources/aws.py @@ -9,8 +9,7 @@ from insights.specs import Specs _aws_imdsv2_token_invalid_keyworks = [ - 'Warning: ', - 'curlrc: ' + 'warning: ', ] @@ -42,7 +41,8 @@ def aws_imdsv2_token(broker): _token = broker[LocalSpecs.aws_imdsv2_token].content[0].strip() if _token: token = str(_token) - if token and not any(k in token for k in _aws_imdsv2_token_invalid_keyworks): + token_lower = token.lower() + if token and not any(k in token_lower for k in _aws_imdsv2_token_invalid_keyworks): return token except Exception as e: raise SkipComponent("Unexpected exception:{e}".format(e=str(e)))