docs(agents): mandate remote.sh chokepoint + DNS-names-only for all SSH
Replace soft "ssh may be blocked" note with hard non-negotiable rules:
ALL SSH must route through remote.sh/remote-dns.sh chokepoints, and ALL
host references must use DNS names — never IP literals. Eliminates the
per-session discovery tax of finding the right IP for each host. Updates
session-start gate summary, quick-reference examples, and conman config
to purge IP addresses in favor of DNS names.
💘 Generated with Crush
Assisted-by: Crush:glm-5.2
This commit is contained in:
@@ -105,13 +105,15 @@ traceable to an approved ticket. There is no "I thought it would help."
|
|||||||
3. **Read [questions-v1.md](questions-v1.md)** — open questions awaiting human input.
|
3. **Read [questions-v1.md](questions-v1.md)** — open questions awaiting human input.
|
||||||
4. **Check for understanding — GATE.** In your own words, summarize ALL the rules
|
4. **Check for understanding — GATE.** In your own words, summarize ALL the rules
|
||||||
back to the user before doing any work: Agent Authority (ticket-governed,
|
back to the user before doing any work: Agent Authority (ticket-governed,
|
||||||
propose-never-implement), Access-Channel SSH-only policy, Questions policy
|
propose-never-implement), Access-Channel SSH-only policy, Remote access
|
||||||
(no harness question-tools), Documentation policy (Discourse is SoR),
|
(remote.sh chokepoint mandatory, DNS names only — never IP literals),
|
||||||
Redmine tracking, Git policy (always commit+push, shellcheck), Mandatory
|
Questions policy (no harness question-tools), Documentation policy
|
||||||
infra-change documentation (#298 audit log), SSH routing chokepoints
|
(Discourse is SoR), Redmine tracking, Git policy (always commit+push,
|
||||||
(`tests/remote.sh`), the mechanically enforced `check-rules.sh` rules, and
|
shellcheck), Mandatory infra-change documentation (#298 audit log), SSH
|
||||||
Credentials (Vault migration TODO). Then stop and wait for the user to
|
routing chokepoints (`tests/remote.sh`), the mechanically enforced
|
||||||
confirm. This checkpoint guarantees every session starts aligned.
|
`check-rules.sh` rules, and Credentials (Vault migration TODO). Then stop
|
||||||
|
and wait for the user to confirm. This checkpoint guarantees every
|
||||||
|
session starts aligned.
|
||||||
5. **Check Redmine** — `docker run --rm --env-file ~/.creds/redmine.env git.knownelement.com/reachableceo/redmine-cli:latest list --assigned-to-me -p 55` for active work.
|
5. **Check Redmine** — `docker run --rm --env-file ~/.creds/redmine.env git.knownelement.com/reachableceo/redmine-cli:latest list --assigned-to-me -p 55` for active work.
|
||||||
6. **Check current state:** `git log --oneline -10`.
|
6. **Check current state:** `git log --oneline -10`.
|
||||||
7. **Run rule audit:** `bash scripts/check-rules.sh --fast`.
|
7. **Run rule audit:** `bash scripts/check-rules.sh --fast`.
|
||||||
@@ -210,9 +212,27 @@ vendor/ Vendored KNELShellFramework
|
|||||||
`/home/reachableceo/projects/KNELIAC`.
|
`/home/reachableceo/projects/KNELIAC`.
|
||||||
- **Non-bash files**: Some files under `archive/provisioning/Agents/` have `.sh`
|
- **Non-bash files**: Some files under `archive/provisioning/Agents/` have `.sh`
|
||||||
extension but are PHP (shebang `#!/usr/bin/php`). Skip in syntax checks.
|
extension but are PHP (shebang `#!/usr/bin/php`). Skip in syntax checks.
|
||||||
- **SSH access**: Direct ssh/scp may be blocked by some AI harnesses. Use
|
- **Remote access (NON-NEGOTIABLE):** ALL SSH/SCP to ANY host MUST go
|
||||||
[`tests/remote.sh`](tests/remote.sh) (Proxmox hosts + sandbox VM) or
|
through the chokepoint scripts — [`tests/remote.sh`](tests/remote.sh)
|
||||||
[`netinfra/dns-cluster-setup/remote-dns.sh`](netinfra/dns-cluster-setup/remote-dns.sh) (DNS infra hosts).
|
(Proxmox hosts + all VMs) or
|
||||||
|
[`netinfra/dns-cluster-setup/remote-dns.sh`](netinfra/dns-cluster-setup/remote-dns.sh)
|
||||||
|
(DNS infra hosts: netinfra-01/02, tsrouter, netboot). NEVER call
|
||||||
|
`ssh`/`scp` directly — the harness blocks raw ssh and the command scanner
|
||||||
|
rejects it. There are no exceptions.
|
||||||
|
- **DNS names ONLY (NON-NEGOTIABLE):** NEVER use IP address literals
|
||||||
|
(neither LAN nor Tailscale IPs) in any command, script, or config.
|
||||||
|
ALWAYS use DNS names. For Proxmox hosts: `PROX_HOST=<dns-name>`. For VMs:
|
||||||
|
`VM_IP=<dns-name>`. For conman/SNMP/any tool: pass the DNS name. If a
|
||||||
|
DNS name does not resolve, fix it in DNS (Technitium) or consult the
|
||||||
|
[system inventory — Discourse #307](https://community.turnsys.com/t/307).
|
||||||
|
Do NOT fall back to IP literals. This rule eliminates the per-session
|
||||||
|
discovery tax of finding the right IP for each host.
|
||||||
|
- **How to access a production VM:**
|
||||||
|
1. Look up the DNS name in the [system inventory — Discourse #307](https://community.turnsys.com/t/307).
|
||||||
|
2. `VM_IP=<dns-name> VM_USER=root bash tests/remote.sh vm '<command>'`
|
||||||
|
3. If the name does not resolve from the workstation, use `PROX_HOST=<proxmox-node>`
|
||||||
|
and run `qm guest cmd <vmid> network-get-interfaces` (visibility only —
|
||||||
|
NOT execution) to find the Tailscale DNS name, then access via that.
|
||||||
|
|
||||||
## Git Policy
|
## Git Policy
|
||||||
|
|
||||||
@@ -379,8 +399,8 @@ live in the centralized store at `~/.creds/discourse.env`.
|
|||||||
Switch configs are pulled via serial console through a conman + ser2net
|
Switch configs are pulled via serial console through a conman + ser2net
|
||||||
stack on pfv-tsys4.
|
stack on pfv-tsys4.
|
||||||
|
|
||||||
- **conmand server:** pfv-tsys4 (Tailscale `100.70.77.93`, port 7890)
|
- **conmand server:** pfv-tsys4 (port 7890)
|
||||||
- **ser2net:** pfv-tsys4, TCP ports 2001-2006 on Tailscale IP
|
- **ser2net:** pfv-tsys4, TCP ports 2001-2006
|
||||||
(do NOT connect to ser2net directly — it conflicts with conman's
|
(do NOT connect to ser2net directly — it conflicts with conman's
|
||||||
persistent sessions; always use the conman client)
|
persistent sessions; always use the conman client)
|
||||||
- **Script:** [`proxmox/perf/scripts/conman-console.py`](proxmox/perf/scripts/conman-console.py)
|
- **Script:** [`proxmox/perf/scripts/conman-console.py`](proxmox/perf/scripts/conman-console.py)
|
||||||
@@ -449,15 +469,18 @@ docker run --rm --env-file ~/.creds/redmine.env \
|
|||||||
docker run --rm --env-file ~/.creds/discourse.env \
|
docker run --rm --env-file ~/.creds/discourse.env \
|
||||||
git.knownelement.com/reachableceo/discourse-cli:latest whoami
|
git.knownelement.com/reachableceo/discourse-cli:latest whoami
|
||||||
|
|
||||||
# Proxmox host access:
|
# Proxmox host access (DNS names only — never IPs):
|
||||||
PROX_HOST=pfv-tsys5 bash tests/remote.sh prox 'qm list'
|
PROX_HOST=pfv-tsys5 bash tests/remote.sh prox 'qm list'
|
||||||
PROX_HOST=pfv-tsys5 bash tests/remote.sh prox 'pvesm status'
|
PROX_HOST=pfv-tsys5 bash tests/remote.sh prox 'pvesm status'
|
||||||
|
|
||||||
|
# Production VM access (DNS names only — never IPs):
|
||||||
|
VM_IP=tsys-librenms VM_USER=root bash tests/remote.sh vm 'systemctl status cron'
|
||||||
|
|
||||||
# DNS infra access:
|
# DNS infra access:
|
||||||
bash netinfra/dns-cluster-setup/remote-dns.sh netinfra01-root 'systemctl status docker'
|
bash netinfra/dns-cluster-setup/remote-dns.sh netinfra01-root 'systemctl status docker'
|
||||||
|
|
||||||
# Switch console (read-only config pull):
|
# Switch console (read-only config pull — DNS names only):
|
||||||
CONMAN_SERVER=100.70.77.93:7890 python3 proxmox/perf/scripts/conman-console.py \
|
CONMAN_SERVER=pfv-tsys4:7890 python3 proxmox/perf/scripts/conman-console.py \
|
||||||
--console pfv-r5-core-01 --cmds netinfra/switches/pfv-r5-core-01.cmds
|
--console pfv-r5-core-01 --cmds netinfra/switches/pfv-r5-core-01.cmds
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user