share getAccessKey functionality with model.js