Adding get secret/order by ref support

Change-Id: I645d4b4cd9e03c0c75107c0b3899abbf815c3559