script to generate keys and metadata for each role