Merge pull request #7326 from Dhilan007/v3-gc-refactor

issue #4689: support external key.
[ci skip: update version]