-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
Fully Compatible
Correct behavior - string key:
irb(main):003:0> Mongo::Client.new(['localhost'],'auth_mech_properties'=>{Foo:42}).options => {"database"=>"admin", "retry_reads"=>true, "retry_writes"=>true, "auth_mech_properties"=>{"foo"=>42}}
Correct behavior - URI + Ruby option:
irb(main):004:0> Mongo::Client.new('mongodb://localhost',auth_mech_properties:{Foo:42}).options => {"database"=>"admin", "retry_reads"=>true, "retry_writes"=>true, "auth_mech_properties"=>{"foo"=>42}}
Wrong behavior - host + Ruby option with symbol key:
irb(main):002:0> Mongo::Client.new(['localhost'],auth_mech_properties:{Foo:42}).options => {"database"=>"admin", "retry_reads"=>true, "retry_writes"=>true, "auth_mech_properties"=>{"Foo"=>42}}
This makes AWS auth not work when the session token is specified using the uppercase AWS_SESSION_TOKEN key when :auth_mech_properties is a symbol.