Fix secret and config mode issue Upstream-commit: d093aa0ec365e1ffd4db8a513c5b341b9a0d012e Component: engine