Skip to content

Commit

Permalink
Merge pull request #884 from eclipse-tractusx/chore/merge_to_main
Browse files Browse the repository at this point in the history
* fix(apps): remove leading '/' from the activate subscription endpoint (#861)
Refs: #856
* bug(offersubscription): suppress activation of external serviceaccounts in keycloak on subscription-activation (#864)
Refs: #856
* fix(dim): fix callback logic for dim requests (#863)
Refs: #862
chore(dependencies): bump efcore to 8.0.7 (#857)
* increase efcore version to latest 8.0.7 to resolve security-issue in transitive dependency in System.Text.Json
* fix(offersubscription): skip optional autosetupprovidercallback  if it is not configured (#865)
* add clientPrefix  to workers appsettings (#870)
* fix: enhance subscription/provider endpoint with external Service data (#867)
Refs: #841
* fix(sdDoc): set process step to skipped if ClearinghouseConnectDisabled is true (#874)
Refs: #792
* build(deps): bump MimeKit from 4.3.0 to 4.7.1 (#833)
eclipse-tractusx/portal#369
* build(deps): bump MimeKit from 4.3.0 to 4.7.1 in /tests/endtoend
Bumps MimeKit from 4.3.0 to 4.7.1.
---
updated-dependencies:
- dependency-name: MimeKit
  dependency-type: direct:production
...
* chore: upgrade mimekit in sendmail project
* chore: update dependencies file
---------
* upgrade implicit dependencies on System.Text.Json (#875)
* Serilog.Settings.Configuration to 8.0.2
* remove redundant dependencies on Microsoft.Extensions.Hosting
* bump framework version to 2.4.2 after merge of main
---------
Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Norbert Truchsess <[email protected]>
Co-authored-by: Phil Schneider <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Evelyn Gurschler <[email protected]>
Reviewed-By: Evelyn Gurschler <[email protected]>
Reviewed-By: Norbert Truchsess <[email protected]>
Reviewed-By: Phil Schneider <[email protected]>
  • Loading branch information
ntruchsess authored Jul 29, 2024
2 parents 53a4369 + 7f46c42 commit 9dfa228
Show file tree
Hide file tree
Showing 80 changed files with 311 additions and 151 deletions.
5 changes: 3 additions & 2 deletions DEPENDENCIES
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ nuget/nuget/-/AutoFixture.AutoFakeItEasy/4.18.1, MIT, approved, #10064
nuget/nuget/-/AutoFixture.Xunit/4.18.1, MIT, approved, #10082
nuget/nuget/-/AutoFixture/4.18.1, MIT, approved, #10057
nuget/nuget/-/BouncyCastle.Cryptography/2.2.1, MIT AND Apache-2.0 AND BSD-3-Clause AND LicenseRef-Permission-Notice, approved, #10066
nuget/nuget/-/BouncyCastle.Cryptography/2.4.0, MIT AND Apache-2.0 AND BSD-3-Clause AND LicenseRef-scancode-ietf-trust, approved, #15706
nuget/nuget/-/Castle.Core/5.1.1, Apache-2.0, approved, #13966
nuget/nuget/-/EFCore.NamingConventions/8.0.3, Apache-2.0, approved, #13983
nuget/nuget/-/FakeItEasy/8.1.0, MIT, approved, #13970
Expand All @@ -17,7 +18,7 @@ nuget/nuget/-/JsonSchema.Net/6.0.5, MIT AND OFL-1.1 AND CC-BY-SA-4.0, approved,
nuget/nuget/-/Laraue.EfCoreTriggers.Common/8.0.3, MIT, approved, #13968
nuget/nuget/-/Laraue.EfCoreTriggers.PostgreSql/8.0.3, MIT, approved, #13984
nuget/nuget/-/MailKit/4.3.0, MIT AND LicenseRef-scancode-ietf AND LicenseRef-scancode-ietf-trust AND (BSD-3-Clause AND LicenseRef-scancode-ietf-trust), approved, #13986
nuget/nuget/-/MimeKit/4.3.0, MIT AND FSFULLRWD AND LicenseRef-scancode-ietf AND LicenseRef-scancode-ietf-trust AND (BSD-3-Clause AND LicenseRef-scancode-ietf-trust) AND BSD-3-Clause AND MS-PL AND CC-BY-SA-4.0 AND LicenseRef-MIT-style AND CC-PDDC AND GPL-2.0-only, approved, #13987
nuget/nuget/-/MimeKit/4.7.1, MIT AND FSFULLRWD AND LicenseRef-scancode-ietf AND LicenseRef-scancode-ietf-trust AND (BSD-3-Clause AND LicenseRef-scancode-ietf-trust) AND BSD-3-Clause AND MS-PL AND CC-BY-SA-4.0 AND LicenseRef-MIT-style AND CC-PDDC AND GPL-2.0-only, approved, #15705
nuget/nuget/-/Mono.TextTemplating/2.2.1, MIT, approved, #15073
nuget/nuget/-/NHamcrest/3.4.0, MIT, approved, #13964
nuget/nuget/-/NJsonSchema/10.9.0, MIT, approved, #9300
Expand All @@ -41,7 +42,7 @@ nuget/nuget/-/Serilog.Enrichers.Thread/3.1.0, Apache-2.0, approved, clearlydefin
nuget/nuget/-/Serilog.Extensions.Hosting/8.0.0, Apache-2.0, approved, #13962
nuget/nuget/-/Serilog.Extensions.Logging/8.0.0, Apache-2.0, approved, #13985
nuget/nuget/-/Serilog.Formatting.Compact/2.0.0, Apache-2.0, approved, #13981
nuget/nuget/-/Serilog.Settings.Configuration/8.0.0, Apache-2.0, approved, #13988
nuget/nuget/-/Serilog.Settings.Configuration/8.0.2, Apache-2.0, approved, #13988
nuget/nuget/-/Serilog.Sinks.Console/5.0.0, Apache-2.0, approved, #13980
nuget/nuget/-/Serilog.Sinks.Console/5.0.1, Apache-2.0, approved, #13980
nuget/nuget/-/Serilog.Sinks.Debug/2.0.0, Apache-2.0, approved, clearlydefined
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.2">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,4 @@
<ProjectReference Include="..\..\processes\ApplicationChecklist.Library\ApplicationChecklist.Library.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,4 @@
<ProjectReference Include="..\..\processes\ApplicationChecklist.Library\ApplicationChecklist.Library.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -103,20 +103,22 @@ private async Task CreateWalletInternal(Guid applicationId, CancellationToken ca

public async Task ProcessDimResponse(string bpn, DimWalletData data, CancellationToken cancellationToken)
{
var (exists, companyId, companyApplicationStatusIds) = await _portalRepositories.GetInstance<ICompanyRepository>().GetCompanyIdByBpn(bpn).ConfigureAwait(ConfigureAwaitOptions.None);
if (!exists)
var companySubmittedApplicationIds = await _portalRepositories.GetInstance<ICompanyRepository>().GetCompanySubmittedApplicationIdsByBpn(bpn).ToListAsync(cancellationToken).ConfigureAwait(false);
if (companySubmittedApplicationIds.Count == 0)
{
throw new NotFoundException($"No company found for bpn {bpn}");
}

if (companyApplicationStatusIds.Count() != 1)
var companyApplicationIds = companySubmittedApplicationIds.SelectMany(x => x.SubmittedApplicationIds.Select(applicationId => (x.CompanyId, ApplicationId: applicationId)));
if (companyApplicationIds.Count() != 1)
{
throw new ConflictException($"There must be exactly one company application in state {CompanyApplicationStatusId.SUBMITTED}");
}

var (companyId, applicationId) = companyApplicationIds.First();
var context = await _checklistService
.VerifyChecklistEntryAndProcessSteps(
companyApplicationStatusIds.Single(),
applicationId,
ApplicationChecklistEntryTypeId.IDENTITY_WALLET,
[ApplicationChecklistEntryStatusId.IN_PROGRESS],
ProcessStepTypeId.AWAIT_DIM_RESPONSE,
Expand Down
1 change: 0 additions & 1 deletion src/externalsystems/Dim.Library/Dim.Library.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

<ItemGroup>
<PackageReference Include="JsonSchema.Net" Version="6.0.5" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

<ItemGroup>
<PackageReference Include="JsonSchema.Net" Version="6.0.5" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,11 @@ await _offerProviderService
}

return (
new[] {
[
data.IsSingleInstance ?
ProcessStepTypeId.SINGLE_INSTANCE_SUBSCRIPTION_DETAILS_CREATION :
ProcessStepTypeId.START_AUTOSETUP },
ProcessStepTypeId.START_AUTOSETUP
],
triggerProvider ? ProcessStepStatusId.DONE : ProcessStepStatusId.SKIPPED,
true,
null);
Expand All @@ -100,6 +101,15 @@ await _offerProviderService
throw new NotFoundException($"OfferSubscription {offerSubscriptionId} does not exist");
}

if (string.IsNullOrWhiteSpace(data.CallbackUrl))
{
return (
null,
ProcessStepStatusId.SKIPPED,
true,
null);
}

if (data.Status != OfferSubscriptionStatusId.ACTIVE)
{
throw new ConflictException("offer subscription should be active");
Expand All @@ -110,11 +120,6 @@ await _offerProviderService
throw new ConflictException("Client should be set");
}

if (string.IsNullOrWhiteSpace(data.CallbackUrl))
{
throw new ConflictException("Callback Url should be set here");
}

if (data.ServiceAccounts.Count() > 1)
{
throw new ConflictException("There should be not more than one service account for the offer subscription");
Expand All @@ -123,16 +128,22 @@ await _offerProviderService
CallbackTechnicalUserInfoData? technicalUserInfoData = null;
if (data.ServiceAccounts.Count() == 1)
{
var serviceAccount = data.ServiceAccounts.FirstOrDefault();
var serviceAccount = data.ServiceAccounts.First();
if (serviceAccount.TechnicalClientId == null)
{
throw new ConflictException($"ClientId of serviceAccount {serviceAccount.TechnicalUserId} should be set");
}
var internalClientId = await _provisioningManager.GetIdOfCentralClientAsync(serviceAccount.TechnicalClientId).ConfigureAwait(ConfigureAwaitOptions.None);
var authData = await _provisioningManager.GetCentralClientAuthDataAsync(internalClientId).ConfigureAwait(ConfigureAwaitOptions.None);
async Task<string?> GetServiceAccountSecret(string technicalClientId)
{
var internalClientId = await _provisioningManager.GetIdOfCentralClientAsync(technicalClientId).ConfigureAwait(ConfigureAwaitOptions.None);
var authData = await _provisioningManager.GetCentralClientAuthDataAsync(internalClientId).ConfigureAwait(ConfigureAwaitOptions.None);
return authData.Secret;
}
technicalUserInfoData = new CallbackTechnicalUserInfoData(
serviceAccount.TechnicalUserId,
authData.Secret,
serviceAccount.CompanyServiceAccountKindId == CompanyServiceAccountKindId.INTERNAL
? await GetServiceAccountSecret(serviceAccount.TechnicalClientId).ConfigureAwait(ConfigureAwaitOptions.None)
: null,
serviceAccount.TechnicalClientId);
}

Expand All @@ -141,7 +152,7 @@ await _offerProviderService
new CallbackClientInfoData(data.ClientId)
);
await _offerProviderService
.TriggerOfferProviderCallback(callbackData, data.CallbackUrl!, cancellationToken)
.TriggerOfferProviderCallback(callbackData, data.CallbackUrl, cancellationToken)
.ConfigureAwait(ConfigureAwaitOptions.None);

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,4 @@
<ProjectReference Include="..\..\provisioning\Provisioning.Library\Provisioning.Library.csproj" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ public Task RegisterConnectorAsync(
if (_settings.ClearinghouseConnectDisabled)
{
return new IApplicationChecklistService.WorkerChecklistProcessStepExecutionResult(
ProcessStepStatusId.DONE,
ProcessStepStatusId.SKIPPED,
entry => entry.ApplicationChecklistEntryStatusId = ApplicationChecklistEntryStatusId.DONE,
new[] { ProcessStepTypeId.ACTIVATE_APPLICATION },
null,
Expand Down
2 changes: 1 addition & 1 deletion src/framework/Framework.Async/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Cors/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.DBAccess/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.DBAccess/Framework.DBAccess.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,6 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/framework/Framework.IO/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Linq/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Logging/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Logging/Framework.Logging.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<PackageReference Include="Serilog.Enrichers.Sensitive" Version="1.7.3" />
<PackageReference Include="Serilog.Enrichers.Thread" Version="3.1.0" />
<PackageReference Include="Serilog.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.0" />
<PackageReference Include="Serilog.Settings.Configuration" Version="8.0.2" />
<PackageReference Include="Serilog.Sinks.Console" Version="5.0.1" />
</ItemGroup>

Expand Down
2 changes: 1 addition & 1 deletion src/framework/Framework.Models/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Seeding/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
7 changes: 3 additions & 4 deletions src/framework/Framework.Seeding/Framework.Seeding.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,9 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.5" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.7" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection.Abstractions" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Options.ConfigurationExtensions" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Options.DataAnnotations" Version="8.0.0" />

Expand Down
2 changes: 1 addition & 1 deletion src/framework/Framework.Swagger/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
2 changes: 1 addition & 1 deletion src/framework/Framework.Token/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<Project>
<PropertyGroup>
<VersionPrefix>2.4.0</VersionPrefix>
<VersionPrefix>2.4.2</VersionPrefix>
<VersionSuffix></VersionSuffix>
</PropertyGroup>
</Project>
Loading

0 comments on commit 9dfa228

Please sign in to comment.