Skip to content

SSH / 1Password SSH 設定を追加する #17

@kosako

Description

@kosako

スコープ

Phase 9 の ssh-1password module として、SSH 設定を chezmoi 管理に追加する。

秘密鍵は管理しない。1Password SSH Agent の利用は enable1PasswordSSH capability で制御する。

注意: 既存の ~/.ssh/config が存在するため、移行手順(棚卸し → backup → diff 確認)を実装と同等に重視する。

変更案

  • dot_ssh/config.tmpl を追加する。
  • Host * に IdentityAgent / ForwardAgent を広く設定しない。agent 設定は明示した host にだけ付ける。
  • host alias の方針(personal / work / client で alias を分けるか)を決める。
  • enable1PasswordSSH=false の profile では SSH Agent 設定が出力されないことを検査する。
  • 既存 ~/.ssh/config の棚卸し方針を docs に書く(固有 host 名は repo に入れない。local include の逃げ道を用意する)。
  • doctor.sh に report-only の確認を追加するか判断する。

対象外

  • 秘密鍵・公開鍵の管理。
  • known_hosts の管理。
  • 会社・クライアント固有の host 名、bastion、内部 endpoint。
  • ForwardAgent の広域有効化。
  • 1Password 自体の install / サインイン。

完了条件

  • dot_ssh/config.tmpl が存在し、固有 host 名・秘密鍵を含まない。
  • Host * に agent / forwarding の広域設定がない。
  • enable1PasswordSSH=false で Agent 設定が出力されないことが確認できる。
  • 既存 config からの移行手順と local include の逃げ道が docs に書かれている。

検証計画

  • ./scripts/validate-policy.sh --all
  • ./scripts/test-policy.sh
  • bash -n scripts/*.sh
  • template の静的検査(Host * への危険設定がないこと)
  • git diff --check

安全メモ

  • install side effects: なし
  • secret access: なし(1Password へのアクセスもしない)
  • network changes: なし
  • chezmoi apply: しない

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions