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

Abierto
#5,833 3 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
35/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
git, php
Área
backend, security

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
PHP
Estrellas
1.2k
Forks
926
Merge medio
1 d 10 h
PR fusionados (30 d)
25

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de opnsense/plugins

Todos los issues de opnsense/plugins

Issues similares

Más issues de PHP

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.