From 31cc021924c6388b85723dfb4a7d7ec0d3c8716a Mon Sep 17 00:00:00 2001 From: Joe VLcek Date: Fri, 8 Sep 2017 14:44:34 -0400 Subject: [PATCH] [FINE] Do not downcase the amazon IAM username (manually picked from https://github.com/ManageIQ/manageiq-providers-amazon/commit/3a2408b4cee5e32b22dc67a1db6c96aac912c318) The code has been refactored on the master branch. It has been moved to the https://github.com/ManageIQ/manageiq-providers-amazon repository. The master PR for this change is: https://github.com/ManageIQ/manageiq-providers-amazon/pull/296 This commit addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1489596 --- app/models/authenticator/amazon.rb | 4 ++++ spec/models/authenticator/amazon_spec.rb | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/models/authenticator/amazon.rb b/app/models/authenticator/amazon.rb index c8eaab4366a..5b2bf556339 100644 --- a/app/models/authenticator/amazon.rb +++ b/app/models/authenticator/amazon.rb @@ -133,5 +133,9 @@ def aws_connect(access_key_id, secret_access_key, service = :IAM, proxy_uri = ni :log_formatter => Aws::Log::Formatter.new(Aws::Log::Formatter.default.pattern.chomp) ) end + + def normalize_username(username) + username + end end end diff --git a/spec/models/authenticator/amazon_spec.rb b/spec/models/authenticator/amazon_spec.rb index 9c23cfe49eb..4033d86234c 100644 --- a/spec/models/authenticator/amazon_spec.rb +++ b/spec/models/authenticator/amazon_spec.rb @@ -1,8 +1,8 @@ require 'aws-sdk' describe Authenticator::Amazon do - AWS_ROOT_USER_KEY = 'aws_root_key' - AWS_IAM_USER_KEY = 'aws_iam_key' + AWS_ROOT_USER_KEY = 'aws_root_key'.freeze + AWS_IAM_USER_KEY = 'AWS_IAM_KEY'.freeze subject { Authenticator::Amazon.new(config) }