Skip to content

Commit 78d5bd8

Browse files
authored
Merge branch 'main' into 312-genart-review-p2
2 parents 07cf723 + 665a02c commit 78d5bd8

File tree

3 files changed

+17
-15
lines changed

3 files changed

+17
-15
lines changed

draft-ietf-oauth-status-list.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ The following is a non-normative example of a Status List Token in JWT format:
445445

446446
## Status List Token in CWT Format {#status-list-token-cwt}
447447

448-
The Status List Token MUST be encoded as a "CBOR Web Token (CWT)" according to {{RFC8392}}.
448+
The Status List Token MUST be encoded as a "CBOR Web Token (CWT)" according to {{RFC8392}}. The Status List Token MUST not be tagged with the tags defined in section 6 of {{RFC8392}} or in section 2 of {{RFC9052}}.
449449

450450
The following content applies to the protected header of the CWT:
451451

@@ -463,11 +463,11 @@ The following additional rules apply:
463463

464464
1. The CWT MAY contain other claims.
465465

466-
2. The CWT MUST be secured using a cryptographic signature or MAC algorithm. Relying Parties MUST reject CWTs with an invalid signature.
466+
1. The CWT MUST be secured using a cryptographic signature or MAC algorithm. Relying Parties MUST reject CWTs with an invalid signature.
467467

468-
3. Relying Parties MUST reject CWTs that are not valid in all other respects per "CBOR Web Token (CWT)" {{RFC8392}}.
468+
1. Relying Parties MUST reject CWTs that are not valid in all other respects per "CBOR Web Token (CWT)" {{RFC8392}}.
469469

470-
4. Application of additional restrictions and policies are at the discretion of the Relying Party.
470+
1. Application of additional restrictions and policies are at the discretion of the Relying Party.
471471

472472
The following is a non-normative example of a Status List Token in CWT format in Hex:
473473

@@ -1042,7 +1042,7 @@ This malicious behavior can be detected by Relying Parties that request large am
10421042

10431043
## Observability of Relying Parties {#privacy-relying-party}
10441044

1045-
Once the Relying Party receives the Referenced Token, the Relying Party can request the Status List through the provided `uri` parameter and can validate the Referenced Token's status by looking up the corresponding `index`. However, the Relying Party may persistently store the `uri` and `index` of the Referenced Token to request the Status List again at a later time. By doing so regularly, the Relying Party may create a profile of the Referenced Token's validity status. This behaviour may be intended as a feature, e.g. for an identity proofing (e.g. Know-Your-Customer process in finance industry) that requires regular validity checks, but might also be abused in cases where this is not intended and unknown to the Holder, e.g. profiling the suspension of a driving license or checking the employment status of an employee credential.
1045+
Once the Relying Party receives the Referenced Token, the Relying Party can request the Status List through the provided `uri` parameter and can validate the Referenced Token's status by looking up the corresponding `index`. However, the Relying Party may persistently store the `uri` and `index` of the Referenced Token to request the Status List again at a later time. By doing so regularly, the Relying Party may create a profile of the Referenced Token's validity status. This behaviour may be intended as a feature, e.g. for an identity proofing (e.g. Know-Your-Customer process in finance industry) that requires regular validity checks, but might also be abused in cases where this is not intended and unknown to the Holder, e.g. profiling the suspension of an employee credential.
10461046

10471047
This behaviour could be mitigated by:
10481048

@@ -1094,8 +1094,6 @@ There are strong privacy concerns that have to be carefully taken into considera
10941094

10951095
As previously explained, there is the potential risk of observability by Relying Parties (see [](#privacy-relying-party)) and Outsiders (see [](#privacy-outsider)). That means that any Status Type that transports information beyond the routine statuses VALID and INVALID about a Referenced Token can leak information to other parties. This document defines one additional Status Type with "SUSPENDED" that conveys such additional information, but in practice all statuses other than VALID and INVALID are likely to contain information with privacy implications.
10961096

1097-
A concrete example for "SUSPENDED" would be a driver's license, where the digital driver's license might still be useful to prove other information about its holder, but suspended could signal that it should not be considered valid in the scope of being allowed to drive a car. This case could be solved by either introducing a special status type, or by revoking the Referenced Token and re-issuing with changed attributes. For such a case, the status type suspended might be dangerous as it would leak the information of a suspended driver's license even if the driver's license is used as a mean of identification and not in the context of driving a car. This could also allow for the unwanted collection of statistical data on the status of driver's licenses.
1098-
10991097
Ecosystems that want to use other Status Types than "VALID" and "INVALID" should consider the possible leakage of data and profiling possibilities before doing so and evaluate if revocation and re-issuance might a better fit for their use-case.
11001098

11011099
# Implementation Considerations {#implementation}
@@ -1974,8 +1972,10 @@ CBOR encoding:
19741972

19751973
-14
19761974

1975+
* remove cose_sign1 tag from statuslist in cwt form examples
19771976
* slightly restructure/clarify referenced token cose section
19781977
* Add ASN.1 module
1978+
* removed DL suspension example
19791979

19801980
-13
19811981

src/requirements.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
git+https://github.com/wbond/oscrypto.git@1547f535001ba568b239b8797465536759c742a3
33
# Normal dependencies
44
jwcrypto==1.5.6
5-
cbor2==5.6.2
6-
cwt==2.7.4
5+
cbor2==5.7.1
6+
cwt==3.2.0
77
py_markdown_table==1.3.0

src/status_token.py

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import json
2-
from datetime import datetime, timedelta
2+
from datetime import UTC, datetime, timedelta
33
from typing import Dict
44

5-
from cbor2 import dumps
5+
from cbor2 import CBORTag, dumps
66
from cwt import COSE, COSEHeaders, COSEKey, CWTClaims
77
from jwcrypto import jwk, jwt
88

@@ -77,7 +77,7 @@ def get(self, pos: int) -> int:
7777

7878
def buildJWT(
7979
self,
80-
iat: datetime = datetime.utcnow(),
80+
iat: datetime = datetime.now(UTC),
8181
exp: datetime | None = None,
8282
ttl: timedelta | None = None,
8383
optional_claims: Dict | None = None,
@@ -115,7 +115,7 @@ def buildJWT(
115115

116116
def buildCWT(
117117
self,
118-
iat: datetime = datetime.utcnow(),
118+
iat: datetime = datetime.now(UTC),
119119
exp: datetime | None = None,
120120
ttl: timedelta | None = None,
121121
optional_claims: Dict | None = None,
@@ -158,10 +158,12 @@ def buildCWT(
158158
# The sender side:
159159
sender = COSE.new()
160160
encoded = sender.encode(
161-
dumps(claims),
162-
key,
161+
payload=dumps(claims),
162+
key=key,
163163
protected=protected_header,
164164
unprotected=unprotected_header,
165165
)
166166

167+
# removes cose_sign1 tag (only 1 byte long for tag 18)
168+
encoded = encoded[1:]
167169
return encoded

0 commit comments

Comments
 (0)