CSAR support for gateway

#44