sss_query - all functionality except for sudo rules implemented