security and rest work