split out of keystone plugin