Hi,

Aperta
#786 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
28/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
json
Ambito
devtools, security

Direzione di ricerca

Start with the devcontainer specification and its existing customization fields; the issue names no files or tests. Work out how an SSH agent allow-list would fit the specification, including filtering identity responses and signing requests, and define what happens when a host has multiple agent sockets. Done means the proposal has a clear, agreed specification and tests for its behavior.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hi,

I'm nowadays using devcontainers typically to create project-specific sandboxes for Coding-Agents.
My Problem is that devcontainers forwards my SSH-Agent-Socket and therefore allows a container to access all SSH-Keys provided by that agent.
So processes inside a Container can utilize my Keys and therefore have much more access as they need.

What I would like to have would be an allow-list for ssh-keys in the specification.

Something like (proposal):

{
  "name": "Project A",
  "customizations": {
    "sshAgent": {
      "allowedKeys": [
        "id_ed25519_client_a",
        "SHA256:4aF...k9z"
      ]
    }
  }
}

(It might also be a good idea to allow specify the SSH-Agent-Socket on the host - in case someone has multiple sockets running...)

This could be archived through a simple SSH-Agent-Filter:

[ Container ] (SSH-Client)
      │
      ▼  /tmp/ssh-agent-devcontainer-<project-id>.sock
[ Host-Proxy ] (SSH-Agent-Filter) ── Allowlist-Filtering
      │
      ▼  $SSH_AUTH_SOCK
[ Host SSH-Agent ] (contains all keys)

So the Host could start a Proxy-Daemon, which creates a dedicated SSH-Agent-Socket.
The socket implements the SSH-Agent-Wire-Protocol, that allows to:

  • SSH2_AGENTC_REQUEST_IDENTITIES: catch the real ssh-agent and filter the responses to the devcontainer
  • SSH2_AGENTC_SIGN_REQUEST: verify allow-listed key-signatures when using a key

This would allow for much easier handling of container-specific ssh-keys.

I hope you like it and would be really glad if this could be added.

Originally posted by @chdalski in https://github.com/devcontainers/spec/discussions/780

Lingua principale
Nessun dato sulla lingua
Stelle
5.8k
Fork
509
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di devcontainers/spec

Tutte le issue di devcontainers/spec

Issue simili

Altre issue su DevTools

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.