Exact methods for defects in conformal field theory