simplify security filter to avoid overhead and improve performance