added database & secret samples, fixed permissions, fixed CAS