diff --git a/lib/fog/aws.rb b/lib/fog/aws.rb index b164a5355..520a6c0cc 100644 --- a/lib/fog/aws.rb +++ b/lib/fog/aws.rb @@ -224,7 +224,12 @@ module Fog def self.volume_id "vol-#{Fog::Mock.random_hex(8)}" end - + + def self.key_id(length=21) + #Probably close enough + Fog::Mock.random_selection('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789',length) + end + def self.rds_address(db_name,region) "#{db_name}.#{Fog::Mock.random_letters(rand(12) + 4)}.#{region}.rds.amazonaws.com" end diff --git a/lib/fog/aws/iam.rb b/lib/fog/aws/iam.rb index d93d16c0f..95bd1407c 100644 --- a/lib/fog/aws/iam.rb +++ b/lib/fog/aws/iam.rb @@ -64,8 +64,7 @@ module Fog :server_certificates => {}, :users => Hash.new do |uhash, ukey| uhash[ukey] = { - :user_id => Fog::Mock.random_selection('ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789', 21), - :path => '/', + :user_id => Fog::AWS::Mock.key_id, :arn => "arn:aws:iam::#{Fog::AWS::Mock.owner_id}:user/#{ukey}", :access_keys => [], :policies => {}