Rest api changes for creating keys and an additional mac check on the files.