[one-users] EC2 Auth changes for ldap/external users

Rolandas Naujikas rolandas.naujikas at mif.vu.lt
Fri May 17 05:30:47 PDT 2013


--- EC2CloudAuth.rb.orig        2013-05-08 18:52:35.000000000 +0300
+++ EC2CloudAuth.rb     2013-05-17 15:03:00.000000000 +0300
@@ -15,9 +15,16 @@
 
#--------------------------------------------------------------------------- 
#

  module EC2CloudAuth
+    # Gets the password associated with a username
+    # username:: _String_ the username
+    # [return] _Hash_ with the username
+    def get_password2(username)
+ 
retrieve_from_userpool("USER[NAME=\"#{username}\"]/TEMPLATE/EC2_SECRET_KEY")
+    end
      def do_auth(env, params={})
          username = params['AWSAccessKeyId']
          one_pass = get_password(username,  'core|public')
+        one_pass = get_password2(username) unless one_pass
          return nil unless one_pass

          signature = case params['SignatureVersion']


More information about the Users mailing list