From 7e0ae3391ef560358cb9fc1a1e1c602083ab009b Mon Sep 17 00:00:00 2001 From: Christy Henriksson Date: Fri, 5 Oct 2018 10:37:50 -0700 Subject: [PATCH 1/3] Fix EntitiesContext creation (#574) --- src/NuGet.Services.Revalidate/Job.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/NuGet.Services.Revalidate/Job.cs b/src/NuGet.Services.Revalidate/Job.cs index d0fafb4a3..70155403a 100644 --- a/src/NuGet.Services.Revalidate/Job.cs +++ b/src/NuGet.Services.Revalidate/Job.cs @@ -4,7 +4,7 @@ using System; using System.Collections.Generic; using System.ComponentModel.Design; -using System.Data.SqlClient; +using System.Data.Common; using System.IO; using System.Linq; using System.Threading.Tasks; @@ -120,9 +120,10 @@ protected override void ConfigureJobServices(IServiceCollection services, IConfi services.AddScoped(provider => { - var config = provider.GetRequiredService>().Value; + var connectionFactory = provider.GetRequiredService>(); + var connection = connectionFactory.CreateAsync().GetAwaiter().GetResult(); - return new GalleryContext(config.ConnectionString, readOnly: false); + return new GalleryContext(connection, readOnly: false); }); // Core From 7cf33fcf128330b407bd5b2f2242d260fa0c2963 Mon Sep 17 00:00:00 2001 From: Christy Henriksson Date: Tue, 9 Oct 2018 09:39:21 -0700 Subject: [PATCH 2/3] Revert "SQL AAD config for validation jobs (#562)" (#577) This reverts commit a2160452175b7b0364262a2e99f8d1f027373307. --- src/NuGet.Services.Revalidate/Settings/dev.json | 4 ++-- src/NuGet.Services.Revalidate/Settings/int.json | 4 ++-- src/NuGet.Services.Revalidate/Settings/prod.json | 4 ++-- src/PackageHash/Settings/dev.json | 2 +- src/PackageHash/Settings/int.json | 2 +- src/PackageHash/Settings/prod.json | 2 +- .../Settings/dev.json | 4 ++-- .../Settings/int.json | 4 ++-- .../Settings/prod.json | 4 ++-- .../Settings/dev.json | 2 +- .../Settings/int.json | 2 +- .../Settings/prod.json | 2 +- .../Settings/dev.json | 2 +- .../Settings/int.json | 2 +- .../Settings/prod.json | 2 +- src/Validation.Symbols/Settings/dev.json | 2 +- src/Validation.Symbols/Settings/int.json | 2 +- src/Validation.Symbols/Settings/prod.json | 2 +- 18 files changed, 24 insertions(+), 24 deletions(-) diff --git a/src/NuGet.Services.Revalidate/Settings/dev.json b/src/NuGet.Services.Revalidate/Settings/dev.json index 600bbcf12..7f4c60e58 100644 --- a/src/NuGet.Services.Revalidate/Settings/dev.json +++ b/src/NuGet.Services.Revalidate/Settings/dev.json @@ -33,10 +33,10 @@ }, "GalleryDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.GalleryDatabaseAddress};Initial Catalog=nuget-dev-0-v2gallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Revalidate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbReader.ClientId};AadCertificate=$$dev-gallerydb-reader$$" + "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.GalleryDatabaseAddress};Initial Catalog=nuget-dev-0-v2gallery;Integrated Security=False;User ID=$$Dev-GalleryDBReadOnly-UserName$$;Password=$$Dev-GalleryDBReadOnly-Password$$;Connect Timeout=30;Encrypt=True" }, "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.DatabaseAddress};Initial Catalog=nuget-dev-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Revalidate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$dev-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.DatabaseAddress};Initial Catalog=nuget-dev-validation;Integrated Security=False;User ID=$$Dev-ValidationDBWriter-UserName$$;Password=$$Dev-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ValidationStorage": { "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=nugetdevlegacy;AccountKey=$$Dev-NuGetDevLegacyStorage-Key$$" diff --git a/src/NuGet.Services.Revalidate/Settings/int.json b/src/NuGet.Services.Revalidate/Settings/int.json index 49c252aea..8fafcf4dd 100644 --- a/src/NuGet.Services.Revalidate/Settings/int.json +++ b/src/NuGet.Services.Revalidate/Settings/int.json @@ -33,10 +33,10 @@ }, "GalleryDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.GalleryDatabaseAddress};Initial Catalog=nuget-int-0-v2gallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Revalidate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbReader.ClientId};AadCertificate=$$int-gallerydb-reader$$" + "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.GalleryDatabaseAddress};Initial Catalog=nuget-int-0-v2gallery;Integrated Security=False;User ID=$$Int-GalleryDBReadOnly-UserName$$;Password=$$Int-GalleryDBReadOnly-Password$$;Connect Timeout=30;Encrypt=True" }, "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.DatabaseAddress};Initial Catalog=nuget-int-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Revalidate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$int-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.DatabaseAddress};Initial Catalog=nuget-int-validation;Integrated Security=False;User ID=$$Int-ValidationDBWriter-UserName$$;Password=$$Int-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ValidationStorage": { "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=nugetint0;AccountKey=$$Int-NuGetInt0Storage-Key$$" diff --git a/src/NuGet.Services.Revalidate/Settings/prod.json b/src/NuGet.Services.Revalidate/Settings/prod.json index dee5decbe..6dc0c5ef5 100644 --- a/src/NuGet.Services.Revalidate/Settings/prod.json +++ b/src/NuGet.Services.Revalidate/Settings/prod.json @@ -33,10 +33,10 @@ }, "GalleryDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.GalleryDatabaseAddress};Initial Catalog=NuGetGallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Revalidate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbReader.ClientId};AadCertificate=$$prod-gallerydb-reader$$" + "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.GalleryDatabaseAddress};Initial Catalog=NuGetGallery;Integrated Security=False;User ID=$$Prod-GalleryDBReadOnly-UserName$$;Password=$$Prod-GalleryDBReadOnly-Password$$;Connect Timeout=30;Encrypt=True" }, "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.DatabaseAddress};Initial Catalog=nuget-prod-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Revalidate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$prod-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.nuget.services.revalidate.DatabaseAddress};Initial Catalog=nuget-prod-validation;Integrated Security=False;User ID=$$Prod-ValidationDBWriter-UserName$$;Password=$$Prod-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ValidationStorage": { "ConnectionString": "DefaultEndpointsProtocol=https;AccountName=nugetgallery;AccountKey=$$Prod-NuGetGalleryStorage-Key$$" diff --git a/src/PackageHash/Settings/dev.json b/src/PackageHash/Settings/dev.json index 96f0e2777..5cbfad94d 100644 --- a/src/PackageHash/Settings/dev.json +++ b/src/PackageHash/Settings/dev.json @@ -1,6 +1,6 @@ { "GalleryDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=nuget-dev-0-v2gallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=PackageHash;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbReader.ClientId};AadCertificate=$$dev-gallerydb-reader$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=nuget-dev-0-v2gallery;Integrated Security=False;User ID=$$Dev-GalleryDBReadOnly-UserName$$;Password=$$Dev-GalleryDBReadOnly-Password$$;Connect Timeout=30;Encrypt=True" }, "PackageHash": { "BatchSize": 1000, diff --git a/src/PackageHash/Settings/int.json b/src/PackageHash/Settings/int.json index 6caa2c28c..e7b2b42d6 100644 --- a/src/PackageHash/Settings/int.json +++ b/src/PackageHash/Settings/int.json @@ -1,6 +1,6 @@ { "GalleryDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=nuget-int-0-v2gallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=PackageHash;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbReader.ClientId};AadCertificate=$$int-gallerydb-reader$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=nuget-int-0-v2gallery;Integrated Security=False;User ID=$$Int-GalleryDBReadonly-UserName$$;Password=$$Int-GalleryDBReadonly-Password$$;Connect Timeout=30;Encrypt=True" }, "PackageHash": { "BatchSize": 1000, diff --git a/src/PackageHash/Settings/prod.json b/src/PackageHash/Settings/prod.json index 54fcbdc58..159ca93c8 100644 --- a/src/PackageHash/Settings/prod.json +++ b/src/PackageHash/Settings/prod.json @@ -1,6 +1,6 @@ { "GalleryDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=NuGetGallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=PackageHash;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbReader.ClientId};AadCertificate=$$prod-gallerydb-reader$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=NuGetGallery;Integrated Security=False;User ID=$$Prod-GalleryDBReadonly-UserName$$;Password=$$Prod-GalleryDBReadonly-Password$$;Connect Timeout=30;Encrypt=True" }, "PackageHash": { "BatchSize": 1000, diff --git a/src/Validation.PackageSigning.ProcessSignature/Settings/dev.json b/src/Validation.PackageSigning.ProcessSignature/Settings/dev.json index 74f497787..c0f0520ae 100644 --- a/src/Validation.PackageSigning.ProcessSignature/Settings/dev.json +++ b/src/Validation.PackageSigning.ProcessSignature/Settings/dev.json @@ -1,9 +1,9 @@ { "GalleryDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=nuget-dev-0-v2gallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=ProcessSignature;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbWriter.ClientId};AadCertificate=$$dev-gallerydb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=nuget-dev-0-v2gallery;Integrated Security=False;User ID=$$Dev-GalleryDBWriter-UserName$$;Password=$$Dev-GalleryDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-dev-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=ProcessSignature;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$dev-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-dev-validation;Integrated Security=False;User ID=$$Dev-ValidationDBWriter-UserName$$;Password=$$Dev-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetdev.servicebus.windows.net/;SharedAccessKeyName=extract-and-validate-signature;SharedAccessKey=$$Dev-ServiceBus-SharedAccessKey-Validation-ExtractAndValidatePackageSignature$$", diff --git a/src/Validation.PackageSigning.ProcessSignature/Settings/int.json b/src/Validation.PackageSigning.ProcessSignature/Settings/int.json index fc7de812f..a9a2de050 100644 --- a/src/Validation.PackageSigning.ProcessSignature/Settings/int.json +++ b/src/Validation.PackageSigning.ProcessSignature/Settings/int.json @@ -1,9 +1,9 @@ { "GalleryDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=nuget-int-0-v2gallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=ProcessSignature;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbWriter.ClientId};AadCertificate=$$int-gallerydb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=nuget-int-0-v2gallery;Integrated Security=False;User ID=$$Int-GalleryDBWriter-UserName$$;Password=$$Int-GalleryDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-int-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=ProcessSignature;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$int-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-int-validation;Integrated Security=False;User ID=$$Int-ValidationDBWriter-UserName$$;Password=$$Int-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetint.servicebus.windows.net/;SharedAccessKeyName=extract-and-validate-signature;SharedAccessKey=$$Int-ServiceBus-SharedAccessKey-Validation-ExtractAndValidatePackageSignature$$", diff --git a/src/Validation.PackageSigning.ProcessSignature/Settings/prod.json b/src/Validation.PackageSigning.ProcessSignature/Settings/prod.json index 87843e1a3..82d7a6afe 100644 --- a/src/Validation.PackageSigning.ProcessSignature/Settings/prod.json +++ b/src/Validation.PackageSigning.ProcessSignature/Settings/prod.json @@ -1,9 +1,9 @@ { "GalleryDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=NuGetGallery;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=ProcessSignature;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.GalleryDbWriter.ClientId};AadCertificate=$$prod-gallerydb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.GalleryDatabaseAddress};Initial Catalog=NuGetGallery;Integrated Security=False;User ID=$$Prod-GalleryDBWriter-UserName$$;Password=$$Prod-GalleryDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-prod-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=ProcessSignature;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$prod-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-prod-validation;Integrated Security=False;User ID=$$Prod-ValidationDBWriter-UserName$$;Password=$$Prod-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetprod.servicebus.windows.net/;SharedAccessKeyName=extract-and-validate-signature;SharedAccessKey=$$Prod-ServiceBus-SharedAccessKey-Validation-ExtractAndValidatePackageSignature$$", diff --git a/src/Validation.PackageSigning.RevalidateCertificate/Settings/dev.json b/src/Validation.PackageSigning.RevalidateCertificate/Settings/dev.json index c12babcfc..450bad094 100644 --- a/src/Validation.PackageSigning.RevalidateCertificate/Settings/dev.json +++ b/src/Validation.PackageSigning.RevalidateCertificate/Settings/dev.json @@ -10,7 +10,7 @@ }, "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-dev-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=RevalidateCertificate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$dev-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-dev-validation;Integrated Security=False;User ID=$$Dev-ValidationDBWriter-UserName$$;Password=$$Dev-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetdev.servicebus.windows.net/;SharedAccessKeyName=package-certificates-validator;SharedAccessKey=$$Dev-ServiceBus-SharedAccessKey-Validation-CertificatesValidator$$", diff --git a/src/Validation.PackageSigning.RevalidateCertificate/Settings/int.json b/src/Validation.PackageSigning.RevalidateCertificate/Settings/int.json index 57e9958c4..b287ca48d 100644 --- a/src/Validation.PackageSigning.RevalidateCertificate/Settings/int.json +++ b/src/Validation.PackageSigning.RevalidateCertificate/Settings/int.json @@ -10,7 +10,7 @@ }, "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-int-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=RevalidateCertificate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$int-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-int-validation;Integrated Security=False;User ID=$$Int-ValidationDBWriter-UserName$$;Password=$$Int-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetint.servicebus.windows.net/;SharedAccessKeyName=package-certificates-validator;SharedAccessKey=$$Int-ServiceBus-SharedAccessKey-Validation-CertificatesValidator$$", diff --git a/src/Validation.PackageSigning.RevalidateCertificate/Settings/prod.json b/src/Validation.PackageSigning.RevalidateCertificate/Settings/prod.json index 0c26b05c6..90acbfa87 100644 --- a/src/Validation.PackageSigning.RevalidateCertificate/Settings/prod.json +++ b/src/Validation.PackageSigning.RevalidateCertificate/Settings/prod.json @@ -10,7 +10,7 @@ }, "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-prod-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=RevalidateCertificate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$prod-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-prod-validation;Integrated Security=False;User ID=$$Prod-ValidationDBWriter-UserName$$;Password=$$Prod-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetprod.servicebus.windows.net/;SharedAccessKeyName=package-certificates-validator;SharedAccessKey=$$Prod-ServiceBus-SharedAccessKey-Validation-CertificatesValidator$$", diff --git a/src/Validation.PackageSigning.ValidateCertificate/Settings/dev.json b/src/Validation.PackageSigning.ValidateCertificate/Settings/dev.json index f8a4c6756..ce817f9c6 100644 --- a/src/Validation.PackageSigning.ValidateCertificate/Settings/dev.json +++ b/src/Validation.PackageSigning.ValidateCertificate/Settings/dev.json @@ -1,6 +1,6 @@ { "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-dev-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=ValidateCertificate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$dev-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-dev-validation;Integrated Security=False;User ID=$$Dev-ValidationDBWriter-UserName$$;Password=$$Dev-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetdev.servicebus.windows.net/;SharedAccessKeyName=validate-certificate;SharedAccessKey=$$Dev-ServiceBus-SharedAccessKey-Validation-ValidateCertificate$$", diff --git a/src/Validation.PackageSigning.ValidateCertificate/Settings/int.json b/src/Validation.PackageSigning.ValidateCertificate/Settings/int.json index 0e8cd4eb0..e0d07bf17 100644 --- a/src/Validation.PackageSigning.ValidateCertificate/Settings/int.json +++ b/src/Validation.PackageSigning.ValidateCertificate/Settings/int.json @@ -1,6 +1,6 @@ { "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-int-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=ValidateCertificate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$int-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-int-validation;Integrated Security=False;User ID=$$Int-ValidationDBWriter-UserName$$;Password=$$Int-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetint.servicebus.windows.net/;SharedAccessKeyName=validate-certificate;SharedAccessKey=$$Int-ServiceBus-SharedAccessKey-Validation-ValidateCertificate$$", diff --git a/src/Validation.PackageSigning.ValidateCertificate/Settings/prod.json b/src/Validation.PackageSigning.ValidateCertificate/Settings/prod.json index 6dce42428..e5c810c2a 100644 --- a/src/Validation.PackageSigning.ValidateCertificate/Settings/prod.json +++ b/src/Validation.PackageSigning.ValidateCertificate/Settings/prod.json @@ -1,6 +1,6 @@ { "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-prod-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=ValidateCertificate;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$prod-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-prod-validation;Integrated Security=False;User ID=$$Prod-ValidationDBWriter-UserName$$;Password=$$Prod-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetprod.servicebus.windows.net/;SharedAccessKeyName=validate-certificate;SharedAccessKey=$$Prod-ServiceBus-SharedAccessKey-Validation-ValidateCertificate$$", diff --git a/src/Validation.Symbols/Settings/dev.json b/src/Validation.Symbols/Settings/dev.json index b763c276b..348d1e4d7 100644 --- a/src/Validation.Symbols/Settings/dev.json +++ b/src/Validation.Symbols/Settings/dev.json @@ -1,6 +1,6 @@ { "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-dev-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Validation.Symbols;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$dev-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-dev-validation;Integrated Security=False;User ID=$$Dev-ValidationDBWriter-UserName$$;Password=$$Dev-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetdev.servicebus.windows.net/;SharedAccessKeyName=validator;SharedAccessKey=$$Dev-ServiceBus-SharedAccessKey-SymbolValidator-ValidatorListener$$", diff --git a/src/Validation.Symbols/Settings/int.json b/src/Validation.Symbols/Settings/int.json index 150e6f9fa..e7d1c6c9c 100644 --- a/src/Validation.Symbols/Settings/int.json +++ b/src/Validation.Symbols/Settings/int.json @@ -1,6 +1,6 @@ { "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-int-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Validation.Symbols;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$int-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-int-validation;Integrated Security=False;User ID=$$Int-ValidationDBWriter-UserName$$;Password=$$Int-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetint.servicebus.windows.net/;SharedAccessKeyName=validator;SharedAccessKey=$$Int-ServiceBus-SharedAccessKey-SymbolValidator-ValidatorListener$$", diff --git a/src/Validation.Symbols/Settings/prod.json b/src/Validation.Symbols/Settings/prod.json index 94eb6c8dc..c37b3ca8f 100644 --- a/src/Validation.Symbols/Settings/prod.json +++ b/src/Validation.Symbols/Settings/prod.json @@ -1,6 +1,6 @@ { "ValidationDb": { - "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-prod-validation;Persist Security Info=False;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False;Application Name=Validation.Symbols;AadTenant=#{Deployment.Azure.ActiveDirectory.Tenant};AadClientId=#{Deployment.Azure.ActiveDirectory.ValidationDbWriter.ClientId};AadCertificate=$$prod-validationdb-writer$$" + "ConnectionString": "Data Source=tcp:#{Jobs.validation.DatabaseAddress};Initial Catalog=nuget-prod-validation;Integrated Security=False;User ID=$$Prod-ValidationDBWriter-UserName$$;Password=$$Prod-ValidationDBWriter-Password$$;Connect Timeout=30;Encrypt=True" }, "ServiceBus": { "ConnectionString": "Endpoint=sb://nugetprod.servicebus.windows.net/;SharedAccessKeyName=validator;SharedAccessKey=$$Prod-ServiceBus-SharedAccessKey-SymbolValidator-ValidatorListener$$", From 05ba525621070f49e37ab2d94c599c323b346e00 Mon Sep 17 00:00:00 2001 From: cmanu Date: Fri, 12 Oct 2018 16:03:18 -0700 Subject: [PATCH 3/3] Update auxiliary storage for dev and prod. (#582) --- src/Search.GenerateAuxiliaryData/Settings/dev.json | 2 +- src/Search.GenerateAuxiliaryData/Settings/prod.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Search.GenerateAuxiliaryData/Settings/dev.json b/src/Search.GenerateAuxiliaryData/Settings/dev.json index 939e2a27e..e44f78bca 100644 --- a/src/Search.GenerateAuxiliaryData/Settings/dev.json +++ b/src/Search.GenerateAuxiliaryData/Settings/dev.json @@ -2,7 +2,7 @@ "Initialization": { "AzureCdnCloudStorageAccount": "DefaultEndpointsProtocol=https;AccountName=nugetdevlegacy;AccountKey=$$Dev-NuGetDevLegacyStorage-Key$$", "AzureCdnCloudStorageContainerName": "nuget-cdnstats", - "PrimaryDestination": "DefaultEndpointsProtocol=https;AccountName=nugetdevlegacy;AccountKey=$$Dev-NuGetDevLegacyStorage-Key$$" + "PrimaryDestination": "DefaultEndpointsProtocol=https;AccountName=nugetdev0;AccountKey=$$Dev-NuGetDev0Storage-Key$$" }, "GalleryDb": { diff --git a/src/Search.GenerateAuxiliaryData/Settings/prod.json b/src/Search.GenerateAuxiliaryData/Settings/prod.json index 7c4d81b62..941f2af62 100644 --- a/src/Search.GenerateAuxiliaryData/Settings/prod.json +++ b/src/Search.GenerateAuxiliaryData/Settings/prod.json @@ -2,7 +2,7 @@ "Initialization": { "AzureCdnCloudStorageAccount": "DefaultEndpointsProtocol=https;AccountName=nugetgallery;AccountKey=$$Prod-NuGetGalleryStorage-Key$$", "AzureCdnCloudStorageContainerName": "nuget-cdnstats", - "PrimaryDestination": "DefaultEndpointsProtocol=https;AccountName=nugetgallery;AccountKey=$$Prod-NuGetGalleryStorage-Key$$" + "PrimaryDestination": "DefaultEndpointsProtocol=https;AccountName=nugetprod0;AccountKey=$$Prod-NuGetProd0Storage-Key$$" }, "GalleryDb": {