NR-57 : Basic REST server components for handling gateway

Multiple fixes on security and IoC.