Managing Application Query Security