From a541dfcb2a2a743f721d4da694ca20a9b0d02a56 Mon Sep 17 00:00:00 2001 From: Himani Anil Deshpande Date: Fri, 23 May 2025 22:23:35 -0400 Subject: [PATCH] [Bug] Use DomainReadOnlyUser from the input provided in config * Making the function case-sensitive and strickter as `cn` can be part of user-name too --- .../libraries/directory_service_utils.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cookbooks/aws-parallelcluster-environment/libraries/directory_service_utils.rb b/cookbooks/aws-parallelcluster-environment/libraries/directory_service_utils.rb index c24e30757c..d8f823446d 100644 --- a/cookbooks/aws-parallelcluster-environment/libraries/directory_service_utils.rb +++ b/cookbooks/aws-parallelcluster-environment/libraries/directory_service_utils.rb @@ -21,7 +21,7 @@ def parse_arn(arn_string) def _get_cn_subparam(param) tokens = param.split(",") unless param.blank? tokens.each do |token| - return token if token.include? "cn" + return token if token.downcase.start_with? "cn" end "" end