os-git-backup: optional encryption of the pushed configuration

オープン
#5,833 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
git, php
領域
backend, security

調査の方向性

Start by reading the os-git-backup plugin and the existing encrypted download and cloud backup provider implementations mentioned in the issue. Compare the two proposed encryption approaches and their effects on remote storage, local history, and compatibility. Done means an opt-in encryption setting protects remote backups while leaving existing setups working; the issue does not name specific files or tests.

索引モデルが issue の本文から書いたものです。

説明

support

Important notices
Before you add a new report, we ask you kindly to acknowledge the following:

Is your feature request related to a problem? Please describe.

The Git backup provider (os-git-backup) pushes config.xml in clear text to the
remote repository. config.xml contains password hashes, API keys and secrets,
VPN keys and private keys of certificates and CAs, so every remote copy - and
every backup of the machine that hosts the remote repository - carries the full
secret material of the firewall in clear text, for every revision ever pushed.

Describe the solution you'd like

An optional encryption setting for the Git provider, for example:

Encrypted remote, plain local history (preferred): the local repository in
/conf/backup/git stays as it is (diffable history), only the content sent to
the remote is encrypted (e.g. via git-remote-gcrypt or age/OpenPGP). The remote
host never sees clear text; anyone holding the key can clone and get the full,
diffable history back.
Encrypt the file before the commit with the same mechanism as the encrypted
download. Simple, but every revision becomes an opaque blob (no diffs, the
repository grows by the full file size per commit) - acceptable as an opt-in.
Either option should be off by default, so existing setups keep working.

Describe alternatives you've considered

Restricting access on the remote host (dedicated user, git-shell, from=
restriction in authorized_keys, mode 700/600, core.sharedRepository=0600).
This protects the live repository, but not copies of it (VM snapshots, backups
of the remote host).
Encrypting the file system of the remote host - protects only against offline
access to that disk, not against backups taken above the file system layer.
Using the Nextcloud provider instead - loses the per-change git history that
makes the Git provider valuable (one commit per configuration change, with the
API path in the commit message).

Additional context

Other places in OPNsense already offer encryption:

System > Configuration > Backups > Download: "Encrypt this configuration file"
the Nextcloud and Google Drive backup providers have an encryption password
The Git provider has no such option, so it is currently the only remote backup
provider without encryption at rest on the remote side.

The trade-off between encryption and diffability is real; option 1 keeps both
for whoever holds the key. A short note in the documentation that the Git
provider stores config.xml unencrypted on the remote would already help users
judge where to host the repository.

OPNsense version:
OPNsense 26.7.7-amd64
FreeBSD 15.1-RELEASE-p4
OpenSSL 3.5.9

Plugin: os-git-backup :
os-git-backup (installed) --> 1.1_5

主要言語
PHP
スター
1.2k
フォーク
926
平均マージ
1日 10時間
マージ済み PR(30日)
25

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

opnsense/plugins のほかの issue

opnsense/plugins の issue をすべて見る

似ている issue

PHP の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。