make DataSourcesConfiguration do the casting work

This will require some small changes to Mongo and RDBMS. Links will follow.