Skip to content
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
/ NuGet.Jobs Public archive

[Repository Signing] Add option to suppress repository signature extraction #495

Merged
merged 4 commits into from
Jul 26, 2018

Conversation

loic-sharma
Copy link
Contributor

No description provided.

@@ -227,6 +231,12 @@ private static ExtractedCertificates ExtractPrimarySignatureCertificates(Context
return;
}

if (type == PackageSignatureType.Repository && !_configuration.Value.ExtractRepositorySignatures)
{
_logger.LogWarning("Skipping initialization of repository signature due to configuration!");
Copy link
Member

Choose a reason for hiding this comment

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

Do we really want a bajillion of these warnings?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can lower it to a regular informational log.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Lowered to LogInformation

@@ -22,7 +22,8 @@
"AllowedRepositorySigningCertificates": [
"cf7ac17ad047ecd5fdc36822031b12d4ef078b6f2b4c5e6ba41f8ff2cf4bad67"
],
"V3ServiceIndexUrl": "https://api.nuget.org/v3/index.json"
"V3ServiceIndexUrl": "https://api.nuget.org/v3/index.json",
"ExtractRepositorySignatures": false
Copy link
Member

Choose a reason for hiding this comment

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

Commit instead of Extract?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

await _target.ExtractAsync(_packageKey, signature, _token);

// Assert
Assert.Equal(0, _entitiesContext.Object.PackageSignatures.Count());
Copy link
Member

Choose a reason for hiding this comment

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

Maybe assert blobs are persisted, so we have expected behavior covered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

Copy link
Member

@joelverhagen joelverhagen left a comment

Choose a reason for hiding this comment

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

Address comments then :shipit:

@loic-sharma loic-sharma merged commit a843ac6 into dev Jul 26, 2018
@loic-sharma loic-sharma deleted the loshar-reposig-config branch July 26, 2018 01:58
joelverhagen pushed a commit that referenced this pull request Sep 27, 2019
Added HSTS header, removed the 'X-Powered-By'
joelverhagen pushed a commit that referenced this pull request Oct 26, 2020
Added HSTS header, removed the 'X-Powered-By'
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants