Skip to content

Commit 35b9410

Browse files
Fix http(s) and update replay protection text
Co-authored-by: Mahdi Baghbani <mahdi-baghbani@azadehafzar.io>
1 parent 7b5e2b9 commit 35b9410

2 files changed

Lines changed: 25 additions & 8 deletions

File tree

IETF-OCM.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -776,7 +776,9 @@ contain the following information about its OCM API:
776776
Message Signatures. The URL is discovered from this field; it is
777777
not a fixed path in the OCM API.
778778
Implementations that advertise the `"http-sig"` capability MUST
779-
provide this URL as well, and it MUST use https.
779+
provide this URL as well, and it MUST use https. As with the
780+
Discovery Process, implementations MAY fallback to HTTP instead of
781+
HTTPS in testing setups.
780782
Example: `"https://cloud.example.org/ocm/jwks"`.
781783
* OPTIONAL: tokenEndPoint (string) - URL of the token endpoint hosted by
782784
this OCM Server. When this OCM Server acts as Sending Server, the
@@ -838,8 +840,10 @@ components:
838840
* "content-length" - message size
839841

840842
The signature parameters MUST include `created` and `keyid`.
841-
Freshness and replay protection are anchored on `created` (see
842-
Verification Requirements). The `keyid` value MUST be equal to the
843+
Freshness is anchored on `created` (see Verification Requirements);
844+
`created` bounds how long a captured signature stays acceptable, but
845+
does not by itself detect replay within that window (see Section
846+
7.2.2 of [RFC9421]). The `keyid` value MUST be equal to the
843847
`kid` value of the corresponding key in the signer's JWK Set (see
844848
[Keys and Algorithms](#keys-and-algorithms)).
845849

@@ -2000,7 +2004,9 @@ Implementers SHOULD NOT use it and prefer short-lived tokens instead.
20002004
## Code Flow
20012005

20022006
All `{tokenEndPoint}` requests MUST be transmitted over HTTPS and
2003-
signed using HTTP Signatures. Bearer tokens MUST be treated as
2007+
signed using HTTP Signatures. As with the Discovery Process,
2008+
implementations MAY fallback to HTTP instead of HTTPS in testing
2009+
setups. Bearer tokens MUST be treated as
20042010
confidential and never logged, persisted beyond their lifetime, or
20052011
transmitted over unsecured channels.
20062012

@@ -2232,8 +2238,9 @@ illustrates the procedure to verify an incoming signed request:
22322238
2. Fetch the Discovery response from
22332239
`https://<provider-domain>/.well-known/ocm` and read its
22342240
`jwksUri` field. If the Sending Server advertises the `http-sig`
2235-
capability but no `jwksUri` is present, the receiver MUST reject
2236-
the request as non-conformant
2241+
capability but no `jwksUri` is present, the receiver can discard
2242+
the notification, as described in [Decision to
2243+
Discard](#decision-to-discard)
22372244
3. Fetch the public keys from the URL given by `jwksUri`
22382245
4. Locate the unique signature carrying the `tag="ocm"` parameter in
22392246
the `Signature-Input` header, disregarding its dictionary label
@@ -2708,6 +2715,16 @@ The complete changelog is updated in the OCM-API GitHub repository.
27082715
* The `Date` header is no longer covered by signatures: freshness is
27092716
anchored on the `created` signature parameter (see Section 7.2.4
27102717
of [RFC9421]).
2718+
* Clarified that `created` bounds the lifetime of a captured
2719+
signature but does not by itself detect replay within that window
2720+
(see Section 7.2.2 of [RFC9421]).
2721+
* `jwksUri` and `{tokenEndPoint}` transport: https remains mandatory,
2722+
with the same HTTP fallback allowance for testing setups that the
2723+
Discovery Process has; dropped the https-only schema pattern from
2724+
spec.yaml accordingly.
2725+
* Appendix B now defers the missing-`jwksUri` case to [Decision to
2726+
Discard](#decision-to-discard) instead of stating a stronger
2727+
requirement in an informative section.
27112728
* Updated the signature examples: replaced the legacy `Digest` header
27122729
with `Content-Digest` [RFC9530] and applied [RFC8792] line
27132730
wrapping.

spec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -534,14 +534,14 @@ components:
534534
jwksUri:
535535
type: string
536536
format: uri
537-
pattern: "^https://"
538537
description: >
539538
Optional URL of a JWK Set document [RFC7517] containing the
540539
public keys this OCM Server uses for HTTP Message Signatures
541540
[RFC9421]. The URL is discovered from this field; it is not a
542541
fixed path in the OCM API. If the `http-sig` capability is
543542
exposed, the jwksUri MUST be advertised in the discovery
544-
response and MUST use https.
543+
response and MUST use https, though implementations MAY fall
544+
back to HTTP in testing setups.
545545
example: https://cloud.example.org/ocm/jwks
546546
tokenEndPoint:
547547
type: string

0 commit comments

Comments
 (0)