Skip to content

Increase VP character limits

Some fields of VPs are restricted to 255 characters. This is not enough, e.g., with regard to #199 (closed). Example VP with DIDs / IDs created by the the Gaia-X Lab Wizard:

{
    "@context": [
        "https://www.w3.org/2018/credentials/v1"
    ],
    "type": [
        "VerifiablePresentation"
    ],
    "verifiableCredential": {
        "@context": [
            "https://www.w3.org/2018/credentials/v1",
            "https://w3id.org/security/suites/jws-2020/v1",
            "https://registry.lab.gaia-x.eu/development/api/trusted-shape-registry/v1/shapes/jsonld/trustframework#"
        ],
        "type": [
            "VerifiableCredential"
        ],
        "id": "https://wizard.lab.gaia-x.eu/api/credentials/2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVSNKzjJj6gcjE2mDNDUHCichXWdMH3S2c8AaDLm3kXmf5R8ApamALPiFAGZ9WxiAUCfpnxtoV1wtMXWN6oypnez2QrSQ4LD6KYjNLYmBaJwoZ4iuGawPScwMRpVGxj54M9DdAVVHiEESxpMvuG5o51thHaLXCbwrPtwDA6WeGBjib7iwqpMNdNw9U3RAfspMbyDskTnwC6KbZ3Uz76uWP8QYdvZBLs24oiChcRyZ5tmfuoSsBQYNXjAbWZJ6Mwxk1zyP6cx7QZrubWkQM4dA36ZRYv5rdubjuLoCuHM4tYm4iitbnaGfKthw3Bjv8YzhqZEAt6rpDZNaTSBJdsYNBMkWWRYAgj2U4RnbyLNCPjL9ceucc9XrKdGgHa7x8nACkSoFpHmueTjynEBixA1v4wUExB2xDTaYmG2sKd1cBDUzZecjzrwk2VgWrtRUKQ2QNWnNMFa7vATRtjVsefWXMHRhRk1ATSdDq4r5XKD5d7euM77QfZYKAWpwfPNnzGgqyramsGyLLQJAiao1W1Qjzom9e5aK54PerJBogVVTyULT2z52iZRYQ?uid=0566ff0b-6486-4659-9dc2-3e0784c2bf20",
        "issuer": "did:web:wizard.lab.gaia-x.eu:api:credentials:2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVSNKzjJj6gcjE2mDNDUHCichXWdMH3S2c8AaDLm3kXmf5R8ApamALPiFAGZ9WxiAUCfpnxtoV1wtMXWN6oypnez2QrSQ4LD6KYjNLYmBaJwoZ4iuGawPScwMRpVGxj54M9DdAVVHiEESxpMvuG5o51thHaLXCbwrPtwDA6WeGBjib7iwqpMNdNw9U3RAfspMbyDskTnwC6KbZ3Uz76uWP8QYdvZBLs24oiChcRyZ5tmfuoSsBQYNXjAbWZJ6Mwxk1zyP6cx7QZrubWkQM4dA36ZRYv5rdubjuLoCuHM4tYm4iitbnaGfKthw3Bjv8YzhqZEAt6rpDZNaTSBJdsYNBMkWWRYAgj2U4RnbyLNCPjL9ceucc9XrKdGgHa7x8nACkSoFpHmueTjynEBixA1v4wUExB2xDTaYmG2sKd1cBDUzZecjzrwk2VgWrtRUKQ2QNWnNMFa7vATRtjVsefWXMHRhRk1ATSdDq4r5XKD5d7euM77QfZYKAWpwfPNnzGgqyramsGyLLQJAiao1W1Qjzom9e5aK54PerJBogVVTyULT2z52iZRYQ",
        "issuanceDate": "2023-12-18T12:27:24.016Z",
        "credentialSubject": {
            "@id": "https://lab.gaia-x.eu/cesDataResource.json",
            "@type": "gx:DataResource",
            "gx:name": "CES Data",
            "gx:description": "Contains GX compliant credentials",
            "gx:containsPII": false,
            "gx:policy": "default: allow",
            "gx:license": "EPL-2.0",
            "gx:copyrightOwnedBy": "original owner",
            "gx:producedBy": {
                "@id": "did:web:wizard.lab.gaia-x.eu:api:credentials:2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVSNKzjJj6gcjE2mDNDUHCichXWdMH3S2c8AaDLm3kXmf5R8ApamALPiFAGZ9WxiAUCfpnxtoV1wtMXWN6oypnez2QrSQ4LD6KYjNLYmBaJwoZ4iuGawPScwMRpVGxj54M9DdAVVHiEESxpMvuG5o51thHaLXCbwrPtwDA6WeGBjib7iwqpMNdNw9U3RAfspMbyDskTnwC6KbZ3Uz76uWP8QYdvZBLs24oiChcRyZ5tmfuoSsBQYNXjAbWZJ6Mwxk1zyP6cx7QZrubWkQM4dA36ZRYv5rdubjuLoCuHM4tYm4iitbnaGfKthw3Bjv8YzhqZEAt6rpDZNaTSBJdsYNBMkWWRYAgj2U4RnbyLNCPjL9ceucc9XrKdGgHa7x8nACkSoFpHmueTjynEBixA1v4wUExB2xDTaYmG2sKd1cBDUzZecjzrwk2VgWrtRUKQ2QNWnNMFa7vATRtjVsefWXMHRhRk1ATSdDq4r5XKD5d7euM77QfZYKAWpwfPNnzGgqyramsGyLLQJAiao1W1Qjzom9e5aK54PerJBogVVTyULT2z52iZRYQ#61d378cc41e1e939fc915e4c9f007f14ac61c22f86f94e8e07669749cd495511"
            },
            "gx:exposedThrough": {
                "@id": "https://wizard.lab.gaia-x.eu/api/credentials/2d37wbGvQzbAQ84yRouh2m2vBKkN8s5AfH9Q75HZRCUQmJW7yAVSNKzjJj6gcjE2mDNDUHCichXWdMH3S2c8AaDLm3kXmf5R8ApamALPiFAGZ9WxiAUCfpnxtoV1wtMXWN6oypnez2QrSQ4LD6KYjNLYmBaJwoZ4iuGawPScwMRpVGxj54M9DdAVVHiEESxpMvuG5o51thHaLXCbwrPtwDA6WeGBjib7iwqpMNdNw9U3RAfspMbyDskTnwC6KbZ3Uz76uWP8QYdvZBLs24oiChcRyZ5tmfuoSsBQYNXjAbWZJ6Mwxk1zyP6cx7QZrubWkQM4dA36ZRYv5rdubjuLoCuHM4tYm4iitbnaGfKthw3Bjv8YzhqZEAt6rpDZNaTSBJdsYNBMkWWRYAgj2U4RnbyLNCPjL9ceucc9XrKdGgHa7x8nACkSoFpHmueTjynEBixA1v4wUExB2xDTaYmG2sKd1cBDUzZecjzrwk2VgWrtRUKQ2QNWnNMFa7vATRtjVsefWXMHRhRk1ATSdDq4r5XKD5d7euM77QfZYKAWpwfPNnzGgqyramsGyLLQJAiao1W1Qjzom9e5aK54PerJBogVVTyULT2z52iZRYQ#d4b54de130b6a1efdc1422436db3f3f38676bf2c81e5300945f9d26995d3ed2e"
            }
        },
        "proof": {
            "type": "JsonWebSignature2020",
            "created": "2024-01-29T11:35:37.065Z",
            "proofPurpose": "assertionMethod",
            "verificationMethod": "did:web:compliance.lab.gaia-x.eu",
            "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJQUzI1NiJ9..CE9rsl69XDWr0aE2WkDVu9DtV22L8D-7HMF7y-Y1iHIc1UOZhGNhUXyfYYE7Uuxh6BXJqWDsVDWl0V7A6qXAhTcua34FEZUeBFIXL7FXcq8tX56hJO53Js4jrAE6l8h16qQwR_Mpnf-EEh8tDjWWO4fk_a0qBhsYxgiv9m5PulcHnzCC621LqK6TdSdpXUPZm8WeEPia7Rsrzs1fbzp4aHTi53qa5nY8537I9BXN8Ncjv2HlJIODWnlgenNbWZU-NHQtXzQ6sa34F8C30pt_bhSTy1b-vviCTxk9ZkS7DSLk6eMbjeRFPvs9m2lWviqT7voYX-aX0wn8akIdVLeCrco_OEYn2GXBoF65RPVyu6-NcoGY2a1jr5qkhONx4K1SuXOs21yRyljfnMntXxoRP9i0u6cQ8rpMivZYhglqrtP_W7D8lv6IK7BIF6ZEqFtkxxcpCH0quMmOvRjxXSOuIHaODmUcJfCEAaHEemwXSXVch8_3u6Tjb1M9_7wQVwjkYeZ-cz5oTCN6q7Lqf8zUmlj2FJfVOsYqRMW1ucWfdJ-FJnMAuq5cfdrhkEmtnim7IAoMQtSqkpheoiYR1LhimSTSMvMpAS1XuRfBuBxXuBHAbWCPDhi_d8swavyQGUQAD8AI9ylYaehAVj9e0tmBGXzKTrqBP8XiaUvos5-wv18"
        }
    },
    "proof": {
        "type": "JsonWebSignature2020",
        "created": "2024-01-29T11:35:37.065Z",
        "proofPurpose": "assertionMethod",
        "verificationMethod": "did:web:compliance.lab.gaia-x.eu",
        "jws": "eyJiNjQiOmZhbHNlLCJjcml0IjpbImI2NCJdLCJhbGciOiJQUzI1NiJ9..s8W1geIq4-CedbcQSBDIQ5oLqrXcyUqJGKVfI2wseZJib9naoE87ZekgGkcusBn5LBeQ1_NtydZotlDTBxjNHne2baXBhvJvGW3YyR4Bl7CQ7st23nQKMeDZ_oe7nU028cxmAyLOP4B1QzFYnqXG5DTGhpGZkHqJGbTUErDNYK3KUHGrOGEdmKHmJJ3Hr1IqB36P_UMBBV9hLIWwaxO1YWMIl2-vrjya7l0isAK71f9q3iurlw6Pf3WHslYTPTWyNZ78JcCheWBgWKgSNW--k7So6iepVCkvqlnM6OjmHHLfGAia9S_mchv5ddLeBtlF-xGiHSe5Q6HDBp82BWi-BPe1Eagxq-ZIiC9rupGRB4D2vAkiHP-WFZExk-bavvfDr4Sy-C9s-o_Ef9VmHiRFbgyD9FWms0-3VHTdoPWs3mEGEtDGEJEiZUvju-aQqj7vjZ21UVhY9aLqBennAhAprKzrcUQxsgiwcgqc7-JJ00Rzv_qw-43f61-ZP-i4ZLpdtadnvn0f-m0EwnehzJ6YwMDFDo-iRIGTbFwLbJdVrGzSeu_VZiNz6unsUtMiliY_cxaw3MQBZUQT07PI8z1fv-iIMYDai0e2ISTVwasM0vuxK8GD31mlhW0bJ2FVbYTmXAsCk5SgZgmQ5haas34sP5Thvdr5P0mVRKhbGGnx0Es"
    }
}

Error when submitting the VP to the catalog (POST for /self-descriptions):

postgres        | 2024-02-05 07:18:50.713 UTC [146] ERROR:  value too long for type character varying(255)
postgres        | 2024-02-05 07:18:50.713 UTC [146] STATEMENT:  with u as (update sdfiles set status = $1, statustime = $2
postgres        |           where subjectid = $3 and status = 0 returning sdhash oldhash, $4 sdhash, subjectid),
postgres        |       i as (insert into sdfiles(sdhash, subjectid, issuer, uploadtime, statustime, expirationtime, status, content, validators)
postgres        |           values ($5, $6, $7, $8, $9, $10, $11, $12, $13)
postgres        |           returning sdhash)
postgres        |       select u.subjectid, u.oldhash from i full join u on u.sdhash = i.sdhash
fc-server       | 2024-02-05T07:18:50.743Z ERROR 1 --- [federated-catalogue-service] [http-nio-8081-exec-2] [                                                 ] o.a.c.c.C.[.[.[/].[dispatcherServlet]    : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.dao.DataIntegrityViolationException: PreparedStatementCallback; SQL [with u as (update sdfiles set status = ?, statustime = ?
fc-server       |     where subjectid = ? and status = 0 returning sdhash oldhash, ? sdhash, subjectid),
fc-server       | i as (insert into sdfiles(sdhash, subjectid, issuer, uploadtime, statustime, expirationtime, status, content, validators)
fc-server       |     values (?, ?, ?, ?, ?, ?, ?, ?, ?)
fc-server       |     returning sdhash)
fc-server       | select u.subjectid, u.oldhash from i full join u on u.sdhash = i.sdhash]; ERROR: value too long for type character varying(255)] with root cause

Solution: adjusting the database schema to allow longer strings. Running catalogs would need to migrate / update their database. The strings in the example have about 700 characters. The update contains a new limit for the diduri, the subjectid and the issuer of 2048 characters, which is around the max URL length different browsers and services support.

Merge request reports

Loading