Unify identity/provisioned_key into key block #235
Reference in New Issue
Block a user
Delete Branch "refactor-key-block"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
identityandprovisioned_keyrepo keys with a single requiredkeyblockkey.provideris"static"(host SSH key atkey.path) or"gitea"(deploy-key lifecycle;key.provisioner_tokenreplacestoken_env)git_gate.pyroutes onentry.Key.provider == "gitea"instead ofentry.ProvisionedKey is not NoneManifestProvisionedKeyConfigrenamed toManifestKeyConfig; re-exported frombot_bottle.manifest@@ -473,3 +472,3 @@upstreams_list = list(git_gate_upstreams_for_bottle(bottle))for i, entry in enumerate(bottle.git):if entry.ProvisionedKey is not None:if entry.Key.provider == "gitea":this should be in a
resolve_identity_filemethodDone — extracted
_resolve_identity_file(entry, slug, stage_dir)which returnsentry.IdentityFilefor static and calls_provision_dynamic_keyfor gitea. The prepare loop now unconditionally replacesidentity_filevia the helper.6f0e5b45896f0e5b4— extracted_resolve_identity_file(entry, slug, stage_dir)which returnsentry.IdentityFilefor static and calls_provision_dynamic_keyfor gitea. The prepare loop now unconditionally replacesidentity_filethrough the helper, removing the inline conditional entirely.@@ -218,0 +195,4 @@f"allowed: {', '.join(sorted(_KEY_PROVIDERS))}")if provider == "static":static should be the default provider, not gitea
7a124d7— flipped the branches:giteais now the explicitif,staticfalls through as the default.Identity provider abstraction is a bit sloppy/could be tightened up a bit, but good enough for now.