diff --git a/spec/examples/create-destination.yml b/spec/examples/create-destination.yml index bb8a9759d79aa95b269540c91bbcfdc761f4512f..ea093dc7edc257539961c6241d83eb49bb6e5372 100644 --- a/spec/examples/create-destination.yml +++ b/spec/examples/create-destination.yml @@ -10,5 +10,6 @@ value: callback: 'http://127.0.0.1:4010/voluptas' encryptionKid: my-key-id-0xfff keys: - - kty: RSA - kid: my-key-id-0xfff + keys: + - kty: RSA + kid: my-key-id-0xfff diff --git a/spec/examples/destination-list.yml b/spec/examples/destination-list.yml index 1483043a5f703c71d49c1b8b63e4290e36e7173b..3aaa043647249ecbfcba2b2465d4bb845632bef6 100644 --- a/spec/examples/destination-list.yml +++ b/spec/examples/destination-list.yml @@ -6,8 +6,9 @@ value: schemaSource: none encryptionKid: my-key-id-0xfff keys: - - kty: RSA - kid: my-key-id-0xfff + keys: + - kty: RSA + kid: my-key-id-0xfff - destinationId: 2f59b8c6-3206-4734-aa21-a7b2a4d92f7a schemas: - mimeType: application/xml @@ -17,7 +18,8 @@ value: - mimeType: application/xml schemaSource: fim schemaId: S99000001V1.0 - encryptionKid: my-key-id-0xfff + encryptionKid: my-key-id-0xeee keys: - - kty: RSA - kid: my-key-id-0xfff + keys: + - kty: RSA + kid: my-key-id-0xeee diff --git a/spec/examples/destination.yml b/spec/examples/destination.yml index e91f109085dcc2304d175a4bced0e004fc84a72d..7a10b48ce527cd4e43136d46407f30268cfa381c 100644 --- a/spec/examples/destination.yml +++ b/spec/examples/destination.yml @@ -5,5 +5,6 @@ value: schemaSource: none encryptionKid: my-key-id-0xfff keys: - - kty: RSA - kid: my-key-id-0xfff + keys: + - kty: RSA + kid: my-key-id-0xfff diff --git a/spec/examples/update-destination.yml b/spec/examples/update-destination.yml index bb8a9759d79aa95b269540c91bbcfdc761f4512f..ea093dc7edc257539961c6241d83eb49bb6e5372 100644 --- a/spec/examples/update-destination.yml +++ b/spec/examples/update-destination.yml @@ -10,5 +10,6 @@ value: callback: 'http://127.0.0.1:4010/voluptas' encryptionKid: my-key-id-0xfff keys: - - kty: RSA - kid: my-key-id-0xfff + keys: + - kty: RSA + kid: my-key-id-0xfff diff --git a/spec/schemas/create-destination.yml b/spec/schemas/create-destination.yml index 60513190d85fb0d2a12c3f0fd9c9bcec2482809d..6a7bde6d9ddf58067a81e7d53a74edba9979aa8c 100644 --- a/spec/schemas/create-destination.yml +++ b/spec/schemas/create-destination.yml @@ -2,6 +2,12 @@ title: Objekt zum Erzeugen eines Zustellpunkts description: 'Notwendige Struktur, um einen Zustellpunkt zu hinterlegen.' type: object additionalProperties: false +required: + - contact + - schemas + - callback + - encryptionKid + - keys properties: contact: $ref: './contact.yml' @@ -21,17 +27,6 @@ properties: type: string maxLength: 64 description: 'Öffentlicher Teil des Verschlüsselungsschlüssels der Destination. Ist im Attribut `keys` abrufbar.' - # signingKid ist nicht nötig, da diese in einer signierten Nachricht enthalten ist. + # signingKid ist nicht nötig, da diese in einer signierten Nachricht enthalten ist. keys: - type: array - description: 'Öffentliche Schlüssel der Destination' - items: - uniqueItems: true - minItems: 1 - $ref: './jwk.yml' -required: - - contact - - schemas - - callback - - encryptionKid - - keys + $ref: './jwks.yml' diff --git a/spec/schemas/destination.yml b/spec/schemas/destination.yml index d5a8f40aed310533b58d599aa82cc4bf6145e91e..4ba1d9367c5c0948f27b15057af79801db6fa0a2 100644 --- a/spec/schemas/destination.yml +++ b/spec/schemas/destination.yml @@ -1,6 +1,11 @@ title: Zustellpunkt description: Repräsentation eines Zustellpunktes mit den öffentlich einsehbaren Attributen type: object +required: + - destinationId + - schemas + - encryptionKid + - keys properties: destinationId: type: string @@ -21,14 +26,4 @@ properties: description: 'Öffentlicher Teil des Verschlüsselungsschlüssels der Destination. Ist im Attribut `keys` abrufbar.' # signingKid ist nicht nötig, da diese in einer signierten Nachricht enthalten ist. keys: - type: array - description: 'Öffentliche Schlüssel der Destination' - items: - uniqueItems: true - minItems: 1 - $ref: './jwk.yml' -required: - - destinationId - - schemas - - encryptionKid - - keys + $ref: './jwks.yml' diff --git a/spec/schemas/jwks.yml b/spec/schemas/jwks.yml new file mode 100644 index 0000000000000000000000000000000000000000..6ce9859fb66b0693b8b3f3349e9afdde2c24b451 --- /dev/null +++ b/spec/schemas/jwks.yml @@ -0,0 +1,12 @@ +title: JSON Web Key Set (JWKS) +description: 'JWKS nach https://datatracker.ietf.org/doc/html/rfc7517#section-5' +type: object +required: + - keys +properties: + keys: + type: array + uniqueItems: true + minItems: 1 + items: + $ref: './jwk.yml' diff --git a/spec/schemas/update-destination.yml b/spec/schemas/update-destination.yml index 5286cb26ee373eacf4f35f66e3f2808754af4610..be72a84288ab85c4c97b3dcc2efa38c359a110d4 100644 --- a/spec/schemas/update-destination.yml +++ b/spec/schemas/update-destination.yml @@ -29,9 +29,4 @@ properties: description: 'Öffentlicher Teil des Verschlüsselungsschlüssels der Destination. Ist im Attribut `keys` abrufbar.' # signingKid ist nicht nötig, da diese in einer signierten Nachricht enthalten ist. keys: - type: array - description: 'Öffentliche Schlüssel der Destination' - items: - uniqueItems: true - minItems: 1 - $ref: './jwk.yml' + $ref: './jwks.yml'