Secure command and query directories