Skip to content

Commit bd3dbe2

Browse files
Apply review feedback from Mahdi on PR #391
- Require https for jwksUri in spec.yaml and I-D text - Add explicit discard case for http-sig without jwksUri - Drop "or otherwise" from JWK Set fetch rule - Add reject step in verification procedure for missing jwksUri - Use "signature parameters" per RFC 9421 terminology - Rename "JWKS Endpoint" section to "Published JWK Set" - Expand RFC 9864 title to full published form - Align "as specified under" with the SHOULD in normative text - Reference RFC 9110 for Date header in verification procedure Co-authored-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
1 parent 800476d commit bd3dbe2

2 files changed

Lines changed: 32 additions & 20 deletions

File tree

IETF-OCM.md

Lines changed: 30 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -771,12 +771,12 @@ contain the following information about its OCM API:
771771
`"/index.php/apps/sciencemesh/accept"` is specified here then a WAYF
772772
Page SHOULD redirect the end-user to `/index.php/apps/sciencemesh/
773773
accept?token=zi5kooKu3ivohr9a&providerDomain=cloud.example.org`.
774-
* OPTIONAL: jwksUri (string) - URL of a JWK Set document [RFC7517]
775-
containing the public keys this OCM Server uses for HTTP Message
776-
Signatures. The URL is discovered from this field; it is not a
777-
fixed path in the OCM API.
774+
* OPTIONAL: jwksUri (string) - https URL of a JWK Set document
775+
[RFC7517] containing the public keys this OCM Server uses for HTTP
776+
Message Signatures. The URL is discovered from this field; it is
777+
not a fixed path in the OCM API.
778778
Implementations that advertise the `"http-sig"` capability MUST
779-
provide this URL as well.
779+
provide this URL as well, and it MUST use https.
780780
Example: `"https://cloud.example.org/ocm/jwks"`.
781781
* OPTIONAL: tokenEndPoint (string) - URL of the token endpoint hosted by
782782
this OCM Server. When this OCM Server acts as Sending Server, the
@@ -837,16 +837,17 @@ components:
837837
* "content-digest" - [RFC9530] digest of the body
838838
* "content-length" - message size
839839

840-
The Signature-Input parameters MUST include `created` and `keyid`.
840+
The signature parameters MUST include `created` and `keyid`.
841841
Freshness and replay protection are anchored on `created` (see
842842
Verification Requirements). The `keyid` value MUST be equal to the
843843
`kid` value of the corresponding key in the signer's JWK Set (see
844844
[Keys and Algorithms](#keys-and-algorithms)).
845845

846846
The `Date` header is deliberately not covered by the signature:
847-
intermediaries commonly rewrite it, which would make signatures
848-
fragile, and the `created` signature parameter already conveys the
849-
message's creation time (see Section 7.2.4 of [RFC9421]).
847+
intermediaries sometimes rewrite it (see Section 6.6.1 of [RFC9110]),
848+
which would make signatures fragile, and the `created` signature
849+
parameter already conveys the message's creation time (see
850+
Section 7.2.4 of [RFC9421]).
850851

851852
The `content-digest` component binds the request body to the signature,
852853
protecting it against modification in transit. Its value MUST use a
@@ -1280,15 +1281,18 @@ A 503 response status means that the Receiver is temporary unavailable.
12801281
The Receiving Server MAY discard the notification if any of the
12811282
following hold true:
12821283

1283-
* the HTTP Signature is missing but the Sending Server advertises the
1284-
`http-sig` capability in the Discovery response obtained from the
1285-
FQDN part of the `sender` field in the request body
1286-
* the HTTP Signature is missing
1287-
* the HTTP Signature is not valid (see [HTTP Message
1284+
* the HTTP Message Signature is missing but the Sending Server
1285+
advertises the `http-sig` capability in the Discovery response
1286+
obtained from the FQDN part of the `sender` field in the request
1287+
body
1288+
* the Sending Server advertises the `http-sig` capability but its
1289+
Discovery response carries no `jwksUri`
1290+
* the HTTP Message Signature is missing
1291+
* the HTTP Message Signature is not valid (see [HTTP Message
12881292
Signatures](#http-message-signatures))
12891293
* no trusted JWK Set can be obtained for the FQDN part of the
12901294
`sender` field in the request body, via the `jwksUri` field of its
1291-
Discovery response or otherwise
1295+
Discovery response
12921296
* that JWK Set contains no key whose `kid` equals the `keyid`
12931297
signature parameter (see [HTTP Message
12941298
Signatures](#http-message-signatures))
@@ -2064,6 +2068,10 @@ Key Words](https://datatracker.ietf.org/html/rfc8174)", May 2017.
20642068
[RFC8615] Nottingham, M. "[Well-Known Uniform Resource Identifiers
20652069
(URIs)](https://datatracker.ietf.org/doc/html/rfc8615)", May 2019
20662070

2071+
[RFC9110] Fielding, R., Nottingham, M. and Reschke, J. "[HTTP
2072+
Semantics](https://datatracker.ietf.org/doc/html/rfc9110)",
2073+
June 2022.
2074+
20672075
[RFC9421] Backman, A., Richer, J. and Sporny, M. "[HTTP Message
20682076
Signatures](https://tools.ietf.org/html/rfc9421)", February 2024.
20692077

@@ -2075,7 +2083,8 @@ Representation of Contact Data](
20752083
https://datatracker.ietf.org/doc/html/rfc9553), May 2024"
20762084

20772085
[RFC9864] Jones, M., Steele, O., "[Fully-Specified Algorithms for
2078-
JOSE and COSE](https://datatracker.ietf.org/doc/html/rfc9864)",
2086+
JSON Object Signing and Encryption (JOSE) and CBOR Object Signing
2087+
and Encryption (COSE)](https://datatracker.ietf.org/doc/html/rfc9864)",
20792088
October 2025.
20802089

20812090
## Informative References
@@ -2122,7 +2131,7 @@ out of scope for this specification: a mechanism similar to the
21222131

21232132
This appendix is informative.
21242133

2125-
## JWKS Endpoint
2134+
## Published JWK Set
21262135

21272136
An OCM Server that advertises the `http-sig` capability publishes
21282137
its public keys, in the format specified by [RFC7517], at the URL
@@ -2221,7 +2230,9 @@ illustrates the procedure to verify an incoming signed request:
22212230
request body
22222231
2. Fetch the Discovery response from
22232232
`https://<provider-domain>/.well-known/ocm` and read its
2224-
`jwksUri` field
2233+
`jwksUri` field. If the Sending Server advertises the `http-sig`
2234+
capability but no `jwksUri` is present, the receiver MUST reject
2235+
the request as non-conformant
22252236
3. Fetch the public keys from the URL given by `jwksUri`
22262237
4. Locate the unique signature carrying the `tag="ocm"` parameter in
22272238
the `Signature-Input` header, disregarding its dictionary label
@@ -2238,7 +2249,7 @@ illustrates the procedure to verify an incoming signed request:
22382249
## Validating the Payload
22392250

22402251
Following the validation of the signature, the host also confirms
2241-
the validity of the payload, as required under Verification
2252+
the validity of the payload, as specified under Verification
22422253
Requirements in
22432254
[HTTP Message Signatures](#http-message-signatures).
22442255

spec.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,13 +534,14 @@ components:
534534
jwksUri:
535535
type: string
536536
format: uri
537+
pattern: "^https://"
537538
description: >
538539
Optional URL of a JWK Set document [RFC7517] containing the
539540
public keys this OCM Server uses for HTTP Message Signatures
540541
[RFC9421]. The URL is discovered from this field; it is not a
541542
fixed path in the OCM API. If the `http-sig` capability is
542543
exposed, the jwksUri MUST be advertised in the discovery
543-
response.
544+
response and MUST use https.
544545
example: https://cloud.example.org/ocm/jwks
545546
tokenEndPoint:
546547
type: string

0 commit comments

Comments
 (0)