Repository navigation
BinkP auth logging: keep DEBUG diagnostics, put secret material behind an explicit opt-in - #502
Open
SkrawlCO wants to merge 1 commit into
Conversation
…d an explicit opt-in DEBUG logging wrote the first characters of the received and expected plaintext passwords and the CRAM-MD5 challenge together with its digest, which allows an offline guess of the session password. By default log outcomes, lengths and a non-secret mismatch hint only; BINKP_LOG_SENSITIVE_AUTH=true restores the full detail and logs a warning once per session while enabled. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
TITLE: BinkP auth logging: keep DEBUG diagnostics, put secret material behind an explicit opt-in
This revisits the concern from #458 with a different design. #458 removed the authentication detail outright. Its review pointed out that the detail is valuable when debugging authentication with a peer, and asked for it to remain available, "at least with a flag to enable". This PR keeps DEBUG useful by default and adds that flag for the secret-derived parts.
Problem
At DEBUG level,
BinkpSessionlogs:DEBUG is the level operators enable, and then share logs from, when an uplink's authentication fails.
Impact
Partial session secrets, and material for brute-forcing the full secret, end up in DEBUG logs and in the copies of them that get passed around.
Repair
length differs,differs only by letter case,differs only by leading/trailing whitespace, orsame length, content differs. No password characters and no challenge or digest values are written.BINKP_LOG_SENSITIVE_AUTH=true(defaultfalse): restores the previous detail: password prefixes, the full CRAM challenge, and the digest. While enabled, each session logs once at WARNING that secret material is being written to the log.docs/CONFIGURATION.mdand.env.example.Authentication behavior itself is unchanged.
Proof
tests/Unit/BinkpSensitiveAuthLoggingTest.php(no network, no database; config and logger stubs) covers:[WARNING] BINKP_LOG_SENSITIVE_AUTH is enabledper session;false,0,noand empty values keep the safe default.Fails on the current branch (5 failures); passes with the change. The rest of
tests/Unitis unchanged.