# Implementing a new MDEX Security Manager

Your Security Manager must implement the applySecurity method described in this topic.

There are two versions of the applySecurity method, one of which your Security Manager must implement:

    public void applySecurity(PortletRequest request, MDEXState mdexState, Query query) throws MDEXSecurityException;

The Query class in this signature is com.endeca.portal.data.Query. This class provides a simple wrapper around an ENEQuery.