implement service key generation and config option framework.