Repository navigation
fix(#5): masquer les identifiants d'URL dans les journaux - #128
Merged
Merged
Conversation
3 tasks
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.
Refs #5
Résumé
L'audit du 04/11 a montré que le critère « aucune donnée sensible dans les journaux » de #5 n'était pas tenu quand l'identifiant est écrit dans l'URL (
hosts => "http://user:secret@hote:9200", forme courante en configuration Logstash).@tracedet@atracedjournalisentstr(exc)au niveau DEBUG. Or les messages httpx citent l'URL complète (« Client error '401 Unauthorized' for url 'http://user:secret@…' »). Constaté surhealth()des 15 sorties HTTP.AuthStreamLoad._signer(doris) journalise l'URL de chaque requête, identifiants compris.user/password,api_key,tokenouheaders, je n'ai trouvé aucune fuite.Correction :
tracing.masquer_identifiants(texte), qui transformeschéma://…@hôteenschéma://***@hôte. Elle est placée danstracing.py, qui reste sans dépendance interne ;Testé
tests/test_fuites_identifiants.py, 81 tests :@dans un chemin non touchés) ;uv run pytest -q --cov: 2200 réussis, 106 ignorés ;tracing.py,doris.pyetgelf.pyà 100 %, total à 99 %.ruff checketruff format --checkpassent.Limites