KAZOO-2165 refactor incoming/outgoing security