Repository navigation
feat(config): generowanie klucza szyfrowania pól BPP (DJANGO_BPP_FIELD_ENCRYPTION_KEY) - #41
Merged
Merged
Conversation
ensure-config-files.sh dopisuje (append-only, bez nadpisywania) zmienną DJANGO_BPP_FIELD_ENCRYPTION_KEY — klucz Fernet generowany przez `openssl rand -base64 32 | tr '+/' '-_'`, bez Pythona na hoście. Nowe instalacje dostają go przez init-configs, istniejące przy `make up`. Istniejący DSPACE_CREDENTIALS_KEY pozostaje bez zmian. Dokumentacja (architektura.md) z ostrzeżeniem o backupie klucza oraz testy w tests/test_makefile.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UJ23Rb1c5UtxHTfAke9ENQ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Co
scripts/ensure-config-files.sh:_ensure_secret DJANGO_BPP_FIELD_ENCRYPTION_KEY— klucz Fernet (32 losowe bajty, base64 URL-safe, 44 znaki) zopenssl rand -base64 32 | tr '+/' '-_'. Append-only: istniejąca wartość nigdy nie jest nadpisywana; dawnyDSPACE_CREDENTIALS_KEY(jeśli ktoś go ustawił) zostaje.make init-configs, istniejące przy zwykłymgit pull && make up. Do Django trafia przezenv_file— bez zmian w Compose.docs/konfiguracja/architektura.md: nowa sekcja (+ ostrzeżenie: klucz backupować razem z.env; utrata = ponowne wpisanie tokenów integracji).CLAUDE.md: notka dla agentów.tests/test_makefile.sh: format klucza po init-configs i self-heal, stabilność między przebiegami, brak duplikatów, nietykanie istniejącego klucza iDSPACE_CREDENTIALS_KEY.Powiązane: iplweb/bpp — pola sekretów integracji przechodzą na
EncryptedTextFieldz kluczemDJANGO_BPP_FIELD_ENCRYPTION_KEY. Kolejność wdrożenia dowolna: starsze obrazy BPP zmienną ignorują, a nowy BPP bez klucza działa (zapis jawny + ostrzeżenie).Testy
Uruchomione lokalnie (wycinek
tests/test_makefile.sh: nowe testy + testy ALTCHA):PASS=16 FAIL=0 SKIP=1(SKIP: walidacja przezcryptography.Fernetwymaga python3+cryptography na hoście; klucze z tego polecenia sprawdzone ręcznie przezFernet(...)).pre-commit— OK.🤖 Generated with Claude Code
https://claude.ai/code/session_01UJ23Rb1c5UtxHTfAke9ENQ