add check for keys to generate user cn