Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/slang25/paket.credentialprovider.gen2support
https://github.com/slang25/paket.credentialprovider.gen2support
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/slang25/paket.credentialprovider.gen2support
- Owner: slang25
- Created: 2019-04-08T06:49:52.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-06-19T22:55:34.000Z (over 1 year ago)
- Last Synced: 2024-10-06T09:32:33.515Z (3 months ago)
- Language: F#
- Size: 19.5 KB
- Stars: 5
- Watchers: 3
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
### Paket.CredentialProvider.Gen2Support
## The Problem
There are 2 different NuGet credential providers; Gen 1, and Gen2.
### [Gen 1](https://docs.microsoft.com/en-us/nuget/reference/extensibility/nuget-exe-credential-providers)
This was the first effort by the NuGet team to introduce credential providers. The interface is simple, they print some JSON to stdout with a status code. The NuGet team overlooked .NET Core support, because the discovery process assumed they would be named `CredentialProvider.*.exe`.
Paket added Gen 1 provider support, and in addition supported .NET Core by changing the discovery process to include `CredentialProvider.*.dll`, running those under .NET Core. With that said, there are no credential providers I am aware of that adopt this mechanism.
### [Gen 2](https://docs.microsoft.com/en-us/nuget/reference/extensibility/nuget-cross-platform-authentication-plugin)
The NuGet team realised they needed .NET Core support, and cross-plat support. At the same time, they wanted to tackle [NuGets plugin architecture](https://docs.microsoft.com/en-us/nuget/reference/extensibility/nuget-cross-platform-plugins), plugin trust and more. The result was a more complex system, where there is a JSON protocol over stdin/stdout with handshakes and all sorts.
Paket has yet to adopt Gen 2 credential providers.
## Providers and Support
| Provider | Gen | Windows Support | macOS Support | ADO Distributed* | NuGet Client Support | Paket Support |
|--------------------------------|:------:|:---------------:|:-------------:|:---------------:|:--------------------:|:-------------:|
| CredentialProvider.VSS | Gen 1 | :heavy_check_mark: | :x: | :x: | Going soon | :heavy_check_mark: |
| CredentialProvider.Microsoft | Gen 2 | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :x: |
| CredentialProvider.Gen2Support | Gen 1 | :heavy_check_mark: | :heavy_check_mark: | :x: | Going soon | :heavy_check_mark: |* ADO Distributed means that it is what is shown on the Artifacts page under "Connect to feed..." dialog.
## This Provider
This package acts as a shim by implementing a Gen 1 provider, that talks to Gen 2 providers. It has knowledge of the Azure Artifacts Credential Provider so that under non-Windows it can ask you to run the appropriate command to authenticate.
This shim solves the problem of adopting Gen 2 pacakges with Paket while the eco-systems align.
## Installation
Be sure to have installed the [Azure Artifacts Credential Provider](https://github.com/Microsoft/artifacts-credprovider), under `$HOME/.nuget/plugins`.
### Windows
* Ensure the following directory exists `%HOME%\AppData\Local\NuGet\CredentialProviders\Paket.CredentialProvider.Gen2Support`, creating any missing directories as necessary.
* Download the latest `CredentialProvider.Gen2Support.zip` from the releases tab and unzip the contents of into it.### macOS
* Create a folder named `CredentialProviders` under: `$HOME/.local/share/NuGet`
* Download the latest `CredentialProvider.Gen2Support.zip` from the releases tab and unzip the contents of into it.