diff --git a/credential-status-list b/credential-status-list index c2e55cb..74cbdcc 160000 --- a/credential-status-list +++ b/credential-status-list @@ -1 +1 @@ -Subproject commit c2e55cbc2a651aaedd55d75d8d83d7a7ee297a02 +Subproject commit 74cbdcc24506507e622cfb44843dfbb13cf3b3a2 diff --git a/db-setup/scripts/init.sql b/db-setup/scripts/init.sql index fcae133..4bc9a88 100644 --- a/db-setup/scripts/init.sql +++ b/db-setup/scripts/init.sql @@ -4,3 +4,5 @@ CREATE DATABASE vidissuer; CREATE DATABASE ehicissuer; CREATE DATABASE verifier; CREATE DATABASE pda1issuer; +CREATE DATABASE resources_vault; +CREATE DATABASE credential_status_list; \ No newline at end of file diff --git a/resources-vault b/resources-vault index 69b6a5f..06d26e6 160000 --- a/resources-vault +++ b/resources-vault @@ -1 +1 @@ -Subproject commit 69b6a5f5b8bd6d035caf626257fee6332b60abf1 +Subproject commit 06d26e676a759721e7c17f6f4c182b0e203f0a5b diff --git a/wallet-enterprise b/wallet-enterprise index b69c137..8ab3d74 160000 --- a/wallet-enterprise +++ b/wallet-enterprise @@ -1 +1 @@ -Subproject commit b69c137e32c23e668d4df0e5d2511c9c83cc0bda +Subproject commit 8ab3d74ada8494497f3623c4ded246d42e83ec5f diff --git a/wallet-enterprise-configurations/acme-verifier/config/config.development.ts b/wallet-enterprise-configurations/acme-verifier/config/config.development.ts index 6cb920a..ed79482 100644 --- a/wallet-enterprise-configurations/acme-verifier/config/config.development.ts +++ b/wallet-enterprise-configurations/acme-verifier/config/config.development.ts @@ -10,5 +10,6 @@ export = { password: "root", dbname: "verifier" }, - wwwalletURL: "http://localhost:3000/cb" + wwwalletURL: "http://localhost:3000/cb", + crl: {}, } \ No newline at end of file diff --git a/wallet-enterprise-configurations/acme-verifier/public/styles/styles.css b/wallet-enterprise-configurations/acme-verifier/public/styles/styles.css index 6df1b07..34ef9f9 100644 --- a/wallet-enterprise-configurations/acme-verifier/public/styles/styles.css +++ b/wallet-enterprise-configurations/acme-verifier/public/styles/styles.css @@ -602,7 +602,7 @@ th { } textarea.wide{ - width: 40% !important; + width: 60% !important; } #json-textarea { @@ -614,11 +614,28 @@ textarea.wide{ color: black; overflow: auto; resize: vertical; - width: 500px; min-height: 200px; } .expired-label { + --tw-bg-opacity: 1; + background-color: #F97316; + --tw-text-opacity: 1; + color: rgb(255 255 255 / var(--tw-text-opacity)); + --tw-border-opacity: 1; + border-color: #F97316; + border-top-width: 1px; + border-left-width: 1px; + border-top-left-radius: 0.5rem; + font-size: 0.75rem; + line-height: 1rem; + padding: 0.25rem 0.75rem 0.25rem 0.75rem; + right: 0px; + bottom: 0px; + position: absolute; +} + +.revoked-label { --tw-bg-opacity: 1; background-color: rgb(239 68 68 / var(--tw-bg-opacity)); --tw-text-opacity: 1; @@ -631,8 +648,8 @@ textarea.wide{ font-size: 0.75rem; line-height: 1rem; padding: 0.25rem 0.75rem 0.25rem 0.75rem; - right: 10px; - bottom: 10px; + right: 0px; + bottom: 0px; position: absolute; } @@ -700,3 +717,63 @@ textarea.wide{ .checkbox input[type="checkbox"]:checked + label:after { display: block; } + +/* CSS for the claims tables */ + +/* CSS for the claims tables */ +.claims-tables { + width: 100%; + display: flex; + flex-direction: column; + align-items: center; +} + +.claims-tables h4 { + margin: 10px 0; + color: #333; +} + +.table-container { + width: 60%; + margin-bottom: 20px; + overflow-x: auto; /* Enable horizontal scrolling */ +} + +.table-container table { + width: 100%; + border-collapse: collapse; + box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1); +} + +@media (max-width: 768px) { + + .table-container{ + width: -webkit-fill-available!important; + margin-left: 1%; + margin-right: 1%; + } +} + +.table-container table thead tr { + background-color: #f2f2f2; +} + +.table-container table th, +.table-container table td { + padding: 10px; + text-align: left; + border: 1px solid #ddd; + font-size: 14px; +} + +.table-container table th { + color: white; +} + +.table-container table tbody tr:nth-child(even) { + background-color: #f9f9f9; +} + +.table-container table tbody tr:hover { + background-color: #f1f1f1; +} diff --git a/wallet-enterprise-configurations/acme-verifier/views/verifier/success.pug b/wallet-enterprise-configurations/acme-verifier/views/verifier/success.pug index c0d2a12..cbf57de 100644 --- a/wallet-enterprise-configurations/acme-verifier/views/verifier/success.pug +++ b/wallet-enterprise-configurations/acme-verifier/views/verifier/success.pug @@ -23,15 +23,25 @@ block layout-content each credential, index in credentialPayloads - const branding = credential.credentialBranding || { backgroundColor: 'red', textColor: 'black' } - const imageUrl = credential.credentialBranding.image.url // Get the corresponding image URL - .credential-box(style=`display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; position: relative; padding: 10px;`, id=`credential-box-${index}`) + .credential-box(style=`position:relative;overflow:hidden;display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; position: relative; margin: 10px;border-radius:10px;`, id=`credential-box-${index}`) img(style="width: 240px; height: 150px; border-radius: 10px;")(src=imageUrl) h3 Requested claims extracted from credentials - // Text area to display claims - textarea#json-textarea.wide - //- Display the 'credentialPayloads' JSON object - | #{JSON.stringify(presentationClaims, null, 2)} + .claims-tables + each claimType in Object.keys(presentationClaims) + h4= claimType + .table-container(style="overflow-x: auto;") + table + thead + tr + th Name + th Value + tbody + each claim in presentationClaims[claimType] + tr + td= claim.name + td= claim.value h3 Credentials diff --git a/wallet-enterprise-configurations/ehic-issuer/config/config.development.ts b/wallet-enterprise-configurations/ehic-issuer/config/config.development.ts index 8832247..44e7333 100644 --- a/wallet-enterprise-configurations/ehic-issuer/config/config.development.ts +++ b/wallet-enterprise-configurations/ehic-issuer/config/config.development.ts @@ -1,4 +1,3 @@ - export = { url: "http://wallet-enterprise-ehic-issuer:8004", port: "8004", @@ -10,5 +9,11 @@ export = { password: "root", dbname: "ehicissuer" }, - wwwalletURL: "http://localhost:3000/cb" + wwwalletURL: "http://localhost:3000/cb", + crl: { + url: "http://credential-status-list:9001", + credentials: { + basicToken: "U0RGRUoyM05KNDNOMkpFTlNBS05LSkROZHNBU0FERk5TS0pkc2FuZGtzZmpzZjoyMTMyMTMyMTNBU0tETWtzYWRzZmRkc2tqZm5GS0xTREFGSlNGU0RTREZTRkQK" + } + } } \ No newline at end of file diff --git a/wallet-enterprise-configurations/ehic-issuer/src/configuration/SupportedCredentialsConfiguration/EHICSupportedCredentialSdJwt.ts b/wallet-enterprise-configurations/ehic-issuer/src/configuration/SupportedCredentialsConfiguration/EHICSupportedCredentialSdJwt.ts index 36e360f..921f895 100644 --- a/wallet-enterprise-configurations/ehic-issuer/src/configuration/SupportedCredentialsConfiguration/EHICSupportedCredentialSdJwt.ts +++ b/wallet-enterprise-configurations/ehic-issuer/src/configuration/SupportedCredentialsConfiguration/EHICSupportedCredentialSdJwt.ts @@ -7,6 +7,7 @@ import { AuthorizationServerState } from "../../entities/AuthorizationServerStat import { CredentialView } from "../../authorization/types"; import { randomUUID } from "node:crypto"; import fs from 'fs'; +import { CredentialStatusList } from "../../lib/CredentialStatus"; export class EHICSupportedCredentialSdJwt implements SupportedCredentialProtocol { @@ -81,6 +82,10 @@ export class EHICSupportedCredentialSdJwt implements SupportedCredentialProtocol ...ehicClaims, "id": holderDID, }, + "credentialStatus": { + "id": `${config.crl.url}#${(await CredentialStatusList.insert()).id}`, + "type": "CertificateRevocationList" + }, "credentialBranding": { "image": { "url": config.url + "/images/ehicCard.png" diff --git a/wallet-enterprise-configurations/pda1-issuer/config/config.development.ts b/wallet-enterprise-configurations/pda1-issuer/config/config.development.ts index c5a8020..d8cfadd 100644 --- a/wallet-enterprise-configurations/pda1-issuer/config/config.development.ts +++ b/wallet-enterprise-configurations/pda1-issuer/config/config.development.ts @@ -13,5 +13,11 @@ export = { wwwalletURL: "http://localhost:3000/cb", resourcesVaultService: { url: "http://resources-vault:6555" + }, + crl: { + url: "http://credential-status-list:9001", + credentials: { + basicToken: "U0RGRUoyM05KNDNOMkpFTlNBS05LSkROZHNBU0FERk5TS0pkc2FuZGtzZmpzZjoyMTMyMTMyMTNBU0tETWtzYWRzZmRkc2tqZm5GS0xTREFGSlNGU0RTREZTRkQK" + } } } \ No newline at end of file diff --git a/wallet-enterprise-configurations/pda1-issuer/src/configuration/SupportedCredentialsConfiguration/PDA1SupportedCredentialSdJwt.ts b/wallet-enterprise-configurations/pda1-issuer/src/configuration/SupportedCredentialsConfiguration/PDA1SupportedCredentialSdJwt.ts index 365f096..6e1f31c 100644 --- a/wallet-enterprise-configurations/pda1-issuer/src/configuration/SupportedCredentialsConfiguration/PDA1SupportedCredentialSdJwt.ts +++ b/wallet-enterprise-configurations/pda1-issuer/src/configuration/SupportedCredentialsConfiguration/PDA1SupportedCredentialSdJwt.ts @@ -9,6 +9,7 @@ import fs from 'fs'; import path from 'path'; import axios from 'axios'; import { compactDecrypt, calculateJwkThumbprint, CompactEncrypt } from 'jose'; +import { CredentialStatusList } from "../../lib/CredentialStatus"; const currentWorkingDirectory = __dirname + "/../../../../"; var publicKeyFilePath; @@ -169,6 +170,10 @@ export class PDA1SupportedCredentialSdJwt implements SupportedCredentialProtocol ...claims, "id": holderDID, }, + "credentialStatus": { + "id": `${config.crl.url}#${(await CredentialStatusList.insert()).id}`, + "type": "CertificateRevocationList" + }, "credentialBranding": { "image": { "url": config.url + "/images/pda1.png" diff --git a/wallet-enterprise-configurations/vid-issuer/config/config.development.ts b/wallet-enterprise-configurations/vid-issuer/config/config.development.ts index b3bdfe7..56c4386 100644 --- a/wallet-enterprise-configurations/vid-issuer/config/config.development.ts +++ b/wallet-enterprise-configurations/vid-issuer/config/config.development.ts @@ -10,5 +10,11 @@ export = { password: "root", dbname: "vidissuer" }, - wwwalletURL: "http://localhost:3000/cb" + wwwalletURL: "http://localhost:3000/cb", + crl: { + url: "http://credential-status-list:9001", + credentials: { + basicToken: "U0RGRUoyM05KNDNOMkpFTlNBS05LSkROZHNBU0FERk5TS0pkc2FuZGtzZmpzZjoyMTMyMTMyMTNBU0tETWtzYWRzZmRkc2tqZm5GS0xTREFGSlNGU0RTREZTRkQK" + } + } } \ No newline at end of file diff --git a/wallet-enterprise-configurations/vid-issuer/src/configuration/SupportedCredentialsConfiguration/VIDSupportedCredentialSdJwt.ts b/wallet-enterprise-configurations/vid-issuer/src/configuration/SupportedCredentialsConfiguration/VIDSupportedCredentialSdJwt.ts index e37ba89..5ce6ec7 100644 --- a/wallet-enterprise-configurations/vid-issuer/src/configuration/SupportedCredentialsConfiguration/VIDSupportedCredentialSdJwt.ts +++ b/wallet-enterprise-configurations/vid-issuer/src/configuration/SupportedCredentialsConfiguration/VIDSupportedCredentialSdJwt.ts @@ -7,6 +7,7 @@ import { AuthorizationServerState } from "../../entities/AuthorizationServerStat import { CredentialView } from "../../authorization/types"; import { randomUUID } from "node:crypto"; import fs from 'fs'; +import { CredentialStatusList } from "../../lib/CredentialStatus"; export class VIDSupportedCredentialSdJwt implements SupportedCredentialProtocol { @@ -83,6 +84,10 @@ export class VIDSupportedCredentialSdJwt implements SupportedCredentialProtocol ...vidClaims, "id": holderDID, }, + "credentialStatus": { + "id": `${config.crl.url}#${(await CredentialStatusList.insert()).id}`, + "type": "CertificateRevocationList" + }, "credentialBranding": { "image": { "url": config.url + "/images/vidCard.png" diff --git a/wallet-frontend b/wallet-frontend index fff9210..cd63cc9 160000 --- a/wallet-frontend +++ b/wallet-frontend @@ -1 +1 @@ -Subproject commit fff9210295029d900fd2bef80b538968dc625bf5 +Subproject commit cd63cc964fd9dfea02a7b528e5b20da9a29fa7c3