Skip to content

[FEATURE] Follow the git credential approve/reject contract for helper-sourced credentials #3765

Closed

Description

Proposals are welcome before implementation. For substantive changes, wait
for a responsible human maintainer to approve the scope and identify a review
contact. An automated recommendation, label alone, or silence is not approval.
See Contributing.

Is your feature request related to a problem? Please describe.
APM asks the Git credential helper for credentials (git credential fill) but never reports the outcome back. Git's documented contract is to call git credential approve after a credential works and git credential reject after the server rejects it (https://git-scm.com/docs/git-credential, "TYPICAL USE OF GIT CREDENTIAL"). Without reject, a helper such as Git Credential Manager keeps returning an expired credential, and users must clear it by hand.

Describe the solution you'd like

  • After a helper-sourced credential is accepted, call approve; after the server verifiably rejects THAT credential (classified credential_rejected, not network/TLS/throttle/not-found/sign-in redirect), call reject once, for exactly the host/path the credential was filled for.
  • Never call reject for env tokens, gh or az credentials, or on any ambiguous outcome; never on a host the classifier did not derive from the dependency reference.
  • Non-interactive in CI; failures of approve/reject are logged at debug and never fail the install.
  • Hermetic tests with a fake helper recording the protocol calls.

Describe alternatives you've considered
Call neither (0.36.1 behavior: safe, but dead credentials are never rotated). Approve only.

Additional context
Follow-up named in the 0.36.1 T1 auth brief (decision D3, supply-chain lens sec 10), approved 2026-11-17. Builds on the 0.36.1 auth outcome classifier (#3752).

Activity

  1. added
    area/enterprise
    on Nov 17, 2026
  2. added
    type/enhancement
    on Nov 17, 2026
  3. danielmeppiel commented on Nov 17, 2026

    @danielmeppiel
    CollaboratorAuthor

    Decision: approve
    Area: project
    Scope: Report helper-sourced credential outcomes back to Git per the git-credential contract: approve after the credential is accepted, and reject once after a verified credential_rejected outcome for that exact credential and host/path, through the auth outcome classifier and fallback chain owner.
    Done when: A fake helper sees approve on success and reject only on a classified credential rejection; no approve/reject for env, gh or az credentials, ambiguous, network, TLS, throttle, not-found or sign-in-redirect outcomes, or underived hosts; helper protocol failures never fail an install; hermetic tests cover each case and auth docs are updated.
    Out of scope: Interactive prompting changes; storing credentials APM did not obtain from the helper; non-Git credential stores.
    Review contact: Daniel Meppiel (@danielmeppiel)

  4. danielmeppiel commented on Nov 17, 2026

    @danielmeppiel
    CollaboratorAuthor

    Context: this scope is the follow-up to decision D3 in the 0.36.1 auth design, approved by Daniel Meppiel (@danielmeppiel) on 2026-11-17. It builds on the 0.36.1 auth outcome classifier and fallback chain (#3752). PRs are held until v0.36.1 is tagged.

  5. added
    status/accepted
    on Nov 17, 2026
  6. danielmeppiel commented on Nov 17, 2026

    @danielmeppiel
    CollaboratorAuthor

    Follow-up of #3752 (credential helper contract deferred from the 0.36.1 fix).

  7. 18 remaining items

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/enterprisestatus/acceptedtype/enhancement

    Type

    No type

    Projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions