Skip to content

Commit 72af0ef

Browse files
Add RFC 9421 support via http-sig capability and publicKeys array
* Add http-sig capability to advertise RFC 9421 support * Add publicKeys array with algorithm field for HTTP Message Signatures * Deprecate publicKey field in favor of publicKeys * Reference IANA HTTP Signature Algorithms Registry Co-authored-by: Giuseppe Lo Presti <[email protected]>
1 parent 45c47fe commit 72af0ef

File tree

2 files changed

+70
-12
lines changed

2 files changed

+70
-12
lines changed

IETF-RFC.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -657,6 +657,9 @@ contain the following information about its OCM API:
657657
for a short-lived bearer token.
658658
_ `"invite-wayf"` - to indicate that this OCM Server exposes a WAYF
659659
Page to facilitate the Invite flow.
660+
_ `"http-sig"` - to indicate that this OCM Server supports
661+
[RFC9421] HTTP Message Signatures and advertises public keys in the
662+
`publicKeys` array for signature verification.
660663
* OPTIONAL: criteria (array of string) - The criteria for accepting a
661664
Share Creation Notification.
662665
As all Receiving Servers SHOULD require the use of TLS in API
@@ -674,19 +677,37 @@ contain the following information about its OCM API:
674677
address \* `"invite"` - an invite MUST have been exchanged between the
675678
sender and the receiver before a Share Creation Notification can be
676679
sent
677-
* OPTIONAL: publicKey (object) - The signatory used to sign outgoing
678-
request to confirm its origin.
679-
The signatory is optional, but if present, it MUST contain
680-
two string fields, `id` and `publicKeyPem`.
680+
* OPTIONAL: publicKey (object) - DEPRECATED: Use publicKeys array
681+
instead for RFC 9421 support.
682+
Legacy field for draft-cavage HTTP Signatures (RSA only).
683+
Maintained for backward compatibility with existing deployments.
684+
The signatory is optional, but if present, it MUST contain
685+
two string fields, `keyId` and `publicKeyPem`.
681686
properties:
682687
- REQUIRED keyId (string) unique id of the key in URI format. The
683688
hostname set the origin of the request and MUST be
684689
identical to the current discovery endpoint.
685690
Example: https://my-cloud-storage.org/ocm#signature
686-
- REQUIRED publicKeyPem (string) - PEM-encoded version of the public
687-
key.
691+
- REQUIRED publicKeyPem (string) - PEM-encoded RSA public key for
692+
draft-cavage signatures.
688693
Example:
689694
"----BEGIN PUBLIC KEY----\n...\n----END PUBLIC KEY----\n"
695+
* OPTIONAL: publicKeys (array of objects) - Array of public keys for
696+
[RFC9421] HTTP Message Signatures.
697+
Servers advertising the "http-sig" capability MUST provide this
698+
field. Clients SHOULD prefer [RFC9421] signatures when this capability
699+
is present. Each object in the array MUST contain:
700+
- REQUIRED keyId (string) - Unique identifier for this key in URI
701+
format. Hostname MUST match the discovery endpoint hostname.
702+
Example: https://my-cloud-storage.org/ocm#key-1
703+
- REQUIRED publicKeyPem (string) - PEM-encoded public key for
704+
[RFC9421] signatures.
705+
Example:
706+
"----BEGIN PUBLIC KEY----\nMCowBQYDK...\n----END PUBLIC KEY----\n"
707+
- REQUIRED algorithm (string) - Cryptographic algorithm identifier
708+
from the IANA HTTP Signature Algorithms Registry as defined in
709+
[RFC9421] Section 6.2.
710+
Example: "ed25519"
690711
* OPTIONAL: inviteAcceptDialog (string) - URL path of a web page where
691712
a user can accept an invite, when query parameters `"token"` and
692713
`"providerDomain"` are provided. Implementations that offer the

spec.yaml

Lines changed: 43 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -420,9 +420,11 @@ components:
420420
- protocol-object
421421
- invites
422422
- exchange-token
423+
- http-sig
423424
example:
424425
- webdav-uri
425426
- protocol-object
427+
- http-sig
426428
criteria:
427429
type: array
428430
description: |
@@ -442,26 +444,61 @@ components:
442444
- invite
443445
publicKey:
444446
type: object
447+
deprecated: true
445448
description: >
446-
The signatory used to sign outgoing request to confirm its origin.
447-
The
448-
signatory is optional but it MUST contain `id` and `publicKeyPem`.
449+
DEPRECATED: Use publicKeys array instead for RFC 9421 support.
450+
Legacy field for draft-cavage HTTP Signatures (RSA only).
451+
Maintained for backward compatibility with existing deployments.
452+
The signatory is optional but it MUST contain `keyId` and `publicKeyPem`.
449453
properties:
450454
keyId:
451455
type: string
452456
description: >
453457
unique id of the key in URI format. The hostname set the origin
454-
of the
455-
request and MUST be identical to the current discovery endpoint.
458+
of the request and MUST be identical to the current discovery endpoint.
456459
example: https://my-cloud-storage.org/ocm#signature
457460
publicKeyPem:
458461
type: string
459462
description: |
460-
PEM-encoded version of the public key.
463+
PEM-encoded RSA public key for draft-cavage signatures.
461464
example: |
462465
-----BEGIN PUBLIC KEY-----
463466
MII...QDD
464467
-----END PUBLIC KEY-----
468+
publicKeys:
469+
type: array
470+
description: >
471+
Array of public keys for RFC 9421 HTTP Message Signatures.
472+
Servers advertising the "rfc-http-sig" capability MUST provide this field.
473+
Clients SHOULD prefer RFC 9421 signatures when this capability is present.
474+
items:
475+
type: object
476+
required:
477+
- keyId
478+
- publicKeyPem
479+
- algorithm
480+
properties:
481+
keyId:
482+
type: string
483+
format: uri
484+
description: >
485+
Unique identifier for this key in URI format.
486+
Hostname MUST match the discovery endpoint hostname.
487+
example: https://my-cloud-storage.org/ocm#key-1
488+
publicKeyPem:
489+
type: string
490+
description: |
491+
PEM-encoded public key for RFC 9421 signatures.
492+
example: |
493+
-----BEGIN PUBLIC KEY-----
494+
MCowBQYDK2VwAyEA...
495+
-----END PUBLIC KEY-----
496+
algorithm:
497+
type: string
498+
description: >
499+
Cryptographic algorithm identifier from the IANA HTTP Signature
500+
Algorithms Registry as defined in RFC 9421 Section 6.2.
501+
example: ed25519
465502
tokenEndPoint:
466503
type: string
467504
description: >

0 commit comments

Comments
 (0)