

def _authorize_unconfirmed_identity(self, req, obj, referrers, roles):
    '"\n        Perform authorization for access that does not require a\n        confirmed identity.\n\n        :returns: A boolean if authorization is granted or denied.  None if\n                  a determination could not be made.\n        '
    if (req.environ.get('swift_sync_key') and (req.environ['swift_sync_key'] == req.headers.get('x-container-sync-key', None)) and ('x-timestamp' in req.headers)):
        log_msg = 'allowing proxy %s for container-sync'
        self.logger.debug(log_msg, req.remote_addr)
        return True
    if swift_acl.referrer_allowed(req.referer, referrers):
        if (obj or ('.rlistings' in roles)):
            log_msg = 'authorizing %s via referer ACL'
            self.logger.debug(log_msg, req.referrer)
            return True
        return False

dataset/ETHPy150Open openstack/swift/swift/common/middleware/keystoneauth.py KeystoneAuth._authorize_unconfirmed_identity/original