

def authorize_anonymous(self, req):
    '\n        Authorize an anonymous request.\n\n        :returns: None if authorization is granted, an error page otherwise.\n        '
    try:
        part = req.split_path(1, 4, True)
        (version, account, container, obj) = part
    except ValueError:
        return HTTPNotFound(request=req)
    if (req.method == 'OPTIONS'):
        return
    is_authoritative_authz = (account and (self._get_account_prefix(account) in self.reseller_prefixes))
    if (not is_authoritative_authz):
        return self.denied_response(req)
    (referrers, roles) = swift_acl.parse_acl(getattr(req, 'acl', None))
    authorized = self._authorize_unconfirmed_identity(req, obj, referrers, roles)
    if (not authorized):
        return self.denied_response(req)

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