fix resource spec
fix client resource specs and regenerate key function