lib/awskeyring/validate.rb in awskeyring-1.3.2 vs lib/awskeyring/validate.rb in awskeyring-1.3.3
- old
+ new
@@ -34,11 +34,11 @@
# Validate an Users mfa ARN
#
# @param [String] mfa_arn The users MFA arn
def self.mfa_arn(mfa_arn)
- raise 'Invalid MFA ARN' unless %r(\Aarn:aws:iam::[0-9]{12}:mfa\/\S*\z).match?(mfa_arn)
+ raise 'Invalid MFA ARN' unless %r(\Aarn:aws:iam::[0-9]{12}:mfa/\S*\z).match?(mfa_arn)
mfa_arn
end
# Validate a Role name
@@ -52,10 +52,10 @@
# Validate a Role ARN
#
# @param [String] role_arn The role arn
def self.role_arn(role_arn)
- raise 'Invalid Role ARN' unless %r(\Aarn:aws:iam::[0-9]{12}:role\/\S*\z).match?(role_arn)
+ raise 'Invalid Role ARN' unless %r(\Aarn:aws:iam::[0-9]{12}:role/\S*\z).match?(role_arn)
role_arn
end
# Validate an MFA CODE