integration: add keys API integration tests

@xiangli-cmu Do you just want me to merge this and follow up subsequently with cleanups? No other comments now?!