Skip to content

Commit

Permalink
Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
brendankowitz committed Jan 7, 2025
1 parent a1ea4c6 commit 61e41fe
Show file tree
Hide file tree
Showing 13 changed files with 73 additions and 54 deletions.
94 changes: 57 additions & 37 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
@@ -1,39 +1,59 @@
<Project>
<!-- Shared dependencies versions.-->
<PropertyGroup>
<HealthcareSharedPackageVersion>7.1.183</HealthcareSharedPackageVersion>
<HealthcareSharedPackageVersion>8.0.18</HealthcareSharedPackageVersion>
<Hl7FhirVersion>4.3.0</Hl7FhirVersion>
</PropertyGroup>
<ItemGroup Label="CVE Mitigation">
<!--Please include the CGA id if possible-->
<PackageVersion Include="System.Security.Cryptography.Xml" Version="8.0.2" />
<!--CVE-2023-29331-->
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="8.0.1" />
<!-- CVE-2021-26701 -->
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
<!-- CVE-2020-1045 -->
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<!-- CVE-2022-26907 -->
<PackageVersion Include="Microsoft.Rest.ClientRuntime" Version="2.3.24" />
</ItemGroup>
<!-- SDK Packages -->
<Choose>
<When Condition="'$(TargetFramework)' == 'net9.0'">
<When Condition="'$(TargetFramework)' == 'net6.0'">
<PropertyGroup>
<AspNetPackageVersion>9.0.0</AspNetPackageVersion>
<ConfigurationBinderVersion>8.0.2</ConfigurationBinderVersion>
<DependencyInjectionVersion>8.0.2</DependencyInjectionVersion>
<LoggingVersion>8.0.2</LoggingVersion>
<!-- >= 12.2.0 MediatR started depending on 8.x Microsoft.Extension.* libraries -->
<MediatRVersion>12.4.1</MediatRVersion>
<OptionsVersion>8.0.2</OptionsVersion>
<SdkPackageVersion>8.0.0</SdkPackageVersion>
<AspNetPackageVersion>6.0.0</AspNetPackageVersion>
</PropertyGroup>
</When>
<When Condition="'$(TargetFramework)' == 'net8.0'">
<PropertyGroup>
<ConfigurationBinderVersion>8.0.2</ConfigurationBinderVersion>
<DependencyInjectionVersion>8.0.2</DependencyInjectionVersion>
<LoggingVersion>8.0.2</LoggingVersion>
<!-- >= 12.2.0 MediatR started depending on 8.x Microsoft.Extension.* libraries -->
<MediatRVersion>12.4.1</MediatRVersion>
<OptionsVersion>8.0.2</OptionsVersion>
<SdkPackageVersion>8.0.0</SdkPackageVersion>
<AspNetPackageVersion>8.0.0</AspNetPackageVersion>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<AspNetPackageVersion>6.0.23</AspNetPackageVersion>
<ConfigurationBinderVersion>9.0.0</ConfigurationBinderVersion>
<DependencyInjectionVersion>9.0.0</DependencyInjectionVersion>
<LoggingVersion>9.0.0</LoggingVersion>
<MediatRVersion>12.4.1</MediatRVersion>
<OptionsVersion>9.0.0</OptionsVersion>
<SdkPackageVersion>9.0.0</SdkPackageVersion>
<AspNetPackageVersion>9.0.0</AspNetPackageVersion>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemGroup Label="CVE Mitigation">
<!--Please include the CGA id if possible-->
<PackageVersion Include="System.Security.Cryptography.Xml" Version="8.0.2" />
<!--CVE-2023-29331-->
<PackageVersion Include="System.Security.Cryptography.Pkcs" Version="8.0.1" />
<!-- CVE-2021-26701 -->
<PackageVersion Include="System.Text.Encodings.Web" Version="8.0.0" />
<!-- CVE-2020-1045 -->
<PackageVersion Include="Microsoft.AspNetCore.Http" Version="2.2.2" />
<!-- CVE-2022-26907 -->
<PackageVersion Include="Microsoft.Rest.ClientRuntime" Version="2.3.24" />
</ItemGroup>
<ItemGroup>
<PackageVersion Include="AngleSharp" Version="1.1.2" />
<PackageVersion Include="Azure.Identity" Version="1.13.1" />
Expand All @@ -57,7 +77,7 @@
<PackageVersion Include="Hl7.Fhir.Support.Poco" Version="$(Hl7FhirVersion)" />
<PackageVersion Include="Hl7.FhirPath" Version="$(Hl7FhirVersion)" />
<PackageVersion Include="IdentityServer4" Version="4.1.2" />
<PackageVersion Include="MediatR" Version="12.4.1" />
<PackageVersion Include="MediatR" Version="$(MediatRVersion)" />
<PackageVersion Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.22.0" />
<PackageVersion Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="$(AspNetPackageVersion)" />
<PackageVersion Include="Microsoft.AspNetCore.JsonPatch" Version="$(AspNetPackageVersion)" />
Expand All @@ -68,22 +88,23 @@
<PackageVersion Include="Microsoft.Azure.ContainerRegistry" Version="1.0.0-preview.2" />
<PackageVersion Include="Microsoft.Azure.Cosmos" Version="3.45.2" />
<PackageVersion Include="Microsoft.Azure.Storage.Blob" Version="11.2.3" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="8.0.1" />
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="8.0.8" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="8.0.7" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="8.0.10" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="8.0.8" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="8.0.1" />
<PackageVersion Include="Microsoft.Data.SqlClient" Version="5.2.2" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Binder" Version="$(ConfigurationBinderVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.CommandLine" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration.Json" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Configuration" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.FileProviders.Embedded" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Hosting.Abstractions" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Http.Polly" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Http" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging.Abstractions" Version="$(LoggingVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging.ApplicationInsights" Version="2.22.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="8.10.0" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Logging" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="$(SdkPackageVersion)" />
<PackageVersion Include="Microsoft.Health.Abstractions" Version="$(HealthcareSharedPackageVersion)" />
<PackageVersion Include="Microsoft.Health.Api" Version="$(HealthcareSharedPackageVersion)" />
<PackageVersion Include="Microsoft.Health.Client" Version="$(HealthcareSharedPackageVersion)" />
Expand All @@ -102,8 +123,8 @@
<PackageVersion Include="Microsoft.IO.RecyclableMemoryStream" Version="3.0.1" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Microsoft.SqlServer.DACFx" Version="162.0.52" />
<PackageVersion Include="Microsoft.SqlServer.SqlManagementObjects" Version="171.30.0" />
<PackageVersion Include="Microsoft.SqlServer.DACFx" Version="162.5.57" />
<PackageVersion Include="Microsoft.SqlServer.SqlManagementObjects" Version="172.52.0" />
<PackageVersion Include="Newtonsoft.Json.Schema" Version="4.0.1" />
<PackageVersion Include="Newtonsoft.Json" Version="13.0.3" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
Expand All @@ -115,9 +136,8 @@
<PackageVersion Include="System.Collections.Immutable" Version="8.0.0" />
<PackageVersion Include="System.CommandLine.NamingConventionBinder" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.CommandLine" Version="2.0.0-beta4.22272.1" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="8.0.0" />
<PackageVersion Include="System.Data.SqlClient" Version="4.8.6" />
<PackageVersion Include="System.Diagnostics.PerformanceCounter" Version="8.0.0" />
<PackageVersion Include="System.Configuration.ConfigurationManager" Version="$(SdkPackageVersion)" />
<PackageVersion Include="System.Diagnostics.PerformanceCounter" Version="$(SdkPackageVersion)" />
<PackageVersion Include="System.IdentityModel.Tokens.Jwt" Version="8.1.2" />
<PackageVersion Include="System.IO.FileSystem.AccessControl" Version="5.0.0" />
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
Expand Down
7 changes: 1 addition & 6 deletions build/docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ ARG TARGETARCH
ARG FHIR_VERSION
ARG ASSEMBLY_VER

RUN groupadd nonroot -g 1000 && useradd -r -M -s /sbin/nologin -g nonroot -c nonroot nonroot -u 998

WORKDIR /repo

COPY .editorconfig \
Expand Down Expand Up @@ -79,7 +77,7 @@ COPY . .
RUN dotnet publish /repo/src/Microsoft.Health.Fhir.${FHIR_VERSION}.Web/Microsoft.Health.Fhir.${FHIR_VERSION}.Web.csproj -o "/build" --no-restore -p:AssemblyVersion="${ASSEMBLY_VER}" -p:FileVersion="${ASSEMBLY_VER}" -p:Version="${ASSEMBLY_VER}" -f net9.0 -a $TARGETARCH

# Implicitly uses the target platform for the runtime image.
FROM mcr.microsoft.com/dotnet/aspnet:9.0.0-azurelinux3.0-distroless AS runtime
FROM mcr.microsoft.com/dotnet/aspnet:9.0.0-azurelinux3.0 AS runtime

ARG FHIR_VERSION

Expand All @@ -90,9 +88,6 @@ RUN tdnf clean all && tdnf repolist --refresh && tdnf update -y && tdnf clean al
RUN tdnf install icu -y && \
tdnf clean all

COPY --from=build /etc/group /etc/group
COPY --from=build /etc/passwd /etc/passwd

ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=false \
ASPNETCORE_URLS=http://+:8080

Expand Down
2 changes: 1 addition & 1 deletion build/dotnet6-compat/global.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"sdk": {
"version": "6.0.427"
"version": "6.0.428"
}
}
2 changes: 1 addition & 1 deletion build/jobs/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:
workingDirectory: "$(System.ArtifactsDirectory)"
testRunTitle: '${{ parameters.version }} Integration'
env:
'SqlServer:ConnectionString': 'Server=tcp:${{ parameters.integrationSqlServerName }}.database.windows.net,1433;Initial Catalog=master;Persist Security Info=False;Authentication=Active Directory Workload Identity;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;User Id=$(AZURESUBSCRIPTION_CLIENT_ID);'
'SqlServer:ConnectionString': 'Server=tcp:${{ parameters.integrationSqlServerName }}.database.windows.net,1433;Initial Catalog=master;Persist Security Info=False;Authentication=ActiveDirectoryWorkloadIdentity;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;User Id=$(AZURESUBSCRIPTION_CLIENT_ID);'
'AZURESUBSCRIPTION_CLIENT_ID': '$(AZURESUBSCRIPTION_CLIENT_ID)'
'AZURESUBSCRIPTION_TENANT_ID': '$(AZURESUBSCRIPTION_TENANT_ID)'
'AZURESUBSCRIPTION_SERVICE_CONNECTION_ID': '$(AZURESUBSCRIPTION_SERVICE_CONNECTION_ID)'
Expand Down
2 changes: 1 addition & 1 deletion samples/templates/default-azuredeploy-docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@
"apiVersion": "2015-06-01",
"properties": {
"contentType": "text/plain",
"value": "[concat('Server=tcp:', if(equals(parameters('solutionType'),'FhirServerSqlServer'), reference(variables('computedSqlServerReference'), '2015-05-01-preview').fullyQualifiedDomainName, ''),',1433;Initial Catalog=',variables('sqlDatabaseName'),';Persist Security Info=False;Authentication=ActiveDirectoryMsi;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;User Id=', reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('managedIdentityName')), '2018-11-30').clientId, ';')]"
"value": "[concat('Server=tcp:', if(equals(parameters('solutionType'),'FhirServerSqlServer'), reference(variables('computedSqlServerReference'), '2015-05-01-preview').fullyQualifiedDomainName, ''),',1433;Initial Catalog=',variables('sqlDatabaseName'),';Persist Security Info=False;Authentication=ActiveDirectoryMSI;MultipleActiveResultSets=False;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;User Id=', reference(resourceId('Microsoft.ManagedIdentity/userAssignedIdentities', variables('managedIdentityName')), '2018-11-30').clientId, ';')]"
},
"dependsOn": [
"[resourceId('Microsoft.KeyVault/vaults', variables('serviceName'))]",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
using Azure.Identity;
using Microsoft.Data.SqlClient;
using Microsoft.Identity.Client;
using Microsoft.SqlServer.Dac;

namespace Microsoft.Health.Fhir.Tests.Integration.Persistence;

Expand Down
2 changes: 1 addition & 1 deletion tools/Exporter/Exporter.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<ItemGroup>
<PackageReference Include="Azure.Storage.Blobs" />
<PackageReference Include="System.Configuration.ConfigurationManager" />
<PackageReference Include="System.Data.SqlClient" />
<PackageReference Include="Microsoft.Data.SqlClient" />
<PackageReference Include="Microsoft.Health.SqlServer" />
</ItemGroup>

Expand Down
3 changes: 2 additions & 1 deletion tools/Exporter/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Azure.Storage.Blobs;
using Azure.Storage.Blobs.Specialized;
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.Server;
using Microsoft.Health.Fhir.SqlServer.Features;
using Microsoft.Health.Fhir.Store.Export;
using Microsoft.Health.Fhir.Store.Utils;
Expand Down
3 changes: 2 additions & 1 deletion tools/Exporter/SqlParamaterStringExtension.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@

using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.Server;
using Microsoft.SqlServer.Server;

namespace Microsoft.Health.Fhir.Store.Export
Expand Down
3 changes: 2 additions & 1 deletion tools/Exporter/SqlService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
// -------------------------------------------------------------------------------------------------
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Threading;
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.Server;
using Microsoft.Extensions.Logging.Abstractions;
using Microsoft.Health.Fhir.Core.Features.Operations;
using Microsoft.Health.Fhir.SqlServer.Features.Storage;
Expand Down
3 changes: 2 additions & 1 deletion tools/IndexRebuilder/IndexRebuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,9 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.Server;
using Microsoft.Health.Fhir.Store.Utils;

namespace Microsoft.Health.Internal.IndexRebuilder
Expand Down
2 changes: 1 addition & 1 deletion tools/IndexRebuilder/IndexRebuilder.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="System.Configuration.ConfigurationManager" />
<PackageReference Include="System.Data.SqlClient" />
<PackageReference Include="Microsoft.Data.SqlClient" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 2 additions & 1 deletion tools/IndexRebuilder/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@

using System;
using System.Configuration;
using System.Data.SqlClient;
using System.Diagnostics;
using Microsoft.Data.SqlClient;
using Microsoft.Data.SqlClient.Server;

namespace Microsoft.Health.Internal.IndexRebuilder
{
Expand Down

0 comments on commit 61e41fe

Please sign in to comment.