Dead PRD: SSH Config Provisioning #151

Closed
didericis-codex wants to merge 2 commits from prd-0046-ssh-config-provisioning into main
Collaborator

Closes #150.

This PRD is dead and no longer owns PRD 0046. PRD 0046 now refers to the git remote host override removal work: 46e596d0b1/docs/prds/0046-remove-git-remote-host-overrides.md

Original abandoned draft: 859092297f/docs/prds/0046-ssh-config-provisioning.md

Closes #150. This PRD is dead and no longer owns PRD 0046. PRD 0046 now refers to the git remote host override removal work: https://gitea.dideric.is/didericis/bot-bottle/src/commit/46e596d0b170fe50b29040c92837594de5592b33/docs/prds/0046-remove-git-remote-host-overrides.md Original abandoned draft: https://gitea.dideric.is/didericis/bot-bottle/src/commit/859092297f5056685bd30ef7b4eb7bc448c44725/docs/prds/0046-ssh-config-provisioning.md
didericis-codex added 1 commit 2026-06-02 13:51:57 -04:00
docs(prd): add ssh config provisioning plan
test / unit (pull_request) Successful in 49s
test / integration (pull_request) Successful in 57s
859092297f
Owner

PRD looks mostly good, but think we can also strip out ExtraHosts from the git config, and we should add a section under ssh for known host keys. After this the only thing under git remotes remaining should be Name and Upstream, and we should change it to look like this:

git:
  remotes:
    bot-bottle: ssh://git@100.78.141.42:30009/didericis/bot-bottle.git
ssh:
  known_hosts:
    - "[100.78.141.42]:30009 ssh-rsa ..." 
  config:
    - Host: gitea
      Hostname: 100.78.141.42
      Port: 30009
      User: git
      IdentityFile: ~/.ssh/gitea-delos-2.pem
    - Host: gitea.dideric.is
      Hostname: 100.78.141.42
      Port: 30009
      User: git
      IdentityFile: ~/.ssh/gitea-delos-2.pem
PRD looks mostly good, but think we can also strip out `ExtraHosts` from the git config, and we should add a section under ssh for known host keys. After this the only thing under git remotes remaining should be `Name` and `Upstream`, and we should change it to look like this: ```yaml git: remotes: bot-bottle: ssh://git@100.78.141.42:30009/didericis/bot-bottle.git ssh: known_hosts: - "[100.78.141.42]:30009 ssh-rsa ..." config: - Host: gitea Hostname: 100.78.141.42 Port: 30009 User: git IdentityFile: ~/.ssh/gitea-delos-2.pem - Host: gitea.dideric.is Hostname: 100.78.141.42 Port: 30009 User: git IdentityFile: ~/.ssh/gitea-delos-2.pem ```
Author
Collaborator

Agreed. That is a cleaner split, and it keeps the manifest from having three different host-resolution mechanisms hidden under git.remotes.

I’ll update the PRD around this shape:

git:
  remotes:
    bot-bottle: ssh://git@100.78.141.42:30009/didericis/bot-bottle.git
ssh:
  known_hosts:
    - "[100.78.141.42]:30009 ssh-rsa ..."
  config:
    - Host: gitea
      Hostname: 100.78.141.42
      Port: 30009
      User: git
      IdentityFile: ~/.ssh/gitea-delos-2.pem

Concretely, I think the PRD should say:

  • git.remotes becomes only the logical remote name to upstream URL mapping. No ExtraHosts, no identity material, no SSH host metadata.
  • ssh.known_hosts is a list of OpenSSH known_hosts lines and renders to the agent-side default known-hosts file, normally ~/.ssh/known_hosts for the node user.
  • ssh.config renders to ~/.ssh/config, with IdentityFile rewritten to the staged in-bottle key path.
  • The git-gate path should consume the same SSH material where it needs SSH verification/key config, but this should not create Docker extra_hosts, sidecar host mappings, agent /etc/hosts, or egress DNS behavior.
  • ExtraHosts can be removed from the new PRD’s target model rather than preserved as part of git config.

That also gives the implementation a better boundary: git remotes define what repos exist; ssh defines how SSH resolves/authenticates/verifies hosts; egress remains HTTP/API policy.

Agreed. That is a cleaner split, and it keeps the manifest from having three different host-resolution mechanisms hidden under `git.remotes`. I’ll update the PRD around this shape: ```yaml git: remotes: bot-bottle: ssh://git@100.78.141.42:30009/didericis/bot-bottle.git ssh: known_hosts: - "[100.78.141.42]:30009 ssh-rsa ..." config: - Host: gitea Hostname: 100.78.141.42 Port: 30009 User: git IdentityFile: ~/.ssh/gitea-delos-2.pem ``` Concretely, I think the PRD should say: - `git.remotes` becomes only the logical remote name to upstream URL mapping. No `ExtraHosts`, no identity material, no SSH host metadata. - `ssh.known_hosts` is a list of OpenSSH `known_hosts` lines and renders to the agent-side default known-hosts file, normally `~/.ssh/known_hosts` for the `node` user. - `ssh.config` renders to `~/.ssh/config`, with `IdentityFile` rewritten to the staged in-bottle key path. - The git-gate path should consume the same SSH material where it needs SSH verification/key config, but this should not create Docker `extra_hosts`, sidecar host mappings, agent `/etc/hosts`, or egress DNS behavior. - `ExtraHosts` can be removed from the new PRD’s target model rather than preserved as part of git config. That also gives the implementation a better boundary: git remotes define what repos exist; ssh defines how SSH resolves/authenticates/verifies hosts; egress remains HTTP/API policy.
didericis added 1 commit 2026-06-02 14:01:46 -04:00
docs(prd): revise ssh provisioning schema
test / unit (pull_request) Successful in 34s
test / integration (pull_request) Successful in 42s
28cbe40a22
Author
Collaborator

Updated in 28cbe40.

The PRD now uses the requested shape:

  • git.remotes is a simple logical-name to upstream-URL mapping.
  • ssh.known_hosts is a top-level list of OpenSSH known-host lines.
  • ssh.config owns SSH client stanzas and identity-file references.
  • ExtraHosts, IdentityFile, and embedded known-host fields are removed from the target git.remotes model.
  • Acceptance criteria and tests now cover known-host rendering and hosts/DNS isolation without preserving ExtraHosts as part of git config.
Updated in `28cbe40`. The PRD now uses the requested shape: - `git.remotes` is a simple logical-name to upstream-URL mapping. - `ssh.known_hosts` is a top-level list of OpenSSH known-host lines. - `ssh.config` owns SSH client stanzas and identity-file references. - `ExtraHosts`, `IdentityFile`, and embedded known-host fields are removed from the target `git.remotes` model. - Acceptance criteria and tests now cover known-host rendering and hosts/DNS isolation without preserving `ExtraHosts` as part of git config.
Owner

Actually this architecture will break a bunch of assumptions we were making in order to route everything through git-gate... maybe we should just back out of this entirely. The only reason to do this is so that the local remote I have configured gets routed to the correct location and can take my ssh config into account, but it's a bit of a weird/atypical remote set up (I think), and I don't think it justifies the complexity of all this.

That said, I DO think we should probably remove ExtraHosts, as that adds some unexpected behavior (original reason for filing the bug). Let's add a new issue about just removing ExtraHosts from the git portion of the manifest.

Actually this architecture will break a bunch of assumptions we were making in order to route everything through git-gate... maybe we should just back out of this entirely. The only reason to do this is so that the local remote I have configured gets routed to the correct location and can take my ssh config into account, but it's a bit of a weird/atypical remote set up (I think), and I don't think it justifies the complexity of all this. That said, I DO think we should probably remove `ExtraHosts`, as that adds some unexpected behavior (original reason for filing the bug). Let's add a new issue about just removing `ExtraHosts` from the git portion of the manifest.
Author
Collaborator

Agreed. The top-level SSH config provisioning path is too much machinery for the specific remote-alias case, and it changes git-gate assumptions more than this bug warrants.

I created #152 for the narrower follow-up: remove ExtraHosts from git.remotes and stop plumbing it into git-gate/hosts behavior. I will not continue the broader PRD 0046 implementation from this PR.

Agreed. The top-level SSH config provisioning path is too much machinery for the specific remote-alias case, and it changes git-gate assumptions more than this bug warrants. I created #152 for the narrower follow-up: remove `ExtraHosts` from `git.remotes` and stop plumbing it into git-gate/hosts behavior. I will not continue the broader PRD 0046 implementation from this PR.
didericis closed this pull request 2026-06-02 14:10:44 -04:00
didericis-codex changed title from PRD 0046: SSH Config Provisioning to Dead PRD: SSH Config Provisioning 2026-06-02 14:33:36 -04:00
Some checks are pending
test / unit (pull_request) Successful in 34s
test / integration (pull_request) Successful in 42s

Pull request closed

Sign in to join this conversation.