Skip to content

Commit

Permalink
Merge pull request #220 from eclipse-tractusx/release/v1.1.0-rc.2
Browse files Browse the repository at this point in the history
build(1.1.0-rc2): merge main into main
  • Loading branch information
evegufy authored Jul 25, 2024
2 parents 1946935 + 510ef45 commit e309b22
Show file tree
Hide file tree
Showing 34 changed files with 1,800 additions and 87 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,18 @@
# Changelog

## [1.1.0-rc.2](https://github.com/eclipse-tractusx/ssi-credential-issuer/compare/v1.1.0-rc.1...v1.1.0-rc.2) (2024-07-25)


### Bug Fixes

* **credentialType:** rename membership certificate to membership ([#217](https://github.com/eclipse-tractusx/ssi-credential-issuer/issues/217)) ([818a9a3](https://github.com/eclipse-tractusx/ssi-credential-issuer/commit/818a9a32090322d83cc7ed47e061922f9a1f3d03)), closes [#216](https://github.com/eclipse-tractusx/ssi-credential-issuer/issues/216)
* set companyName for credentialApproval ([#218](https://github.com/eclipse-tractusx/ssi-credential-issuer/issues/218)) ([32bb69c](https://github.com/eclipse-tractusx/ssi-credential-issuer/commit/32bb69ce1364da275cd8538b6fc5b5a75e62961a)), closes [#215](https://github.com/eclipse-tractusx/ssi-credential-issuer/issues/215)


### Miscellaneous Chores

* release 1.1.0-rc.2 ([6d3f95c](https://github.com/eclipse-tractusx/ssi-credential-issuer/commit/6d3f95c3741106373a30ff6b79d98c12f05b14d0))

## [1.1.0-rc.1](https://github.com/eclipse-tractusx/ssi-credential-issuer/compare/v1.0.0...v1.1.0-rc.1) (2024-07-17)


Expand Down
4 changes: 2 additions & 2 deletions charts/ssi-credential-issuer/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
apiVersion: v2
name: ssi-credential-issuer
type: application
version: 1.1.0-rc.1
appVersion: 1.1.0-rc.1
version: 1.1.0-rc.2
appVersion: 1.1.0-rc.2
description: Helm chart for SSI Credential Issuer
home: https://github.com/eclipse-tractusx/ssi-credential-issuer
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion charts/ssi-credential-issuer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To use the helm chart as a dependency:
dependencies:
- name: ssi-credential-issuer
repository: https://eclipse-tractusx.github.io/charts/dev
version: 1.1.0-rc.1
version: 1.1.0-rc.2
```
## Requirements
Expand Down
2 changes: 1 addition & 1 deletion environments/argocd-app-templates/appsetup-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
source:
path: charts/ssi-credential-issuer
repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git'
targetRevision: ssi-credential-issuer-1.1.0-rc.1
targetRevision: ssi-credential-issuer-1.1.0-rc.2
plugin:
env:
- name: AVP_SECRET
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ spec:
source:
path: charts/ssi-credential-issuer
repoURL: 'https://github.com/eclipse-tractusx/ssi-credential-issuer.git'
targetRevision: ssi-credential-issuer-1.1.0-rc.1
targetRevision: ssi-credential-issuer-1.1.0-rc.2
plugin:
env:
- name: AVP_SECRET
Expand Down
4 changes: 2 additions & 2 deletions environments/helm-values/values-int.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ ingress:
backend:
port: 8080

issuer:
service:
swaggerEnabled: true
credential:
issuerDid: "did:web:portal-backend.int.catena-x.net:api:administration:staticdata:did:BPNL00000003CRHK"
Expand All @@ -55,7 +55,7 @@ issuer:
clientId: "<path:portal/data/ssi-credential-issuer/portal#clientId>"
clientSecret: "<path:portal/data/int/iam/centralidp-client-secrets#issuer-sa>"

issuermigrations:
migrations:
logging:
default: "Debug"

Expand Down
2 changes: 1 addition & 1 deletion src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,6 @@
<Project>
<PropertyGroup>
<VersionPrefix>1.1.0</VersionPrefix>
<VersionSuffix>rc.1</VersionSuffix>
<VersionSuffix>rc.2</VersionSuffix>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ private static async ValueTask HandleNotification(

var content = JsonSerializer.Serialize(new
{
Type = data.VerifiedCredentialTypeId,
Type = data.VerifiedCredentialExternalTypeId,
ExpiryDate = data.ExpiryDate?.ToString("O") ?? throw new ConflictException("Expiry Date must be set here"),
Version = data.DetailVersion,
CredentialId = data.Id,
Expand All @@ -179,9 +179,9 @@ private static async ValueTask HandleNotification(
{
await portalService.AddNotification(content, requesterId, NotificationTypeId.CREDENTIAL_EXPIRY,
cancellationToken).ConfigureAwait(ConfigureAwaitOptions.None);
var typeValue = data.VerifiedCredentialTypeId.GetEnumValue() ??
var typeValue = data.VerifiedCredentialExternalTypeId.GetEnumValue() ??
throw new UnexpectedConditionException(
$"VerifiedCredentialType {data.VerifiedCredentialTypeId} does not exists");
$"VerifiedCredentialType {data.VerifiedCredentialExternalTypeId} does not exists");
var mailParameters = new MailParameter[]
{
new("typeId", typeValue), new("version", data.DetailVersion ?? "no version"),
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.3">
<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 @@ -29,7 +29,7 @@ public record CredentialExpiryData(
string? DetailVersion,
string Bpnl,
CompanySsiDetailStatusId CompanySsiDetailStatusId,
VerifiedCredentialTypeId VerifiedCredentialTypeId,
VerifiedCredentialExternalTypeId VerifiedCredentialExternalTypeId,
CredentialScheduleData ScheduleData);

public record CredentialScheduleData(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace Org.Eclipse.TractusX.SsiCredentialIssuer.DBAccess.Models;

public record SsiApprovalData(
CompanySsiDetailStatusId Status,
VerifiedCredentialTypeId Type,
VerifiedCredentialExternalTypeId Type,
Guid? ProcessId,
VerifiedCredentialTypeKindId? Kind,
string Bpn,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public IAsyncEnumerable<OwnedVerifiedCredentialData> GetOwnCredentialDetails(str
true,
new SsiApprovalData(
x.CompanySsiDetailStatusId,
x.VerifiedCredentialTypeId,
x.VerifiedCredentialType!.VerifiedCredentialTypeAssignedExternalType!.VerifiedCredentialExternalTypeId,
x.ProcessId,
x.VerifiedCredentialType!.VerifiedCredentialTypeAssignedKind == null ? null : x.VerifiedCredentialType!.VerifiedCredentialTypeAssignedKind!.VerifiedCredentialTypeKindId,
x.Bpnl,
Expand All @@ -205,13 +205,13 @@ public IAsyncEnumerable<OwnedVerifiedCredentialData> GetOwnCredentialDetails(str
.SingleOrDefaultAsync();

/// <inheritdoc />
public Task<(bool Exists, CompanySsiDetailStatusId Status, VerifiedCredentialTypeId Type, string UserId, Guid? ProcessId, IEnumerable<Guid> ProcessStepIds)> GetSsiRejectionData(Guid credentialId) =>
public Task<(bool Exists, CompanySsiDetailStatusId Status, VerifiedCredentialExternalTypeId Type, string UserId, Guid? ProcessId, IEnumerable<Guid> ProcessStepIds)> GetSsiRejectionData(Guid credentialId) =>
context.CompanySsiDetails
.Where(x => x.Id == credentialId)
.Select(x => new ValueTuple<bool, CompanySsiDetailStatusId, VerifiedCredentialTypeId, string, Guid?, IEnumerable<Guid>>(
.Select(x => new ValueTuple<bool, CompanySsiDetailStatusId, VerifiedCredentialExternalTypeId, string, Guid?, IEnumerable<Guid>>(
true,
x.CompanySsiDetailStatusId,
x.VerifiedCredentialTypeId,
x.VerifiedCredentialType!.VerifiedCredentialTypeAssignedExternalType!.VerifiedCredentialExternalTypeId,
x.CreatorUserId,
x.ProcessId,
x.Process!.ProcessSteps.Where(ps => ps.ProcessStepStatusId == ProcessStepStatusId.TODO).Select(p => p.Id)
Expand Down Expand Up @@ -263,7 +263,7 @@ public IAsyncEnumerable<CredentialExpiryData> GetExpiryData(DateTimeOffset now,
x.Details.VerifiedCredentialExternalTypeDetailVersion!.Version,
x.Details.Bpnl,
x.Details.CompanySsiDetailStatusId,
x.Details.VerifiedCredentialTypeId,
x.Details.VerifiedCredentialType!.VerifiedCredentialTypeAssignedExternalType!.VerifiedCredentialExternalTypeId,
new CredentialScheduleData(
x.IsVcToDelete,
x.IsOneDayNotification,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ public void AttachAndModifyCredential(Guid credentialId, Action<CompanySsiDetail
modify(entity);
}

public Task<(VerifiedCredentialTypeId TypeId, string RequesterId)> GetCredentialNotificationData(Guid credentialId) =>
public Task<(VerifiedCredentialExternalTypeId ExternalTypeId, string RequesterId)> GetCredentialNotificationData(Guid credentialId) =>
dbContext.CompanySsiDetails
.Where(x => x.Id == credentialId)
.Select(x => new ValueTuple<VerifiedCredentialTypeId, string>(x.VerifiedCredentialTypeId, x.CreatorUserId))
.Select(x => new ValueTuple<VerifiedCredentialExternalTypeId, string>(x.VerifiedCredentialType!.VerifiedCredentialTypeAssignedExternalType!.VerifiedCredentialExternalTypeId, x.CreatorUserId))
.SingleOrDefaultAsync();

public Task<(bool Exists, bool IsSameCompany, IEnumerable<(DocumentStatusId StatusId, byte[] Content)> Documents)> GetSignedCredentialForCredentialId(Guid credentialId, string bpnl) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public interface ICompanySsiDetailsRepository
IAsyncEnumerable<OwnedVerifiedCredentialData> GetOwnCredentialDetails(string bpnl);

Task<(bool exists, SsiApprovalData data)> GetSsiApprovalData(Guid credentialId);
Task<(bool Exists, CompanySsiDetailStatusId Status, VerifiedCredentialTypeId Type, string UserId, Guid? ProcessId, IEnumerable<Guid> ProcessStepIds)> GetSsiRejectionData(Guid credentialId);
Task<(bool Exists, CompanySsiDetailStatusId Status, VerifiedCredentialExternalTypeId Type, string UserId, Guid? ProcessId, IEnumerable<Guid> ProcessStepIds)> GetSsiRejectionData(Guid credentialId);
void AttachAndModifyCompanySsiDetails(Guid id, Action<CompanySsiDetail>? initialize, Action<CompanySsiDetail> updateFields);
IAsyncEnumerable<VerifiedCredentialTypeId> GetCertificateTypes(string bpnl);
IAsyncEnumerable<CredentialExpiryData> GetExpiryData(DateTimeOffset now, DateTimeOffset inactiveVcsToDelete, DateTimeOffset expiredVcsToDelete);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public interface ICredentialRepository
Task<(string Bpn, string? CallbackUrl)> GetCallbackUrl(Guid credentialId);
Task<(bool Exists, bool IsSameBpnl, Guid? ExternalCredentialId, CompanySsiDetailStatusId StatusId, IEnumerable<(Guid DocumentId, DocumentStatusId DocumentStatusId)> Documents)> GetRevocationDataById(Guid credentialId, string bpnl);
void AttachAndModifyCredential(Guid credentialId, Action<CompanySsiDetail>? initialize, Action<CompanySsiDetail> modify);
Task<(VerifiedCredentialTypeId TypeId, string RequesterId)> GetCredentialNotificationData(Guid credentialId);
Task<(VerifiedCredentialExternalTypeId ExternalTypeId, string RequesterId)> GetCredentialNotificationData(Guid credentialId);
Task<(bool Exists, bool IsSameCompany, IEnumerable<(DocumentStatusId StatusId, byte[] Content)> Documents)> GetSignedCredentialForCredentialId(Guid credentialId, string bpnl);
Task<(bool Exists, bool IsSameCompany, string FileName, DocumentStatusId StatusId, byte[] Content, MediaTypeId MediaTypeId)> GetDocumentById(Guid documentId, string bpnl);
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.5" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Org.Eclipse.TractusX.Portal.Backend.Framework.ErrorHandling" Version="2.3.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,45 +17,31 @@
* SPDX-License-Identifier: Apache-2.0
********************************************************************************/

using System.Runtime.Serialization;

namespace Org.Eclipse.TractusX.SsiCredentialIssuer.Entities.Enums;

public enum VerifiedCredentialTypeId
{
[EnumMember(Value = "Traceability Framework")]
TRACEABILITY_FRAMEWORK = 1,

[EnumMember(Value = "PCF Framework")]
PCF_FRAMEWORK = 2,

[EnumMember(Value = "Behavior Twin Framework")]
BEHAVIOR_TWIN_FRAMEWORK = 3,

[EnumMember(Value = "Membership Certificate")]
MEMBERSHIP_CERTIFICATE = 4,
MEMBERSHIP = 4,

[EnumMember(Value = "Circular Economy")]
CIRCULAR_ECONOMY = 5,

[EnumMember(Value = "frameworkAgreement.quality")]
FRAMEWORK_AGREEMENT_QUALITY = 6,

[EnumMember(Value = "BusinessPartnerCredential")]
BUSINESS_PARTNER_NUMBER = 7,

[EnumMember(Value = "Demand and Capacity Management")]
DEMAND_AND_CAPACITY_MANAGEMENT = 8,

[EnumMember(Value = "Demand and Capacity Management")]
DEMAND_AND_CAPACITY_MANAGEMENT_PURIS = 9,

[EnumMember(Value = "Business Partner Data Management")]
BUSINESS_PARTNER_DATA_MANAGEMENT = 10,

[EnumMember(Value = "Framework Agreement")]
FRAMEWORK_AGREEMENT = 11,

[EnumMember(Value = "Date Exchange Governance")]
DATA_EXCHANGE_GOVERNANCE_CREDENTIAL = 12
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
<ItemGroup>
<PackageReference Include="EFCore.NamingConventions" Version="8.0.3" />
<PackageReference Include="Laraue.EfCoreTriggers.Common" Version="8.0.3" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.4">
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
Expand Down
Loading

0 comments on commit e309b22

Please sign in to comment.