Split keyring and secret handling off into a separate module
This makes it easier to sync with the upstream who have reimplemented this part of the code differently.
This makes it easier to sync with the upstream who have reimplemented this part of the code differently.