core: support query flags for fetch principal

sync with engine.

Change-Id: I456c81637441288b4a5986b09855e977cd539e06
Signed-off-by: Alon Bar-Lev <alonbl@redhat.com>