Skip to content

Commit 14a3512

Browse files
Added managed identities for ACR container pulls (#3463)
* Update vsts.yaml for Azure Pipelines * Update vsts.yaml * Update azure identity versions * Use the non-deprecated bouncy castle library. update other outdated deps as well * fix warnings --------- Co-authored-by: timtay-microsoft <[email protected]>
1 parent 5be210c commit 14a3512

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

e2e/test/E2ETests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
</ItemGroup>
5050
<ItemGroup Condition=" '$(TargetFramework)' != 'net451' ">
5151
<PackageReference Include="Microsoft.Azure.Storage.Blob" Version="11.1.3" />
52-
<PackageReference Include="Azure.Identity" Version="1.11.2" />
52+
<PackageReference Include="Azure.Identity" Version="1.12.0" />
5353
</ItemGroup>
5454

5555
<ItemGroup Condition=" '$(AZURE_IOT_LOCALPACKAGES)' == '' ">

iothub/service/samples/how to guides/AzureSasCredentialAuthenticationSample/AzureSasCredentialAuthenticationSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Azure.Core" Version="1.36.0" />
10+
<PackageReference Include="Azure.Core" Version="1.40.0" />
1111
<PackageReference Include="CommandLineParser" Version="2.9.1" />
1212
</ItemGroup>
1313

iothub/service/samples/how to guides/RoleBasedAuthenticationSample/RoleBasedAuthenticationSample.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
</PropertyGroup>
88

99
<ItemGroup>
10-
<PackageReference Include="Azure.Core" Version="1.39.0" />
11-
<PackageReference Include="Azure.Identity" Version="1.11.2" />
10+
<PackageReference Include="Azure.Core" Version="1.40.0" />
11+
<PackageReference Include="Azure.Identity" Version="1.12.0" />
1212
<PackageReference Include="CommandLineParser" Version="2.9.1" />
1313
</ItemGroup>
1414

provisioning/service/samples/how to guides/GroupCertificateVerificationSample/GroupCertificateVerificationSample.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
</PropertyGroup>
77

88
<ItemGroup>
9-
<PackageReference Include="BouncyCastle" Version="1.8.9">
9+
<PackageReference Include="BouncyCastle.Cryptography" Version="2.4.0">
1010
<NoWarn>NU1701</NoWarn>
1111
</PackageReference>
1212
</ItemGroup>

provisioning/service/samples/how to guides/GroupCertificateVerificationSample/VerificationCertificateGenerator.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ private static X509Certificate2 GenerateAndSignCertificate(
6969
X509Name issuerName,
7070
AsymmetricKeyParameter privateSigningKey)
7171
{
72-
var randomGenerator = new CryptoApiRandomGenerator();
72+
using var randomGenerator = new CryptoApiRandomGenerator();
7373
var random = new SecureRandom(randomGenerator);
7474
var certGenerator = new X509V3CertificateGenerator();
7575

@@ -92,11 +92,11 @@ private static X509Certificate2 GenerateAndSignCertificate(
9292
certGenerator.SetNotAfter(notAfter);
9393

9494
certGenerator.AddExtension(
95-
X509Extensions.ExtendedKeyUsage,
96-
true,
97-
ExtendedKeyUsage.GetInstance(new DerSequence(KeyPurposeID.IdKPClientAuth)));
95+
X509Extensions.ExtendedKeyUsage,
96+
true,
97+
ExtendedKeyUsage.GetInstance(new DerSequence(KeyPurposeID.id_kp_clientAuth)));
9898

99-
ISignatureFactory signatureFactory =
99+
ISignatureFactory signatureFactory =
100100
new Asn1SignatureFactory("SHA256WITHECDSA", privateSigningKey, random);
101101

102102
Org.BouncyCastle.X509.X509Certificate certificate = certGenerator.Generate(signatureFactory);

vsts/vsts.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ jobs:
7777
SHOULD_RUN: ${{ eq(variables['testNet80'], 'True') }}
7878
pool:
7979
# If this is changed, don't forget to update supported_platforms.md in the root directory. That document outlines what OS we test on and should stay up to date.
80-
vmImage: ubuntu-20.04
80+
name: 'sdk-net--ubuntu-20'
8181
steps:
8282
- task: PowerShell@2
8383
displayName: 'Print vars'

0 commit comments

Comments
 (0)