← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1289115] [NEW] check_signature syntax error

 

Public bug reported:

    credentials is a dictionary,credentials.signature syntax error
    def check_signature(self, creds_ref, credentials):
        signer = ec2_utils.Ec2Signer(creds_ref['secret'])
        signature = signer.generate(credentials)
        if utils.auth_str_equal(credentials['signature'], signature):
            return
        # NOTE(vish): Some libraries don't use the port when signing
        #             requests, so try again without port.
        elif ':' in credentials['signature']:
            hostname, _port = credentials['host'].split(':')
            credentials['host'] = hostname
            signature = signer.generate(credentials)
            if not utils.auth_str_equal(credentials.signature, signature):
                raise exception.Unauthorized(message='Invalid EC2 signature.')
        else:

** Affects: keystone
     Importance: Undecided
     Assignee: Xurong Yang (idopra)
         Status: In Progress

** Changed in: keystone
     Assignee: (unassigned) => Xurong Yang (idopra)

** Changed in: keystone
       Status: New => In Progress

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Keystone.
https://bugs.launchpad.net/bugs/1289115

Title:
  check_signature syntax error

Status in OpenStack Identity (Keystone):
  In Progress

Bug description:
      credentials is a dictionary,credentials.signature syntax error
      def check_signature(self, creds_ref, credentials):
          signer = ec2_utils.Ec2Signer(creds_ref['secret'])
          signature = signer.generate(credentials)
          if utils.auth_str_equal(credentials['signature'], signature):
              return
          # NOTE(vish): Some libraries don't use the port when signing
          #             requests, so try again without port.
          elif ':' in credentials['signature']:
              hostname, _port = credentials['host'].split(':')
              credentials['host'] = hostname
              signature = signer.generate(credentials)
              if not utils.auth_str_equal(credentials.signature, signature):
                  raise exception.Unauthorized(message='Invalid EC2 signature.')
          else:

To manage notifications about this bug go to:
https://bugs.launchpad.net/keystone/+bug/1289115/+subscriptions


Follow ups

References