@eudiplo/cli 10.1.0-main.cac27b2 → 10.1.0-main.d337e12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -20824,10 +20824,42 @@ function isTrustListEmail(value) {
20824
20824
  return EMAIL.test(value);
20825
20825
  }
20826
20826
 
20827
+ // ../../packages/eudiplo-config-format/dist/client-roles.js
20828
+ var ADMIN_ROLES = ["tenant:admin", "tenants:manage"];
20829
+ var ADDED_ROLES = [
20830
+ { role: "audit:read", for: ["clients:manage"] },
20831
+ { role: "keys:manage", for: ["issuance:manage", "presentation:manage"] }
20832
+ ];
20833
+ var NARROWED_ROLES = ADDED_ROLES.flatMap((added) => added.for);
20834
+ function upgradeRolesToRoleModel11(roles) {
20835
+ if (roles.some((role) => ADMIN_ROLES.includes(role)))
20836
+ return [...roles];
20837
+ const result = [...roles];
20838
+ for (const added of ADDED_ROLES) {
20839
+ if (!result.includes(added.role) && added.for.some((role) => result.includes(role))) {
20840
+ result.push(added.role);
20841
+ }
20842
+ }
20843
+ return result;
20844
+ }
20845
+ function rolesBeforeRoleModel11(roles) {
20846
+ const candidates = [];
20847
+ const trailing = ADDED_ROLES.map((added) => added.role).reverse();
20848
+ let current = [...roles];
20849
+ for (const role of trailing) {
20850
+ if (current.at(-1) === role) {
20851
+ current = current.slice(0, -1);
20852
+ candidates.push(current);
20853
+ }
20854
+ }
20855
+ const same = (a, b) => a.length === b.length && a.every((role, index) => role === b[index]);
20856
+ return candidates.filter((candidate) => same(upgradeRolesToRoleModel11(candidate), roles));
20857
+ }
20858
+
20827
20859
  // ../../packages/eudiplo-config-format/dist/config-format.js
20828
20860
  var CONFIG_FORMATS = {
20829
20861
  Tenant: { slug: "tenant", file: "TenantConfigFile", version: 4 },
20830
- Client: { slug: "client", file: "ClientConfigFile", version: 2 },
20862
+ Client: { slug: "client", file: "ClientConfigFile", version: 3 },
20831
20863
  KmsConfig: { slug: "kms-config", file: "KmsConfigFile", version: 2 },
20832
20864
  KeyChain: { slug: "key-chain", file: "KeyChainConfigFile", version: 4 },
20833
20865
  KeyChainDefaults: {
@@ -20848,7 +20880,7 @@ var CONFIG_FORMATS = {
20848
20880
  PresentationConfig: {
20849
20881
  slug: "presentation-config",
20850
20882
  file: "PresentationConfigFile",
20851
- version: 5
20883
+ version: 6
20852
20884
  },
20853
20885
  AttributeProvider: {
20854
20886
  slug: "attribute-provider",
@@ -20916,6 +20948,8 @@ function bareFileVersion(kind, spec) {
20916
20948
  if (kind === "CredentialConfig")
20917
20949
  return hasClaimFieldFormat(spec.fields) ? 5 : 1;
20918
20950
  if (kind === "PresentationConfig") {
20951
+ if ("allowUntrustedIssuers" in spec)
20952
+ return 6;
20919
20953
  const certificate = spec.registration_cert;
20920
20954
  if (object(certificate) && ("purpose" in certificate || "privacy_policy" in certificate))
20921
20955
  return 5;
@@ -21266,6 +21300,32 @@ function registrationCertificateNotGenerated() {
21266
21300
  message: "EUDIPLO no longer generates issuer registration certificates at the sandbox registrar, so the issuer metadata carries none until registrationCertificate.jwt is set. Request one from the EUDI Hub (Issuer Settings \u2192 Request from EUDI Hub, or POST /api/eudi-hub/registration-certificate/issuer), or set the JWT from another registrar."
21267
21301
  };
21268
21302
  }
21303
+ var presentationConfigV5ToV6 = {
21304
+ id: "presentation-config-v6-allow-untrusted-issuers",
21305
+ kind: "PresentationConfig",
21306
+ from: 5,
21307
+ to: 6,
21308
+ migrate(spec) {
21309
+ if (spec.allowUntrustedIssuers === true)
21310
+ return { spec };
21311
+ const query = object(spec.dcql_query) ? spec.dcql_query : {};
21312
+ const credentials = Array.isArray(query.credentials) ? query.credentials : [];
21313
+ const missing = credentials.filter(object).filter((credential) => !(Array.isArray(credential.trusted_authorities) && credential.trusted_authorities.some((authority) => object(authority) && Array.isArray(authority.values) && authority.values.length > 0))).map((credential) => String(credential.id ?? ""));
21314
+ if (missing.length === 0)
21315
+ return { spec };
21316
+ return {
21317
+ spec,
21318
+ issues: [
21319
+ {
21320
+ severity: "required-input",
21321
+ code: "TRUSTED_AUTHORITY_REQUIRED",
21322
+ path: "/spec/dcql_query/credentials",
21323
+ message: `Credential queries without trusted_authorities: ${missing.join(", ")}. EUDIPLO 11.0 no longer reads SKIP_TRUST_AUTHORITY and refuses this configuration. Add a trust list or an OpenID Federation trust anchor to each, or set $schema to v6 and allowUntrustedIssuers to true to accept credentials of any issuer (development and interoperability tests only).`
21324
+ }
21325
+ ]
21326
+ };
21327
+ }
21328
+ };
21269
21329
  var PRESENTATION_REGISTRATION_CERT_FORM_FIELDS = [
21270
21330
  "registrationCertImportJwt",
21271
21331
  "registrationCertImportId",
@@ -21415,6 +21475,35 @@ var CONFIG_MIGRATIONS = [
21415
21475
  // and keys:manage: a v1 spec is a valid v2 spec.
21416
21476
  migrate: (spec) => ({ spec })
21417
21477
  },
21478
+ {
21479
+ id: "client-v3-role-model",
21480
+ kind: "Client",
21481
+ from: 2,
21482
+ to: 3,
21483
+ // 11.0 narrowed clients:manage and the issuance and presentation
21484
+ // manage roles; the client gets the roles that now hold their rights.
21485
+ migrate: (spec) => {
21486
+ if (!Array.isArray(spec.roles))
21487
+ return { spec };
21488
+ const before = spec.roles;
21489
+ const roles = upgradeRolesToRoleModel11(before);
21490
+ const added = roles.slice(before.length);
21491
+ if (added.length === 0)
21492
+ return { spec };
21493
+ return {
21494
+ spec: { ...spec, roles },
21495
+ issues: [
21496
+ {
21497
+ severity: "warning",
21498
+ code: "CLIENT_ROLES_ADDED",
21499
+ path: "/spec/roles",
21500
+ message: `Added ${added.join(" and ")} so the client keeps its access: clients:manage no longer reads the audit log, and issuance:manage and presentation:manage no longer change key chains. Remove them if the client does not need them.`
21501
+ }
21502
+ ]
21503
+ };
21504
+ },
21505
+ earlierSpecs: (spec) => Array.isArray(spec.roles) ? rolesBeforeRoleModel11(spec.roles).map((roles) => ({ ...spec, roles })) : []
21506
+ },
21418
21507
  {
21419
21508
  id: "kms-config-v2-algorithms",
21420
21509
  kind: "KmsConfig",
@@ -21539,6 +21628,7 @@ var CONFIG_MIGRATIONS = [
21539
21628
  migrate: (spec) => ({ spec })
21540
21629
  },
21541
21630
  presentationConfigV4ToV5,
21631
+ presentationConfigV5ToV6,
21542
21632
  trustListV1ToV2
21543
21633
  ];
21544
21634
  function schemaUrl(kind, version = CONFIG_FORMATS[kind].version) {
@@ -33226,6 +33316,146 @@ var CONFIG_SCHEMAS = [
33226
33316
  }
33227
33317
  }
33228
33318
  },
33319
+ {
33320
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
33321
+ "$id": "https://eudiplo.dev/schemas/v3/ClientConfigFile.schema.json",
33322
+ "title": "ClientConfigFile",
33323
+ "type": "object",
33324
+ "properties": {
33325
+ "$schema": {
33326
+ "type": "string",
33327
+ "const": "https://eudiplo.dev/schemas/v3/ClientConfigFile.schema.json"
33328
+ },
33329
+ "metadata": {
33330
+ "type": "object",
33331
+ "properties": {
33332
+ "generation": {
33333
+ "type": "integer",
33334
+ "minimum": 1,
33335
+ "description": "Monotonically increasing configuration generation."
33336
+ },
33337
+ "ownership": {
33338
+ "type": "string",
33339
+ "enum": [
33340
+ "unmanaged",
33341
+ "file-managed"
33342
+ ],
33343
+ "description": "Requested ownership recorded when the document is applied."
33344
+ }
33345
+ },
33346
+ "additionalProperties": false
33347
+ },
33348
+ "spec": {
33349
+ "allOf": [
33350
+ {
33351
+ "$ref": "#/$defs/CreateClientDto"
33352
+ },
33353
+ {
33354
+ "type": "object",
33355
+ "required": [
33356
+ "clientId"
33357
+ ],
33358
+ "properties": {
33359
+ "clientId": {
33360
+ "type": "string",
33361
+ "minLength": 1
33362
+ }
33363
+ }
33364
+ }
33365
+ ]
33366
+ }
33367
+ },
33368
+ "required": [
33369
+ "$schema",
33370
+ "spec"
33371
+ ],
33372
+ "additionalProperties": false,
33373
+ "$defs": {
33374
+ "CreateClientDto": {
33375
+ "type": "object",
33376
+ "properties": {
33377
+ "clientId": {
33378
+ "type": "string",
33379
+ "minLength": 1,
33380
+ "pattern": "^[A-Za-z0-9._:-]+$",
33381
+ "description": "Unique client identifier."
33382
+ },
33383
+ "secret": {
33384
+ "description": "Optional client secret for confidential clients.",
33385
+ "type": "string",
33386
+ "minLength": 1
33387
+ },
33388
+ "description": {
33389
+ "description": "Optional human-readable client description.",
33390
+ "type": "string",
33391
+ "minLength": 1
33392
+ },
33393
+ "roles": {
33394
+ "minItems": 1,
33395
+ "type": "array",
33396
+ "items": {
33397
+ "type": "string",
33398
+ "enum": [
33399
+ "presentation:manage",
33400
+ "presentation:request",
33401
+ "presentation:read",
33402
+ "issuance:manage",
33403
+ "issuance:offer",
33404
+ "issuance:read",
33405
+ "clients:manage",
33406
+ "users:manage",
33407
+ "tenants:manage",
33408
+ "tenant:admin",
33409
+ "registrar:manage",
33410
+ "audit:read",
33411
+ "sessions:read",
33412
+ "credentials:status",
33413
+ "keys:manage",
33414
+ "keys:export"
33415
+ ]
33416
+ },
33417
+ "description": "Roles assigned to the client. At least one role is required."
33418
+ },
33419
+ "allowedPresentationConfigs": {
33420
+ "description": "Optional allow-list of presentation config ids this client can use.",
33421
+ "anyOf": [
33422
+ {
33423
+ "type": "array",
33424
+ "items": {
33425
+ "type": "string",
33426
+ "minLength": 1
33427
+ }
33428
+ },
33429
+ {
33430
+ "type": "null"
33431
+ }
33432
+ ]
33433
+ },
33434
+ "allowedIssuanceConfigs": {
33435
+ "description": "Optional allow-list of issuance config ids this client can use.",
33436
+ "anyOf": [
33437
+ {
33438
+ "type": "array",
33439
+ "items": {
33440
+ "type": "string",
33441
+ "minLength": 1
33442
+ }
33443
+ },
33444
+ {
33445
+ "type": "null"
33446
+ }
33447
+ ]
33448
+ }
33449
+ },
33450
+ "required": [
33451
+ "clientId",
33452
+ "roles"
33453
+ ],
33454
+ "additionalProperties": false,
33455
+ "title": "CreateClientDto"
33456
+ }
33457
+ }
33458
+ },
33229
33459
  {
33230
33460
  "$schema": "https://json-schema.org/draft/2020-12/schema",
33231
33461
  "$id": "https://eudiplo.dev/schemas/v3/CredentialConfigFile.schema.json",
@@ -42808,13 +43038,13 @@ var CONFIG_SCHEMAS = [
42808
43038
  },
42809
43039
  {
42810
43040
  "$schema": "https://json-schema.org/draft/2020-12/schema",
42811
- "$id": "https://eudiplo.dev/schemas/v7/IssuanceConfigFile.schema.json",
42812
- "title": "IssuanceConfigFile",
43041
+ "$id": "https://eudiplo.dev/schemas/v6/PresentationConfigFile.schema.json",
43042
+ "title": "PresentationConfigFile",
42813
43043
  "type": "object",
42814
43044
  "properties": {
42815
43045
  "$schema": {
42816
43046
  "type": "string",
42817
- "const": "https://eudiplo.dev/schemas/v7/IssuanceConfigFile.schema.json"
43047
+ "const": "https://eudiplo.dev/schemas/v6/PresentationConfigFile.schema.json"
42818
43048
  },
42819
43049
  "metadata": {
42820
43050
  "type": "object",
@@ -42836,7 +43066,23 @@ var CONFIG_SCHEMAS = [
42836
43066
  "additionalProperties": false
42837
43067
  },
42838
43068
  "spec": {
42839
- "$ref": "#/$defs/IssuanceConfig"
43069
+ "allOf": [
43070
+ {
43071
+ "$ref": "#/$defs/PresentationConfigCreateDto"
43072
+ },
43073
+ {
43074
+ "type": "object",
43075
+ "required": [
43076
+ "id"
43077
+ ],
43078
+ "properties": {
43079
+ "id": {
43080
+ "type": "string",
43081
+ "minLength": 1
43082
+ }
43083
+ }
43084
+ }
43085
+ ]
42840
43086
  }
42841
43087
  },
42842
43088
  "required": [
@@ -42845,48 +43091,832 @@ var CONFIG_SCHEMAS = [
42845
43091
  ],
42846
43092
  "additionalProperties": false,
42847
43093
  "$defs": {
42848
- "IssuanceConfig": {
43094
+ "PresentationConfigCreateDto": {
42849
43095
  "type": "object",
42850
43096
  "properties": {
42851
- "batchSize": {
42852
- "description": "Optional issuance batch size.",
43097
+ "id": {
43098
+ "type": "string",
43099
+ "minLength": 1,
43100
+ "description": "Presentation configuration identifier."
43101
+ },
43102
+ "description": {
43103
+ "description": "Optional presentation configuration description.",
43104
+ "type": [
43105
+ "string",
43106
+ "null"
43107
+ ]
43108
+ },
43109
+ "lifeTime": {
43110
+ "description": "Presentation request lifetime in seconds.",
42853
43111
  "type": "integer",
42854
43112
  "minimum": 1,
42855
43113
  "maximum": 9007199254740991
42856
43114
  },
42857
- "dPopRequired": {
42858
- "description": "Require DPoP proofs for issuance endpoints.",
42859
- "type": "boolean"
43115
+ "skewSeconds": {
43116
+ "description": "Clock skew tolerance in seconds.",
43117
+ "type": "integer",
43118
+ "minimum": 0,
43119
+ "maximum": 9007199254740991
42860
43120
  },
42861
- "walletAttestationRequired": {
42862
- "description": "Default wallet attestation requirement for managed authorization servers.",
42863
- "type": "boolean"
43121
+ "statusCheckMode": {
43122
+ "description": "Revocation/status check mode.",
43123
+ "type": "string",
43124
+ "enum": [
43125
+ "strict",
43126
+ "best_effort",
43127
+ "disabled"
43128
+ ]
42864
43129
  },
42865
- "walletProviderTrustLists": {
42866
- "description": "Shared wallet provider trust lists for key attestations and default authorization server wallet authentication.",
42867
- "type": "array",
42868
- "items": {
42869
- "type": "object",
42870
- "properties": {
42871
- "trustListId": {
42872
- "type": "string",
42873
- "minLength": 1
42874
- },
42875
- "url": {
42876
- "description": "URL of the wallet provider trust list.",
42877
- "type": "string",
42878
- "format": "uri"
42879
- },
42880
- "verifierKey": {
42881
- "description": "Optional verifier key material used for trust list verification.",
42882
- "type": "object",
42883
- "propertyNames": {
42884
- "type": "string"
42885
- },
42886
- "additionalProperties": {}
42887
- },
42888
- "verifierKeyPem": {
42889
- "description": "Optional verifier public key in SPKI PEM form (-----BEGIN PUBLIC KEY-----).",
43130
+ "dcql_query": {
43131
+ "type": "object",
43132
+ "properties": {
43133
+ "credentials": {
43134
+ "minItems": 1,
43135
+ "type": "array",
43136
+ "items": {
43137
+ "oneOf": [
43138
+ {
43139
+ "type": "object",
43140
+ "properties": {
43141
+ "id": {
43142
+ "type": "string",
43143
+ "minLength": 1,
43144
+ "pattern": "^[A-Za-z0-9_-]+$",
43145
+ "description": "Credential query identifier."
43146
+ },
43147
+ "multiple": {
43148
+ "description": "Allow multiple matching credentials.",
43149
+ "type": "boolean"
43150
+ },
43151
+ "claim_sets": {
43152
+ "description": "Optional claim set constraints.",
43153
+ "type": "array",
43154
+ "items": {
43155
+ "type": "array",
43156
+ "items": {
43157
+ "type": "string"
43158
+ }
43159
+ }
43160
+ },
43161
+ "trusted_authorities": {
43162
+ "description": "Optional trusted authority constraints.",
43163
+ "type": "array",
43164
+ "items": {
43165
+ "oneOf": [
43166
+ {
43167
+ "type": "object",
43168
+ "properties": {
43169
+ "type": {
43170
+ "type": "string",
43171
+ "const": "etsi_tl",
43172
+ "description": "Trusted authority type discriminator for ETSI trust lists."
43173
+ },
43174
+ "values": {
43175
+ "type": "array",
43176
+ "items": {
43177
+ "anyOf": [
43178
+ {
43179
+ "type": "object",
43180
+ "properties": {
43181
+ "format": {
43182
+ "description": "Format of the list: a List of Trusted Entities (ETSI TS 119 602) as JWT. Default.",
43183
+ "type": "string",
43184
+ "const": "lote"
43185
+ },
43186
+ "trustListId": {
43187
+ "description": "Optional trust list id reference.",
43188
+ "type": "string"
43189
+ },
43190
+ "url": {
43191
+ "description": "Optional trust list URL reference.",
43192
+ "anyOf": [
43193
+ {
43194
+ "type": "string",
43195
+ "format": "uri"
43196
+ },
43197
+ {
43198
+ "type": "string",
43199
+ "pattern": "^<TENANT_URL>(?:\\/.*)?$"
43200
+ }
43201
+ ]
43202
+ },
43203
+ "verifierKey": {
43204
+ "description": "Optional verifier key material.",
43205
+ "type": "object",
43206
+ "propertyNames": {
43207
+ "type": "string"
43208
+ },
43209
+ "additionalProperties": {}
43210
+ },
43211
+ "verifierX509Der": {
43212
+ "description": "Optional verifier certificate in DER/base64 form.",
43213
+ "type": "string"
43214
+ }
43215
+ },
43216
+ "additionalProperties": false
43217
+ },
43218
+ {
43219
+ "type": "object",
43220
+ "properties": {
43221
+ "format": {
43222
+ "type": "string",
43223
+ "const": "trusted-list",
43224
+ "description": "Format of the list: an ETSI TS 119 612 Trusted List or list of trusted lists as XML."
43225
+ },
43226
+ "url": {
43227
+ "anyOf": [
43228
+ {
43229
+ "type": "string",
43230
+ "format": "uri"
43231
+ },
43232
+ {
43233
+ "type": "string",
43234
+ "pattern": "^<TENANT_URL>(?:\\/.*)?$"
43235
+ }
43236
+ ],
43237
+ "description": "URL of the Trusted List, or of a list of trusted lists (LOTL) whose national lists are followed."
43238
+ },
43239
+ "signingCertificates": {
43240
+ "minItems": 1,
43241
+ "type": "array",
43242
+ "items": {
43243
+ "type": "string",
43244
+ "minLength": 1,
43245
+ "pattern": "^[A-Za-z0-9+/\\s]+={0,2}$"
43246
+ },
43247
+ "description": "Base64 DER certificates one of which must have signed the list: for a list of trusted lists, the signing certificates its operator publishes; for a national list, its scheme operator certificates."
43248
+ },
43249
+ "schemeTerritories": {
43250
+ "description": "For a list of trusted lists: the SchemeTerritory values of the national lists to follow, such as DE. All when absent.",
43251
+ "minItems": 1,
43252
+ "type": "array",
43253
+ "items": {
43254
+ "type": "string",
43255
+ "minLength": 1
43256
+ }
43257
+ }
43258
+ },
43259
+ "required": [
43260
+ "format",
43261
+ "url",
43262
+ "signingCertificates"
43263
+ ],
43264
+ "additionalProperties": false
43265
+ }
43266
+ ],
43267
+ "description": "Reference to a trust list used for authority verification."
43268
+ },
43269
+ "description": "Trust list references for ETSI TL verification."
43270
+ }
43271
+ },
43272
+ "required": [
43273
+ "type",
43274
+ "values"
43275
+ ],
43276
+ "additionalProperties": false
43277
+ },
43278
+ {
43279
+ "type": "object",
43280
+ "properties": {
43281
+ "type": {
43282
+ "type": "string",
43283
+ "const": "openid_federation",
43284
+ "description": "Trusted authority type discriminator for OpenID Federation."
43285
+ },
43286
+ "values": {
43287
+ "type": "array",
43288
+ "items": {
43289
+ "type": "string"
43290
+ },
43291
+ "description": "OpenID Federation authority identifiers."
43292
+ }
43293
+ },
43294
+ "required": [
43295
+ "type",
43296
+ "values"
43297
+ ],
43298
+ "additionalProperties": false
43299
+ }
43300
+ ]
43301
+ }
43302
+ },
43303
+ "format": {
43304
+ "type": "string",
43305
+ "const": "dc+sd-jwt",
43306
+ "description": "Credential format discriminator."
43307
+ },
43308
+ "meta": {
43309
+ "type": "object",
43310
+ "properties": {
43311
+ "vct_values": {
43312
+ "minItems": 1,
43313
+ "type": "array",
43314
+ "items": {
43315
+ "type": "string"
43316
+ },
43317
+ "description": "Accepted VCT values."
43318
+ }
43319
+ },
43320
+ "required": [
43321
+ "vct_values"
43322
+ ],
43323
+ "additionalProperties": false
43324
+ },
43325
+ "claims": {
43326
+ "description": "Optional claim-level constraints.",
43327
+ "type": "array",
43328
+ "items": {
43329
+ "type": "object",
43330
+ "properties": {
43331
+ "id": {
43332
+ "description": "Optional claim query id.",
43333
+ "type": "string"
43334
+ },
43335
+ "path": {
43336
+ "type": "array",
43337
+ "items": {
43338
+ "type": [
43339
+ "string",
43340
+ "number"
43341
+ ]
43342
+ },
43343
+ "description": "Path to the claim value in presented credentials."
43344
+ },
43345
+ "values": {
43346
+ "description": "Optional allowed values for the claim. A disclosed value must equal one of them in type and value.",
43347
+ "minItems": 1,
43348
+ "type": "array",
43349
+ "items": {
43350
+ "anyOf": [
43351
+ {
43352
+ "type": "string"
43353
+ },
43354
+ {
43355
+ "type": "integer",
43356
+ "minimum": -9007199254740991,
43357
+ "maximum": 9007199254740991
43358
+ },
43359
+ {
43360
+ "type": "boolean"
43361
+ }
43362
+ ]
43363
+ }
43364
+ }
43365
+ },
43366
+ "required": [
43367
+ "path"
43368
+ ],
43369
+ "additionalProperties": false
43370
+ }
43371
+ }
43372
+ },
43373
+ "required": [
43374
+ "id",
43375
+ "format",
43376
+ "meta"
43377
+ ],
43378
+ "additionalProperties": false
43379
+ },
43380
+ {
43381
+ "type": "object",
43382
+ "properties": {
43383
+ "id": {
43384
+ "type": "string",
43385
+ "minLength": 1,
43386
+ "pattern": "^[A-Za-z0-9_-]+$",
43387
+ "description": "Credential query identifier."
43388
+ },
43389
+ "multiple": {
43390
+ "description": "Allow multiple matching credentials.",
43391
+ "type": "boolean"
43392
+ },
43393
+ "claim_sets": {
43394
+ "description": "Optional claim set constraints.",
43395
+ "type": "array",
43396
+ "items": {
43397
+ "type": "array",
43398
+ "items": {
43399
+ "type": "string"
43400
+ }
43401
+ }
43402
+ },
43403
+ "trusted_authorities": {
43404
+ "description": "Optional trusted authority constraints.",
43405
+ "type": "array",
43406
+ "items": {
43407
+ "oneOf": [
43408
+ {
43409
+ "type": "object",
43410
+ "properties": {
43411
+ "type": {
43412
+ "type": "string",
43413
+ "const": "etsi_tl",
43414
+ "description": "Trusted authority type discriminator for ETSI trust lists."
43415
+ },
43416
+ "values": {
43417
+ "type": "array",
43418
+ "items": {
43419
+ "anyOf": [
43420
+ {
43421
+ "type": "object",
43422
+ "properties": {
43423
+ "format": {
43424
+ "description": "Format of the list: a List of Trusted Entities (ETSI TS 119 602) as JWT. Default.",
43425
+ "type": "string",
43426
+ "const": "lote"
43427
+ },
43428
+ "trustListId": {
43429
+ "description": "Optional trust list id reference.",
43430
+ "type": "string"
43431
+ },
43432
+ "url": {
43433
+ "description": "Optional trust list URL reference.",
43434
+ "anyOf": [
43435
+ {
43436
+ "type": "string",
43437
+ "format": "uri"
43438
+ },
43439
+ {
43440
+ "type": "string",
43441
+ "pattern": "^<TENANT_URL>(?:\\/.*)?$"
43442
+ }
43443
+ ]
43444
+ },
43445
+ "verifierKey": {
43446
+ "description": "Optional verifier key material.",
43447
+ "type": "object",
43448
+ "propertyNames": {
43449
+ "type": "string"
43450
+ },
43451
+ "additionalProperties": {}
43452
+ },
43453
+ "verifierX509Der": {
43454
+ "description": "Optional verifier certificate in DER/base64 form.",
43455
+ "type": "string"
43456
+ }
43457
+ },
43458
+ "additionalProperties": false
43459
+ },
43460
+ {
43461
+ "type": "object",
43462
+ "properties": {
43463
+ "format": {
43464
+ "type": "string",
43465
+ "const": "trusted-list",
43466
+ "description": "Format of the list: an ETSI TS 119 612 Trusted List or list of trusted lists as XML."
43467
+ },
43468
+ "url": {
43469
+ "anyOf": [
43470
+ {
43471
+ "type": "string",
43472
+ "format": "uri"
43473
+ },
43474
+ {
43475
+ "type": "string",
43476
+ "pattern": "^<TENANT_URL>(?:\\/.*)?$"
43477
+ }
43478
+ ],
43479
+ "description": "URL of the Trusted List, or of a list of trusted lists (LOTL) whose national lists are followed."
43480
+ },
43481
+ "signingCertificates": {
43482
+ "minItems": 1,
43483
+ "type": "array",
43484
+ "items": {
43485
+ "type": "string",
43486
+ "minLength": 1,
43487
+ "pattern": "^[A-Za-z0-9+/\\s]+={0,2}$"
43488
+ },
43489
+ "description": "Base64 DER certificates one of which must have signed the list: for a list of trusted lists, the signing certificates its operator publishes; for a national list, its scheme operator certificates."
43490
+ },
43491
+ "schemeTerritories": {
43492
+ "description": "For a list of trusted lists: the SchemeTerritory values of the national lists to follow, such as DE. All when absent.",
43493
+ "minItems": 1,
43494
+ "type": "array",
43495
+ "items": {
43496
+ "type": "string",
43497
+ "minLength": 1
43498
+ }
43499
+ }
43500
+ },
43501
+ "required": [
43502
+ "format",
43503
+ "url",
43504
+ "signingCertificates"
43505
+ ],
43506
+ "additionalProperties": false
43507
+ }
43508
+ ],
43509
+ "description": "Reference to a trust list used for authority verification."
43510
+ },
43511
+ "description": "Trust list references for ETSI TL verification."
43512
+ }
43513
+ },
43514
+ "required": [
43515
+ "type",
43516
+ "values"
43517
+ ],
43518
+ "additionalProperties": false
43519
+ },
43520
+ {
43521
+ "type": "object",
43522
+ "properties": {
43523
+ "type": {
43524
+ "type": "string",
43525
+ "const": "openid_federation",
43526
+ "description": "Trusted authority type discriminator for OpenID Federation."
43527
+ },
43528
+ "values": {
43529
+ "type": "array",
43530
+ "items": {
43531
+ "type": "string"
43532
+ },
43533
+ "description": "OpenID Federation authority identifiers."
43534
+ }
43535
+ },
43536
+ "required": [
43537
+ "type",
43538
+ "values"
43539
+ ],
43540
+ "additionalProperties": false
43541
+ }
43542
+ ]
43543
+ }
43544
+ },
43545
+ "format": {
43546
+ "type": "string",
43547
+ "const": "mso_mdoc",
43548
+ "description": "Credential format discriminator."
43549
+ },
43550
+ "meta": {
43551
+ "type": "object",
43552
+ "properties": {
43553
+ "doctype_value": {
43554
+ "type": "string",
43555
+ "minLength": 1,
43556
+ "description": "Expected mDoc doctype value."
43557
+ }
43558
+ },
43559
+ "required": [
43560
+ "doctype_value"
43561
+ ],
43562
+ "additionalProperties": false
43563
+ },
43564
+ "claims": {
43565
+ "description": "Optional mDoc claim-level constraints.",
43566
+ "type": "array",
43567
+ "items": {
43568
+ "type": "object",
43569
+ "properties": {
43570
+ "id": {
43571
+ "description": "Optional claim query id.",
43572
+ "type": "string"
43573
+ },
43574
+ "path": {
43575
+ "type": "array",
43576
+ "items": {
43577
+ "type": [
43578
+ "string",
43579
+ "number"
43580
+ ]
43581
+ },
43582
+ "description": "Path to the claim value in presented credentials."
43583
+ },
43584
+ "values": {
43585
+ "description": "Optional allowed values for the claim. A disclosed value must equal one of them in type and value.",
43586
+ "minItems": 1,
43587
+ "type": "array",
43588
+ "items": {
43589
+ "anyOf": [
43590
+ {
43591
+ "type": "string"
43592
+ },
43593
+ {
43594
+ "type": "integer",
43595
+ "minimum": -9007199254740991,
43596
+ "maximum": 9007199254740991
43597
+ },
43598
+ {
43599
+ "type": "boolean"
43600
+ }
43601
+ ]
43602
+ }
43603
+ },
43604
+ "intent_to_retain": {
43605
+ "description": "Whether relying party intends to retain the claim.",
43606
+ "type": "boolean"
43607
+ }
43608
+ },
43609
+ "required": [
43610
+ "path"
43611
+ ],
43612
+ "additionalProperties": false
43613
+ }
43614
+ }
43615
+ },
43616
+ "required": [
43617
+ "id",
43618
+ "format",
43619
+ "meta"
43620
+ ],
43621
+ "additionalProperties": false
43622
+ }
43623
+ ]
43624
+ },
43625
+ "description": "Credential queries requested by the verifier."
43626
+ },
43627
+ "credential_sets": {
43628
+ "description": "Optional higher-level credential set requirements.",
43629
+ "type": "array",
43630
+ "items": {
43631
+ "type": "object",
43632
+ "properties": {
43633
+ "options": {
43634
+ "minItems": 1,
43635
+ "type": "array",
43636
+ "items": {
43637
+ "minItems": 1,
43638
+ "type": "array",
43639
+ "items": {
43640
+ "type": "string"
43641
+ }
43642
+ },
43643
+ "description": "Alternative credential query id combinations."
43644
+ },
43645
+ "required": {
43646
+ "description": "Whether this credential set is mandatory.",
43647
+ "type": "boolean"
43648
+ }
43649
+ },
43650
+ "required": [
43651
+ "options"
43652
+ ],
43653
+ "additionalProperties": false
43654
+ }
43655
+ }
43656
+ },
43657
+ "required": [
43658
+ "credentials"
43659
+ ],
43660
+ "additionalProperties": false,
43661
+ "description": "DCQL query defining requested credentials and claims."
43662
+ },
43663
+ "transaction_data": {
43664
+ "description": "Optional transaction data descriptors.",
43665
+ "anyOf": [
43666
+ {
43667
+ "type": "array",
43668
+ "items": {
43669
+ "type": "object",
43670
+ "properties": {
43671
+ "type": {
43672
+ "type": "string",
43673
+ "description": "Transaction data type identifier."
43674
+ },
43675
+ "credential_ids": {
43676
+ "type": "array",
43677
+ "items": {
43678
+ "type": "string"
43679
+ },
43680
+ "description": "Credential query ids this transaction data applies to."
43681
+ },
43682
+ "payload": {
43683
+ "description": "Transaction details. Required for TS12 SCA transaction data."
43684
+ }
43685
+ },
43686
+ "required": [
43687
+ "type",
43688
+ "credential_ids"
43689
+ ],
43690
+ "additionalProperties": {}
43691
+ }
43692
+ },
43693
+ {
43694
+ "type": "null"
43695
+ }
43696
+ ]
43697
+ },
43698
+ "registration_cert": {
43699
+ "description": "Registration certificate from a registrar, with the purpose and privacy policy it is requested with.",
43700
+ "anyOf": [
43701
+ {
43702
+ "type": "object",
43703
+ "properties": {
43704
+ "jwt": {
43705
+ "description": "Registration certificate JWT issued by a registrar. Attached to every request object as is; it must be valid and authorize every credential the DCQL query requests.",
43706
+ "type": "string",
43707
+ "minLength": 1
43708
+ },
43709
+ "purpose": {
43710
+ "description": "Why the data is requested (GDPR purpose), one text per language. Used when a certificate is requested from a registrar.",
43711
+ "type": "array",
43712
+ "items": {
43713
+ "type": "object",
43714
+ "properties": {
43715
+ "lang": {
43716
+ "type": "string",
43717
+ "minLength": 1,
43718
+ "description": "Language tag of the text, such as en or pt-BR. The EUDI Hub takes two-letter codes only."
43719
+ },
43720
+ "content": {
43721
+ "type": "string",
43722
+ "minLength": 1,
43723
+ "description": "The purpose in that language."
43724
+ }
43725
+ },
43726
+ "required": [
43727
+ "lang",
43728
+ "content"
43729
+ ],
43730
+ "additionalProperties": false
43731
+ }
43732
+ },
43733
+ "privacy_policy": {
43734
+ "description": "URL of the privacy policy that applies to this request. Used when a certificate is requested from a registrar.",
43735
+ "type": "string",
43736
+ "minLength": 1
43737
+ }
43738
+ },
43739
+ "additionalProperties": false
43740
+ },
43741
+ {
43742
+ "type": "null"
43743
+ }
43744
+ ]
43745
+ },
43746
+ "webhookEndpointId": {
43747
+ "description": "Optional webhook endpoint id for presentation callbacks.",
43748
+ "type": [
43749
+ "string",
43750
+ "null"
43751
+ ]
43752
+ },
43753
+ "attached": {
43754
+ "description": "Optional attachments included with presentation requests.",
43755
+ "anyOf": [
43756
+ {
43757
+ "type": "array",
43758
+ "items": {
43759
+ "type": "object",
43760
+ "properties": {
43761
+ "format": {
43762
+ "type": "string",
43763
+ "description": "Attachment format identifier."
43764
+ },
43765
+ "data": {
43766
+ "description": "Attachment payload."
43767
+ },
43768
+ "credential_ids": {
43769
+ "description": "Optional credential query ids bound to this attachment.",
43770
+ "type": "array",
43771
+ "items": {
43772
+ "type": "string"
43773
+ }
43774
+ }
43775
+ },
43776
+ "required": [
43777
+ "format",
43778
+ "data"
43779
+ ],
43780
+ "additionalProperties": false
43781
+ }
43782
+ },
43783
+ {
43784
+ "type": "null"
43785
+ }
43786
+ ]
43787
+ },
43788
+ "redirectUri": {
43789
+ "description": "Optional redirect URI after presentation completion.",
43790
+ "type": [
43791
+ "string",
43792
+ "null"
43793
+ ]
43794
+ },
43795
+ "accessKeyChainId": {
43796
+ "description": "Optional key chain id for access token/auth operations.",
43797
+ "type": [
43798
+ "string",
43799
+ "null"
43800
+ ]
43801
+ },
43802
+ "allowedOrigins": {
43803
+ "description": "Origins (http(s)://host[:port]) of the web pages allowed to request this presentation over the Digital Credentials API. When set, dc-api and iso-18013-7 offers are refused for any other expected_origin, and an offer without expected_origin uses the only listed origin. Unset: any expected_origin is accepted. Not used for uri requests.",
43804
+ "anyOf": [
43805
+ {
43806
+ "maxItems": 100,
43807
+ "type": "array",
43808
+ "items": {
43809
+ "type": "string",
43810
+ "pattern": "^(?:https:\\/\\/(?:[a-z0-9.-]+|\\[[0-9a-f:.]+\\])(?::(?:[1-9]|[1-9][0-9]|[1-35-9][0-9]{2}|4[0-35-9][0-9]|44[0-24-9]|[1-9][0-9]{3,4}))?|http:\\/\\/(?:[a-z0-9.-]+|\\[[0-9a-f:.]+\\])(?::(?:[1-9]|[1-79][0-9]|8[1-9]|[1-9][0-9]{2,4}))?)$"
43811
+ }
43812
+ },
43813
+ {
43814
+ "type": "null"
43815
+ }
43816
+ ]
43817
+ },
43818
+ "readerAuth": {
43819
+ "description": "Whether reader authentication is required for mDoc requests.",
43820
+ "type": [
43821
+ "boolean",
43822
+ "null"
43823
+ ]
43824
+ },
43825
+ "allowUntrustedIssuers": {
43826
+ "description": "Accept DCQL credential queries without trusted_authorities. Credentials of such queries are verified without checking their issuer: any issuer with a valid signature is accepted. For development and interoperability tests only. Defaults to false.",
43827
+ "type": "boolean"
43828
+ }
43829
+ },
43830
+ "required": [
43831
+ "id",
43832
+ "dcql_query"
43833
+ ],
43834
+ "additionalProperties": false,
43835
+ "title": "PresentationConfigCreateDto"
43836
+ }
43837
+ }
43838
+ },
43839
+ {
43840
+ "$schema": "https://json-schema.org/draft/2020-12/schema",
43841
+ "$id": "https://eudiplo.dev/schemas/v7/IssuanceConfigFile.schema.json",
43842
+ "title": "IssuanceConfigFile",
43843
+ "type": "object",
43844
+ "properties": {
43845
+ "$schema": {
43846
+ "type": "string",
43847
+ "const": "https://eudiplo.dev/schemas/v7/IssuanceConfigFile.schema.json"
43848
+ },
43849
+ "metadata": {
43850
+ "type": "object",
43851
+ "properties": {
43852
+ "generation": {
43853
+ "type": "integer",
43854
+ "minimum": 1,
43855
+ "description": "Monotonically increasing configuration generation."
43856
+ },
43857
+ "ownership": {
43858
+ "type": "string",
43859
+ "enum": [
43860
+ "unmanaged",
43861
+ "file-managed"
43862
+ ],
43863
+ "description": "Requested ownership recorded when the document is applied."
43864
+ }
43865
+ },
43866
+ "additionalProperties": false
43867
+ },
43868
+ "spec": {
43869
+ "$ref": "#/$defs/IssuanceConfig"
43870
+ }
43871
+ },
43872
+ "required": [
43873
+ "$schema",
43874
+ "spec"
43875
+ ],
43876
+ "additionalProperties": false,
43877
+ "$defs": {
43878
+ "IssuanceConfig": {
43879
+ "type": "object",
43880
+ "properties": {
43881
+ "batchSize": {
43882
+ "description": "Optional issuance batch size.",
43883
+ "type": "integer",
43884
+ "minimum": 1,
43885
+ "maximum": 9007199254740991
43886
+ },
43887
+ "dPopRequired": {
43888
+ "description": "Require DPoP proofs for issuance endpoints.",
43889
+ "type": "boolean"
43890
+ },
43891
+ "walletAttestationRequired": {
43892
+ "description": "Default wallet attestation requirement for managed authorization servers.",
43893
+ "type": "boolean"
43894
+ },
43895
+ "walletProviderTrustLists": {
43896
+ "description": "Shared wallet provider trust lists for key attestations and default authorization server wallet authentication.",
43897
+ "type": "array",
43898
+ "items": {
43899
+ "type": "object",
43900
+ "properties": {
43901
+ "trustListId": {
43902
+ "type": "string",
43903
+ "minLength": 1
43904
+ },
43905
+ "url": {
43906
+ "description": "URL of the wallet provider trust list.",
43907
+ "type": "string",
43908
+ "format": "uri"
43909
+ },
43910
+ "verifierKey": {
43911
+ "description": "Optional verifier key material used for trust list verification.",
43912
+ "type": "object",
43913
+ "propertyNames": {
43914
+ "type": "string"
43915
+ },
43916
+ "additionalProperties": {}
43917
+ },
43918
+ "verifierKeyPem": {
43919
+ "description": "Optional verifier public key in SPKI PEM form (-----BEGIN PUBLIC KEY-----).",
42890
43920
  "type": "string",
42891
43921
  "pattern": "^\\s*-----BEGIN PUBLIC KEY-----[A-Za-z0-9+/=\\s]+-----END PUBLIC KEY-----\\s*$"
42892
43922
  },
@@ -43741,6 +44771,19 @@ function resolveConfigVariables(input, env, escapes = "resolve") {
43741
44771
  function escapeConfigPlaceholders(input) {
43742
44772
  return mapStrings(input, escapeText);
43743
44773
  }
44774
+ function readConfigFileValues(input, escapes = "resolve") {
44775
+ const placeholders = [];
44776
+ const references = [];
44777
+ const value = mapStrings(input, (text, path2) => replacePlaceholders(text, ({ type, match }) => {
44778
+ const whole = match === text;
44779
+ if (type === "reference")
44780
+ references.push({ path: path2, reference: match, whole });
44781
+ else
44782
+ placeholders.push({ path: path2, placeholder: match, whole });
44783
+ return void 0;
44784
+ }, escapes));
44785
+ return { value, placeholders, references };
44786
+ }
43744
44787
  function stableConfigJson(value) {
43745
44788
  function sort(item) {
43746
44789
  if (Array.isArray(item))
@@ -43841,6 +44884,9 @@ function validateConfigDocument(document) {
43841
44884
  issues.push(...configRuleIssues(document));
43842
44885
  return issues;
43843
44886
  }
44887
+ function validateConfigFile(document) {
44888
+ return validateConfigDocument(document.kind === "KmsConfig" ? document : { ...document, spec: readConfigFileValues(document.spec).value });
44889
+ }
43844
44890
  function configRuleIssues(document) {
43845
44891
  const display = document.spec.config?.display;
43846
44892
  if (document.kind !== "CredentialConfig" || resolveConfigIdentity(serializeDocument(document)).version < 4 || !Array.isArray(display))
@@ -44215,7 +45261,7 @@ import {
44215
45261
 
44216
45262
  // src/commands/config/portability/migrations.ts
44217
45263
  function upgradeDocument(input) {
44218
- const result = migrateDocument(input, validateConfigDocument);
45264
+ const result = migrateDocument(input, validateConfigFile);
44219
45265
  return { ...result, document: serializeDocument(result.document) };
44220
45266
  }
44221
45267
 
@@ -47201,7 +48247,7 @@ function createDeploymentCommands(context, setExitCode) {
47201
48247
  // package.json
47202
48248
  var package_default = {
47203
48249
  name: "@eudiplo/cli",
47204
- version: "10.1.0-main.cac27b2",
48250
+ version: "10.1.0-main.d337e12",
47205
48251
  description: "Deployment-aware command line tools for EUDIPLO",
47206
48252
  private: false,
47207
48253
  type: "module",
@@ -47556,7 +48602,7 @@ var kmsHealthCheck = {
47556
48602
  return {
47557
48603
  name: "KMS providers",
47558
48604
  status: "skip",
47559
- message: `Needs a tenant client with issuance:manage, presentation:manage or keys:manage (${response.reason}).`
48605
+ message: `Needs a tenant client with issuance:read, presentation:read or keys:manage, or a role that includes one of them (${response.reason}).`
47560
48606
  };
47561
48607
  }
47562
48608
  return {