private Result checkAccessWithAccessToken(DiscFilterRequest request, ResourceNameAndAction resourceAndAction) {
        AthenzAccessToken accessToken = getAccessToken(request);
        X509Certificate identityCertificate = getClientCertificate(request).get();
        AthenzIdentity peerIdentity = AthenzIdentities.from(identityCertificate);
        if (allowedProxyIdentities.contains(peerIdentity)) {
            return checkAccessWithProxiedAccessToken(request, resourceAndAction, accessToken, identityCertificate);
        } else {
            var zpeResult = zpe.checkAccessAllowed(
                    accessToken, identityCertificate, resourceAndAction.resourceName(), resourceAndAction.action());
            return getResult(ACCESS_TOKEN, peerIdentity, zpeResult, request, resourceAndAction, mapToRequestPrivileges(accessToken.roles()));
        }
    }
An Athenz security filter that uses a configured action and resource name to control access.

@author bjorncs
jdisc-security-filters/src/main/java/com/yahoo/jdisc/http/filter/security/athenz/AthenzAuthorizationFilter.java