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

Aperta
#5,833 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

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

Direzione di ricerca

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.

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

Descrizione

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

Lingua principale
PHP
Stelle
1.2k
Fork
926
Merge medio
1g 10h
PR unite (30g)
25

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 opnsense/plugins

Tutte le issue di opnsense/plugins

Issue simili

Altre issue su PHP

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.