private void handleAuthorizationFailure(Request request, Throwable throwable) {
        boolean isAuthorizationException = throwable instanceof AuthorizationException;
        String errorMessage = String.format("For request '%s' from '%s': %s", request.methodName(), request.target().toString(), throwable.getMessage());
        if (!isAuthorizationException || ((AuthorizationException) throwable).type() != Type.SILENT) {
            log.log(Level.INFO, errorMessage);
        }
        log.log(Level.FINE, throwable, throwable::getMessage);
        JrtErrorCode error = isAuthorizationException ? JrtErrorCode.UNAUTHORIZED : JrtErrorCode.AUTHORIZATION_FAILED;
        request.setError(error.code, errorMessage);
        request.returnRequest();
        throw throwUnchecked(throwable); // rethrow exception to ensure that subsequent completion stages are not executed (don't execute implementation of rpc method).
    }
A {@link RpcAuthorizer} that perform access control for configserver RPC methods when TLS and multi-tenant mode are enabled.

@author bjorncs
configserver/src/main/java/com/yahoo/vespa/config/server/rpc/security/MultiTenantRpcAuthorizer.java