-
Notifications
You must be signed in to change notification settings - Fork 710
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
Revert System.Text.Json change #485
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
JohnSchmeichel
approved these changes
Mar 6, 2024
jmyersmsft
approved these changes
Mar 6, 2024
CredentialProvider.Microsoft/CredentialProvider.Microsoft.csproj
Outdated
Show resolved
Hide resolved
Co-authored-by: Jonathan Myers <[email protected]>
Co-authored-by: Jonathan Myers <[email protected]>
Saibamen
reviewed
Mar 7, 2024
@@ -83,6 +77,7 @@ public async Task<string> CreateSessionTokenAsync(VstsTokenType tokenType, DateT | |||
string serializedResponse; | |||
if (response.StatusCode == System.Net.HttpStatusCode.BadRequest) | |||
{ | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why?
Saibamen
reviewed
Mar 7, 2024
@@ -473,4 +473,8 @@ Provide MSAL Cache Location | |||
<data name="SessionTokenCacheCancelMessage" xml:space="preserve"> | |||
<value>Canceling SessionToken cache operation.</value> | |||
</data> | |||
<data name="InvalidJsonWarning" xml:space="preserve"> | |||
<value>Detected invalid single quote charater in JSON input. Migrate to double quotes to avoid breaking in future versions. See https://www.rfc-editor.org/rfc/rfc8259.html#section-7 for more information.</value> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Double space before See
embetten
added a commit
that referenced
this pull request
Jun 10, 2024
# Overview - Added MSAL Managed Identity and Service Principal Token Providers to Microsoft.Artifacts.Authentication Library. - Created new endpoint `ARTIFACTS_CREDENTIALPROVIDER_FEED_ENDPOINTS` environment variable with new json schema for MI/SP required fields. - Updated VstsBuildTaskServiceEndpointCredentialProvider to call Microsoft.Artifacts.Authentication for MI/SP token providers. - Reverted #485 Changes to use system.text.json for de/serialization everywhere except for the `VSS_NUGET_EXTERNAL_FEED_ENDPOINTS` environment variable. ## Design Decisions - Intentionally not supporting SP secrets authentication to promote security best practices. - The new environment variable name and json schema were created instead of reusing or extending the existing `VSS_NUGET_EXTERNAL_FEED_ENDPOINTS` to reduce password usage and clarify the environment variable will be available to our other credproviders such as the [artifacs-keyring](https://github.com/microsoft/artifacts-keyring) not just NuGet. ## Environment Variable `ARTIFACTS_CREDENTIALPROVIDER_FEED_ENDPOINTS` ```javascript {"endpointCredentials": [{"endpoint":"http://example.index.json", "clientId":"required", "clientCertificateSubjectName":"optional", "clientCertificateFilePath":"optional"}]} ``` - `endpoint`: required. Feed url to authenticate against. - `clientId`: required for both MI/SP. For user assigned managed identities enter the Entra client id. For system assigned variables set the value to `system`. - `clientCertificateSubjectName`: Subject Name of the certificate located in the My/ CurrentUser or LocalMachine certificate store. Optional field. Only used by SP authentication. - `clientCertificateFilePath`: File path location of the certificate on the machine. Optional field. Only used by SP authentication. Will throw error if both `clientCertificateSubjectName` or `clientCertificateFilePath` are specified.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
JsonException
with Release1.1.0
when usingVSS_NUGET_EXTERNAL_FEED_ENDPOINTS
#484.