Setup Sasl and refactor cert support