move cas config to env; fix