eclipse-tractusx / bpdm-certificate-management

reference implementation for business partner certificates
Apache License 2.0
1 stars 2 forks source link

Alignment certificate KIT API with portal #48

Closed alexKeppler closed 1 month ago

alexKeppler commented 9 months ago

To be refined!!!!

User Story:

As a user, I want to be able to upload certificates as .pdf / .jpg / .jpeg / .png, but it should also be possible to fill in the fields from the certificate data model via a form on the UI (at least the mandatory fields), so that the data can be processed later.

The data model of the current reference implementation has to be matched to the data model of the certificate KIT. See below

Datamodel:

Attribute | Datatype | Mandatory | Documentation | Fieldtype -- | -- | -- | -- | -- businessPartnerNumber | BPNL | x | The BPN id of the certified legal entity | Text type | CertificateType | x | type of the cerificate the BPN is certified for We need to provide a starting list of certificates that we have in scope | Dropdown? registrationNumber | string | x | registration number of certificate at certifying authority | Text areaOfApplication | string |   | optional area of applications for the given certification i.e. additional details | Text enclosedSites | List of EnclosedSites |   | optional additional  sites (eg. Production or engineering sites) of the BPN the certificate is also valid | Text validFrom | date | x | valid from date for certificate, if not defined - use issueing/signing date of document | Datetime-local validUntil | date | x | valid to date for certificate-  31.12.9999 for no expiration | Datetime-local issuer | BPN |   | Issuer authority of certificate - e.g. TUEV Sued We need to provide a starting list of certificate issuers that we have in scope | Dropdown trustLevel | TrustLevel | x | none/low /high / trusted - explanation see below Maybe this should be not visible on the front-end but be set automatically in the back |   validator | TrustValidator |   | Validator (ie. typically the data provider) of the certificate within CX - typically validates certificate information so that it can be trusted (see also trust levels) Maybe this should be not visible on the front-end but be set automatically in the back |   uploader | BPNL |   | Company (i.e. CX-PB) who orginally provided the given certificate to data provider (e.g. BMW provided it to SupplyOn, SupplyOn is trust Validator) Maybe this should be not visible on the front-end but be set automatically in the back |   documentID | string | x | internal reference id at data provider to request certificate document from data provider | Text Additional info: Filetypes for upload should be restricted - if you upload .pptx an error message should come up (also for security reasons) Filesize should be limited to 2mb - if you upload a larger file and error message should come up { "businessPartnerNumber": "string", "type": { "certificateType": "string", "certificateVersion": "string" }, "registrationNumber": "string", "areaOfApplication": "string", "remark": "string", "enclosedSites": [ { "siteBpn": "string", "areaOfApplication": "string" } ], "validFrom": "2024-02-13T10:02:02.050Z", "validUntil": "2024-02-13T10:02:02.050Z", "issuer": "string", "trustLevel": "None", "validator": { "validatorName": "string", "validatorBpn": "string" }, "uploader": "string", "document": { "certificateDocument": "string", "certificateDocumentFormat": "PDF" } } https://business-partners-certificate.int.demo.catena-x.net/test-certificate/ui/swagger-ui/index.html#/certificate-controller/setCertificateDocument
jjeroch commented 8 months ago

Update of the ticket needed - currently it describes a UI ticket but actually needed is the API description of

"businessPartnerNumber": "string",
"type": {
"certificateType": "string",
"certificateVersion": "string"
},
"registrationNumber": "string",
"areaOfApplication": "string",
"remark": "string",
"enclosedSites": [
{
"siteBpn": "string",
"areaOfApplication": "string"
}
],
"validFrom": "2024-02-13T10:02:02.050Z",
"validUntil": "2024-02-13T10:02:02.050Z",
"issuer": "string",
"trustLevel": "None",
"validator": {
"validatorName": "string",
"validatorBpn": "string"
},
"uploader": "string",
"document": {
"certificateDocument": "string",
"certificateDocumentFormat": "PDF"
}
}

Questions:

  • When should this endpoint be called?
  • Can the endpoint get called by an technical user or a real user?
  • Which permission si needed? (new or existing)
  • Who can upload at this endpoints documents? (means which participant role)
  • What happened if I uploaded a file (remember status quo: the file is inside the portal DB stored)
  • What are the possible endpoint responses? (positiv as well as negativ)
  • Is the endpoint synchron or any asynchron feedback expected?
  • What happens with the document itself?
  • Which Audit mechanism are implemented?
  • Which delete mechanism are implemented?
  • Please explain the endpoint logic which is getting executed after the POST is called
  • Last but not least; please provide an information of the implemented value validations as well as the mandatory fields
SujitMBRDI commented 1 month ago

Closing issue to enable archiving of repository bpdm-certificate-management.