security: Add security switch in SyncSocket

Change-Id: I65b8fb17ff1794cfdb0ffc6e724b743e6b1945bb