Repository navigation
Conversation
Encrypt sources.configuration.auth with AES-256-GCM when SOURCE_CREDENTIALS_KEY is set, at the boundary of the source repository. Credentials stored in clear are encrypted when the API starts, which also fails fast on a missing or wrong key.
JeromeBu
force-pushed
the
feat/encrypt-source-credentials
branch
from
November 12, 2026 19:05
8592dc7 to
5eb5129
Compare
This branch has not been deployed
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.
Suite de la #619 : les secrets d'accès des sources (
sources.configuration.auth: jetons GitHub/GitLab, bearer HAL/Zenodo/Wikidata, Client-Id ROR) sont chiffrés en base quand la variableSOURCE_CREDENTIALS_KEYest définie.node:crypto, sans nouvelle dépendance. Valeur stockée :enc:v1:suivi du base64 de l'IV (12 octets), du tag (16 octets) et du texte chiffré. Grâce au préfixe, les valeurs chiffrées et en clair peuvent coexister, et le format pourra évoluer.createPgSourceRepository: déchiffrement aux 5 lectures, chiffrement à l'écriture (update). Le reste du code manipule toujours le jeton en clair, en mémoire. Aucun autre chemin ne lit ce champ directement. La seed recopieconfigurationtelle quelle, donc une valeur chiffrée reste chiffrée.encryptPlainCredentials, idempotent grâce au préfixe). L'écriture ne remplace queauth, et seulement si la valeur n'a pas changé entre-temps.isCredentialSet.docs/6-env-variables-and-customization.md. Elle décrit l'activation, la requête de vérification et ce qu'implique une clé perdue, une copie de base vers la préprod ou un retour à une version antérieure. Variable ajoutée en commentaire dans les deux.env.sampleet dansvalues.yamldu chart (api.envest aussi transmis au cronjob update).Choix faits :
Déploiement :
SOURCE_CREDENTIALS_KEYà l'API et aux jobs, puis redémarrer l'API..envdu serveur, partagé par l'API et l'update. Mieux vaut l'ajouter une fois cette version stable en prod : une version antérieure enverrait les valeurs chiffrées comme jetons.Tests :
adminSources.e2e.test.ts) :enc:v1:et la lecture rend le clair ;🤖 Generated with Claude Code