protected boolean executeSearchForSpnegoAttribute(final String remoteIp) throws Exception {
        val remoteHostName = getRemoteHostName(remoteIp);
        LOGGER.debug("Resolved remote hostname [{}] based on ip [{}]", remoteHostName, remoteIp);

        val searchOp = SearchOperation.copy(this.searchOperation);
        searchOp.getTemplate().setParameter("host", remoteHostName);

        LOGGER.debug("Using search filter [{}] on baseDn [{}]",
            searchOp.getTemplate().format(),
            searchOp.getRequest().getBaseDn());

        val searchResult = searchOp.execute();
        if (searchResult.isSuccess()) {
            return processSpnegoAttribute(searchResult);
        }
        throw new IllegalArgumentException("Failed to establish a connection ldap. " + searchResult.getDiagnosticMessage());
    }
Searches the ldap instance for the attribute value.

@param remoteIp the remote ip
@return true /false
@throws Exception the exception
support/cas-server-support-spnego-webflow/src/main/java/org/apereo/cas/web/flow/client/LdapSpnegoKnownClientSystemsFilterAction.java