add rest config
refactor security unit tests
hotfix  unit tests