<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/contrib/credential, branch v2.45.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.45.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.45.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2024-04-01T22:38:20Z</updated>
<entry>
<title>osxkeychain: store new attributes</title>
<updated>2024-04-01T22:38:20Z</updated>
<author>
<name>Bo Anderson</name>
<email>mail@boanderson.me</email>
</author>
<published>2024-02-17T23:34:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5b35bba86e6fdf0484ea71bf5b8ef1167f14015'/>
<id>urn:sha1:d5b35bba86e6fdf0484ea71bf5b8ef1167f14015</id>
<content type='text'>
d208bfdfef (credential: new attribute password_expiry_utc, 2023-02-18)
and a5c76569e7 (credential: new attribute oauth_refresh_token,
2023-04-21) introduced new credential attributes but support was missing
from git-credential-osxkeychain.

Support these attributes by appending the data to the password in the
keychain, separated by line breaks. Line breaks cannot appear in a git
credential password so it is an appropriate separator.

Fixes the remaining test failures with osxkeychain:

    18 - helper (osxkeychain) gets password_expiry_utc
    19 - helper (osxkeychain) overwrites when password_expiry_utc
    changes
    21 - helper (osxkeychain) gets oauth_refresh_token

Signed-off-by: Bo Anderson &lt;mail@boanderson.me&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>osxkeychain: erase matching passwords only</title>
<updated>2024-04-01T22:38:20Z</updated>
<author>
<name>Bo Anderson</name>
<email>mail@boanderson.me</email>
</author>
<published>2024-02-17T23:34:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e3cef40db89f5a7c91f4e9d6c4959ca1e41f4647'/>
<id>urn:sha1:e3cef40db89f5a7c91f4e9d6c4959ca1e41f4647</id>
<content type='text'>
Other credential helpers support deleting credentials that match a
specified password. See 7144dee3ec (credential/libsecret: erase matching
creds only, 2023-07-26) and cb626f8e5c (credential/wincred: erase
matching creds only, 2023-07-26).

Support this in osxkeychain too by extracting, decrypting and comparing
the stored password before deleting.

Fixes the following test failure with osxkeychain:

    11 - helper (osxkeychain) does not erase a password distinct from
    input

Signed-off-by: Bo Anderson &lt;mail@boanderson.me&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>osxkeychain: erase all matching credentials</title>
<updated>2024-04-01T22:38:20Z</updated>
<author>
<name>Bo Anderson</name>
<email>mail@boanderson.me</email>
</author>
<published>2024-02-17T23:34:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9032bcad82f45a403e4a8de86e1fcb4bfd1ab282'/>
<id>urn:sha1:9032bcad82f45a403e4a8de86e1fcb4bfd1ab282</id>
<content type='text'>
Other credential managers erased all matching credentials, as indicated
by a test case that osxkeychain failed:

    15 - helper (osxkeychain) erases all matching credentials

Signed-off-by: Bo Anderson &lt;mail@boanderson.me&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>osxkeychain: replace deprecated SecKeychain API</title>
<updated>2024-04-01T22:38:19Z</updated>
<author>
<name>Bo Anderson</name>
<email>mail@boanderson.me</email>
</author>
<published>2024-02-17T23:34:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9abe31f5f161be4d69118bdfae00103cd6efa510'/>
<id>urn:sha1:9abe31f5f161be4d69118bdfae00103cd6efa510</id>
<content type='text'>
The SecKeychain API was deprecated in macOS 10.10, nearly 10 years ago.
The replacement SecItem API however is available as far back as macOS
10.6.

While supporting older macOS was perhaps prevously a concern,
git-credential-osxkeychain already requires a minimum of macOS 10.7
since 5747c8072b (contrib/credential: avoid fixed-size buffer in
osxkeychain, 2023-05-01) so using the newer API should not regress the
range of macOS versions supported.

Adapting to use the newer SecItem API also happens to fix two test
failures in osxkeychain:

    8 - helper (osxkeychain) overwrites on store
    9 - helper (osxkeychain) can forget host

The new API is compatible with credentials saved with the older API.

Signed-off-by: Bo Anderson &lt;mail@boanderson.me&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/libsecret-empty-password-fix'</title>
<updated>2024-02-28T00:04:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-28T00:04:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=70dadd510be0c4673eb81138d3daeefb01afae2a'/>
<id>urn:sha1:70dadd510be0c4673eb81138d3daeefb01afae2a</id>
<content type='text'>
Credential helper based on libsecret (in contrib/) has been updated
to handle an empty password correctly.

* mh/libsecret-empty-password-fix:
  libsecret: retrieve empty password
</content>
</entry>
<entry>
<title>libsecret: retrieve empty password</title>
<updated>2024-02-19T22:36:35Z</updated>
<author>
<name>M Hickford</name>
<email>mirth.hickford@gmail.com</email>
</author>
<published>2024-02-19T20:40:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=8f1f2023b758179b31188b665496b514dbb952d6'/>
<id>urn:sha1:8f1f2023b758179b31188b665496b514dbb952d6</id>
<content type='text'>
Since 0ce02e2f (credential/libsecret: store new attributes, 2023-06-16)
a test that stores empty username and password fails when
t0303-credential-external.sh is run with
GIT_TEST_CREDENTIAL_HELPER=libsecret.

Retrieve empty password carefully. This fixes test:

    ok 14 - helper (libsecret) can store empty username

Signed-off-by: M Hickford &lt;mirth.hickford@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/credential-oauth-refresh-token-with-wincred'</title>
<updated>2024-02-08T21:20:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2024-02-08T21:20:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bec916039422e5b67c996e0180148fc5d30b0324'/>
<id>urn:sha1:bec916039422e5b67c996e0180148fc5d30b0324</id>
<content type='text'>
The wincred credential backend has been taught to support oauth refresh
token the same way as credential-cache and credential-libsecret backends.

* mh/credential-oauth-refresh-token-with-wincred:
  credential/wincred: store oauth_refresh_token
</content>
</entry>
<entry>
<title>credential/wincred: store oauth_refresh_token</title>
<updated>2024-01-29T20:11:24Z</updated>
<author>
<name>M Hickford</name>
<email>mirth.hickford@gmail.com</email>
</author>
<published>2024-01-28T21:25:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f061959efd6ff16bb26d8b442707a25dd49085ee'/>
<id>urn:sha1:f061959efd6ff16bb26d8b442707a25dd49085ee</id>
<content type='text'>
a5c7656 (credential: new attribute oauth_refresh_token) introduced
a new confidential credential attribute and added support to
credential-cache. Later 0ce02e2f (credential/libsecret: store new
attributes, 2023-06-16) added support in credential-libsecret.

To add support in credential-wincred, we encode the new attribute in the
CredentialBlob, separated by newline:

    hunter2
    oauth_refresh_token=xyzzy

This is extensible and backwards compatible. The credential protocol
already assumes that attribute values do not contain newlines.

This fixes test "helper (wincred) gets oauth_refresh_token" when
t0303-credential-external.sh is run with
GIT_TEST_CREDENTIAL_HELPER=wincred. This test was added in a5c76569e7
(credential: new attribute oauth_refresh_token, 2023-04-21).

Alternatives considered: store oauth_refresh_token in a wincred
attribute. This would be insecure because wincred assumes attribute
values to be non-confidential.

Signed-off-by: M Hickford &lt;mirth.hickford@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'mh/credential-erase-improvements-more'</title>
<updated>2023-08-28T16:51:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2023-08-28T16:51:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bc92d2c7ac6bd85f2447dbc37c886a4e72076005'/>
<id>urn:sha1:bc92d2c7ac6bd85f2447dbc37c886a4e72076005</id>
<content type='text'>
Update two credential helpers to correctly match which credential
to erase; they dropped not the ones with stale password.

* mh/credential-erase-improvements-more:
  credential/wincred: erase matching creds only
  credential/libsecret: erase matching creds only
</content>
</entry>
<entry>
<title>credential/wincred: erase matching creds only</title>
<updated>2023-07-26T20:27:34Z</updated>
<author>
<name>M Hickford</name>
<email>mirth.hickford@gmail.com</email>
</author>
<published>2023-07-26T19:51:22Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=cb626f8e5cb76ce081ab0a02656611f05a54cfb5'/>
<id>urn:sha1:cb626f8e5cb76ce081ab0a02656611f05a54cfb5</id>
<content type='text'>
The credential erase request typically includes protocol, host, username
and password.

credential-wincred erases stored credentials that match protocol,
host and username, regardless of password.

This is confusing in the case the stored password differs from that
in the request. This case can occur when multiple credential helpers are
configured.

Only erase credential if stored password matches request (or request
omits password).

This fixes test "helper (wincred) does not erase a password distinct
from input" when t0303 is run with GIT_TEST_CREDENTIAL_HELPER set to
"wincred". This test was added in aeb21ce22e (credential: avoid
erasing distinct password, 2023-06-13).

Signed-off-by: M Hickford &lt;mirth.hickford@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
