Skip to content

Encrypt dumps with age when AGE_RECIPIENT is set (CLOUD-755) - #5

Merged
Friskes merged 1 commit into
masterfrom
feature/cloud-755_age-encryption
Oct 14, 2026
Merged

Friskes merged 1 commit into
masterfrom
feature/cloud-755_age-encryption

Conversation

@Friskes

@Friskes Friskes commented Oct 13, 2026 •

Copy link
Copy Markdown

Что происходит; кому и зачем нужно:

CLOUD-755: дампы в S3 лежали открытыми, а в дампе Grafana есть секреты, зашифрованные её ключом по умолчанию. Если задан AGE_RECIPIENT (открытый ключ age), вывод pg_dump сразу шифруется и уходит в S3 как .dump.age, на диск открытый дамп не попадает. Директива shellcheck перенесена под shebang, make lint снова проходит. Порядок раскатки описан в PR wirenboard/cloud-infrastructure.


Что поменялось для пользователей:

Без AGE_RECIPIENT ничего. Как расшифровать дамп, написано в README.


Как проверял/а:

Собранный образ против MinIO и PostgreSQL 15: дамп с ключом расшифровывается и восстанавливается через pg_restore, без ключа выгружается обычный .dump, битый ключ и упавший pg_dump завершаются с кодом 1 без выгрузки и вебхука. Чистка старых дампов не трогает чужие префиксы, в том числе пары staging и staging2.

  • Проверено на стейджинге

pg_dump output is piped straight into age, so the dump never lands on disk unencrypted, and the object gets the .dump.age extension. Without AGE_RECIPIENT the image behaves as before. The shellcheck directive moves under the shebang so it covers the whole file and make lint passes again.
@Friskes
Friskes requested review from smintank and vdromanov October 13, 2026 12:13
@Friskes
Friskes merged commit 71c1117 into master Oct 14, 2026
2 checks passed
@Friskes
Friskes deleted the feature/cloud-755_age-encryption branch October 14, 2026 11:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants