Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: docker/docker-credential-helpers
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.9.0
Choose a base ref
...
head repository: docker/docker-credential-helpers
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v0.9.1
Choose a head ref
  • 5 commits
  • 2 files changed
  • 3 contributors

Commits on Feb 28, 2025

  1. osxkeychain: list: do not error out when keychain is empty

    Commit 4cdcdc2 replaced the in-tree Objective-C code with github.com/keybase/go-keychain
    and inadvertently introduced a new failure mode on the `List` operation -
    it now fails when the keychain is empty.
    
    Before:
    
    ```
    $ ./bin/build/docker-credential-osxkeychain list
    {}
    ```
    
    After:
    
    ```
    $ ./bin/build/docker-credential-osxkeychain list
    credentials not found in native keychain
    ```
    
    Signed-off-by: Albin Kerouanton <albinker@gmail.com>
    akerouanton committed Feb 28, 2025
    Configuration menu
    Copy the full SHA
    c7514a0 View commit details
    Browse the repository at this point in the history
  2. osxkeychain: store: use Apple's proto consts

    Commit 4cdcdc2 swapped consts `kSecProtocolTypeHTTPS` and
    `kSecProtocolTypeHTTP` with plain-text "https" and "http" strings.
    
    This is causing a regression where credentials stored with prior
    versions (< v0.9.0) can't be fetched anymore.
    
    Unfortunately we can't just revert back to using Objective-C consts, as
    these are unsigned integers that need to be converted into `CFStringRef`
    and then passed to an helper like `keychain.CFStringToString`.
    
    Although `keychain.CFStringToString` is exported, it takes a C type
    `C.CFStringRef` so it's not consumable from other packages due to Cgo
    restrictions:
    
    > Cgo translates C types into equivalent unexported Go types. Because
    > the translations are unexported, a Go package should not expose C
    > types in its exported API: a C type used in one Go package is
    > different from the same C type used in another.
    
    We could alternatively copy `keychain.CFStringToString` into the
    `osxkeychain` package, but this commit takes a simpler approach: just
    hardcode the value of `kSecProtocolTypeHTTPS` and `kSecProtocolTypeHTTP`
    as strings. (These consts are very unlikely to ever change since it'd
    break all existing consumers.)
    
    This is **NOT** handling backward compatibility with v0.9.0, since it
    was released only 12hrs ago. So this fix won't work with credentials
    created with v0.9.0.
    
    Signed-off-by: Albin Kerouanton <albinker@gmail.com>
    akerouanton committed Feb 28, 2025
    Configuration menu
    Copy the full SHA
    f4cdabf View commit details
    Browse the repository at this point in the history
  3. Merge pull request #361 from akerouanton/fix-regressions-v0.9.0

    [v0.9.0] osxkeychain: fix regressions on get and list
    thaJeztah authored Feb 28, 2025
    Configuration menu
    Copy the full SHA
    26274da View commit details
    Browse the repository at this point in the history
  4. go.mod: retract v0.9.0

    Commit 4cdcdc2 introduced two regressions in the `osxkeychain`
    credential helper,  on `list` and `get` operations. These were addressed
    in:
    
    - Commit c7514a0: osxkeychain: list: do not error out when keychain is empty
    - Commit f4cdabf: osxkeychain: store: use Apple's proto consts
    
    Signed-off-by: Albin Kerouanton <albinker@gmail.com>
    akerouanton committed Feb 28, 2025
    Configuration menu
    Copy the full SHA
    9651bf7 View commit details
    Browse the repository at this point in the history
  5. Merge pull request #362 from akerouanton/retract-v0.9.0

    go.mod: retract v0.9.0
    akerouanton authored Feb 28, 2025
    3 Configuration menu
    Copy the full SHA
    833d2c3 View commit details
    Browse the repository at this point in the history
Loading