Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cut new release #300

Merged
merged 71 commits into from
Mar 3, 2021
Merged

Cut new release #300

merged 71 commits into from
Mar 3, 2021

Conversation

mjcheetham
Copy link
Collaborator

@mjcheetham mjcheetham commented Mar 3, 2021

Changes:

Thanks to our contributors ❤️:

mjcheetham and others added 30 commits January 12, 2021 13:57
Make the GetProvider method on the IHostProviderRegistry interface async
in preparation for introducing some network I/O to the auto-detection of
providers.
Enable host providers to be registered and enumerated for
auto-detection in a simple priority order: high, normal, low.
Add the ability to let host providers additionally inspect a HTTP
response message to determine and identify a supported service/endpoint.

If the simple enumeration of providers matching against the static
`InputArguments` does not produce a match (at each priority level), then
check against the lazily evaluated HEAD call to the remote URL.
This change is necessary because of a homebrew change around casks.
Co-authored-by: Derrick Stolee <derrickstolee@github.com>
Update docs/configuration.md to include an example of how to configure git-credential-manager-core.exe as git's credential store.
Auto-detect more (on-prem) providers using a simple HTTP query
We are not correctly disposing of the host providers registered with the
host provider registry. Fix this by actually calling `Dispose()` on the
correct objects(!)
Remove the ability to use an external authentication helper for
Microsoft authentication (AAD/MSA). We now always rely on the in-process
MSAL library calls.
Remove the ADAL Objective-C based native authentication component for
MSA/AAD. We now rely on the system brower of MSAL.NET.
Fix bug to ensure correct provider disposal
Drop the native macOS ADAL-based Microsoft Authentication component
Change the MSAuth GetToken method signature to return a wrapper result
object rather than just the JWT access token. The result wrapper object
includes the account UPN and the wrap AT as returned by MSAL. We do not
need to inspect the claims of the AT (which might not even by a JWT in
some cases anyway) since we have the account info elsewhere.
Rename the resource parameter to the MSAuth component to scopes, which
is the AAD "v2" concept. Also drop the remote URI parameter which is no
longer needed.
List must be comma separated.

Before:
```
$ GCM_TRACE=1 git fetch
22:22:08.037216 ...\Application.cs:69   trace: [RunInternalAsync] Git Credential Manager version 2.0.318-beta+44acfafa98 (Windows, .NET Framework 4.0.30319.42000) 'get'
22:22:08.040208 ...\Command.cs:63       trace: [ExecuteAsync] Start 'get' command...
22:22:08.046193 ...\Command.cs:74       trace: [ExecuteAsync] Detecting host provider for input:
22:22:08.047214 ...\Command.cs:75       trace: [ExecuteAsync]   protocol=https
22:22:08.047214 ...\Command.cs:75       trace: [ExecuteAsync]   host=***
22:22:08.206763 ...viderRegistry.cs:129 trace: [GetProvider] Performing auto-detection of host provider.
22:22:08.208757 ...\Command.cs:77       trace: [ExecuteAsync] Host provider 'GitHub' was selected.
22:22:08.211749 ...\HostProvider.cs:115 trace: [GetCredentialAsync] Looking for existing credential in store with service=https://*** account=...
22:22:08.214770 ...\HostProvider.cs:120 trace: [GetCredentialAsync] No existing credentials found.
22:22:08.214770 ...\HostProvider.cs:123 trace: [GetCredentialAsync] Creating new credential...
22:22:08.266604 ...bHostProvider.cs:227 trace: [GetSupportedAuthenticationModesAsync] Invalid value for supported authentication modes override setting: 'OAuth Basic'
```

After:
```
$ GCM_TRACE=1 git fetch
22:22:32.792872 ...\Application.cs:69   trace: [RunInternalAsync] Git Credential Manager version 2.0.318-beta+44acfafa98 (Windows, .NET Framework 4.0.30319.42000) 'get'
22:22:32.796891 ...\Command.cs:63       trace: [ExecuteAsync] Start 'get' command...
22:22:32.801849 ...\Command.cs:74       trace: [ExecuteAsync] Detecting host provider for input:
22:22:32.802847 ...\Command.cs:75       trace: [ExecuteAsync]   protocol=https
22:22:32.802847 ...\Command.cs:75       trace: [ExecuteAsync]   host=***
22:22:32.945493 ...viderRegistry.cs:129 trace: [GetProvider] Performing auto-detection of host provider.
22:22:32.947488 ...\Command.cs:77       trace: [ExecuteAsync] Host provider 'GitHub' was selected.
22:22:32.949455 ...\HostProvider.cs:115 trace: [GetCredentialAsync] Looking for existing credential in store with service=https://*** account=...
22:22:32.951449 ...\HostProvider.cs:120 trace: [GetCredentialAsync] No existing credentials found.
22:22:32.951449 ...\HostProvider.cs:123 trace: [GetCredentialAsync] Creating new credential...
22:22:32.991343 ...bHostProvider.cs:222 trace: [GetSupportedAuthenticationModesAsync] Supported authentication modes override present: Basic, OAuth
```
We need to separate values for GitHub auth modes with a comma, not a space.
Harmonise Microsoft Authentication APIs with AAD "v2" and MSAL concepts
Full the ~/.gcm data directory path calculation to a property of the
IFileSystem component.
Integrate with the shared Microsoft developer tools cache on macOS
platforms. This allows us to share refresh tokens with VSMac and Azure
CLI.
Integrate with the shared Microsoft developer tools AAD token cache on macOS
Add the ability to override the Microsoft authentication parameters in
the Azure DevOps API and MSAuth components - can change client ID,
redirect URI, and the base authority.
Add ability to override Microsoft Authentication parameters for Azure Repos
Replace our basic custom command-line handling code with the
System.CommandLine library which provides simpler and easier handling.
Add the ability for host providers to register themselves as offering
custom commands, under the provider ID name.

For example a provider with the ID 'foo' would be able to expose
commands under the `git-credential-manager-core foo <..>` command.
Use System.CommandLine to parse cmdline args and allow provider to offer cmds
vtbassmatt and others added 23 commits February 16, 2021 14:21
env var for config is still the long form, but the git option
is already namespaced to `credential` so it was also shortened.
Add Git credential cache as backing store on Linux
When publishing GCM as a 'single file' application, the computed path to
the entry executable is no longer correct.

On .NET Core 3.1, using `Assembly.Location` resolves to the temporary
extracted DLL file path. On .NET 5 `Assembly.Location` always returns the
empty string.

Since .NET 5, published single-file apps no longer use the self-
extraction model, and are real single file with all assemblies and
native libraries statically linked/bundled.

We now use the `Environment.GetCommandLineArgs()` method to get the raw
underlying "argv" arguments, which argv[0] is the absolute file path to
the entry executable.

We also change how we get the application version number to look for the
assembly attribute, rather than extract if from the file on disk.

At app startup, also change the way we trace system information to be
more readable.
Fix computation of app path when published as a "single file"
Add support for the cURL environment variable (also respected by Git) to
list a set of host names that should connect directly (bypass), and not
connect via the configured proxy.
Co-authored-by: Johannes Schindelin <dscho@github.com>
Add support for the `NO_PROXY` bypass environment variable
@mjcheetham
Copy link
Collaborator Author

I like the PR number of 3️⃣ 0️⃣ 0️⃣ ! 🎉

@dscho
Copy link
Collaborator

dscho commented Mar 3, 2021

I like the PR number of 3️⃣ 0️⃣ 0️⃣ ! 🎉

image

Copy link
Collaborator

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rubber-stamping this, as all of the changes have been reviewed already before they were integrated into the main branch.

@mjcheetham mjcheetham merged commit 161775c into release Mar 3, 2021
@Sokhanetaze80

This comment was marked as spam.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants