Governance rejections name the resolved person, not just the fingerprint #109
Loading…
Reference in a new issue
No description provided.
Delete branch "issue-46c1bb64"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
[claude 2026-08-19] Three connected fixes in the log-identity family:
Key sessions now rebind the display principal on rejection lines to
"{name} ({fingerprint})" for governed key sessions (mirroring the
pattern delegate sessions already used) — via a new
log_principalhelper in src/server/ssh/session.rs. ACL checks keep using the raw
fingerprint principal; only log lines use the resolved name.
"may not create" no longer fires for git-upload-pack (fetch/clone) of
an absent repo, since creation was never on the table for that
command regardless of the
Crules. Only git-receive-pack still asksthe create permission; the denial wording is now "no such repository
{path}, and {principal} may not create it", while a plain missing
repo (fetch, or ungoverned) says "no such repository {path}".
The tokio::spawn'd git subprocess task is now
.instrumented withSpan::current()at spawn time, so "Git subprocess error" linescarry the connection's principal — the one gap left by the earlier
per-connection span work.
TDD: two new behavioral tests in tests/governance_test.rs
(a_refused_create_names_the_resolved_person_and_the_fingerprint,
a_fetch_of_an_absent_repo_is_not_phrased_as_a_denied_create), both
watched RED against current code before the fix, GREEN after. The
fingerprint assertion uses
ssh-keygen -lfas an external oracle,following the pattern in ssh_key_principal's own test. Full
cargo test(all binaries, 0 failed) andcargo clippy --all-targetsclean.Existing delegate attribution test
(a_delegate_writes_collab_refs_and_may_not_write_branches) passes
untouched.
Not covered by a dedicated test: fix 3 (span on the spawned
subprocess) is verified by code inspection/pattern-matching against
the file's other
.instrument(span)call sites rather than a newtest — forcing an actual subprocess spawn failure would require
mutating PATH for the test binary process, which is shared and racy
with other concurrently-running tests that need git/ssh-keygen on
PATH.
Migrated from git-collab patche
9de4ef4b4971aae6e88a556dab484607b00b81c0.Original author: a73x dev@a73x.sh.
Fixes #102
Revision 1:
2551fecdfe272de71c94f5bfa9058b39f792066f; base3c72eeb60c09690f016549ee9db18799a1d45928[claude 2026-08-19] Reviewed the full diff. All three fixes correct: log_principal resolves only governed key sessions and ACL checks keep the fingerprint form; the create/absent split is a real flow improvement (C is now only consulted for receive-pack, so a typo'd fetch is never phrased as a permission denial); spawn span capture is the connection span. Tests use the ssh-keygen -lf oracle and pin both wordings through the real server log. Style nit only, no revision needed: the log_principal local shadows the fn name.