Skip to content

Remove second surrogate layer in StatusListTokenPayload serialization#542

Merged
n0900 merged 18 commits intodevelopfrom
feature/StatusListPayloadRefactor
Apr 9, 2026
Merged

Remove second surrogate layer in StatusListTokenPayload serialization#542
n0900 merged 18 commits intodevelopfrom
feature/StatusListPayloadRefactor

Conversation

@n0900
Copy link
Copy Markdown
Collaborator

@n0900 n0900 commented Mar 26, 2026

Building on #497. Removes second surrogate layer which used to differentiate between JWS and CWT serialization shape by leveraging the preferCborLabelsOverNames cbor serializer flag which is already required by the repository (see Identifier.kt)

A lot of value classes became unused as part of this change. I have removed them for now but can deprecate instead if wanted.

@n0900 n0900 requested review from JesusMcCloud and nodh March 26, 2026 12:39
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@n0900 n0900 self-assigned this Mar 26, 2026
@n0900
Copy link
Copy Markdown
Collaborator Author

n0900 commented Mar 26, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 24ae10f192

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link
Copy Markdown
Member

@nodh nodh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! Some test improvements

@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@n0900 n0900 requested a review from nodh March 30, 2026 14:40
@nodh nodh added this to the 5.12.0 milestone Apr 7, 2026
@nodh
Copy link
Copy Markdown
Member

nodh commented Apr 7, 2026

@codex review

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 8151494c04

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

)

init {
require(statusList == null || identifierList == null) { "Either StatusList or IdentifierList must be present" }
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Require exactly one revocation-list field

The invariant check currently uses statusList == null || identifierList == null, which allows both fields to be null. That means malformed payloads without either status_list or identifier_list pass construction and only fail later in toStatusListTokenPayload() via a generic Exception, instead of being rejected immediately as a serialization/validation error. This weakens input validation for untrusted JWT/CWT payloads and changes failure behavior compared to the prior model where missing required claims were rejected during decode.

Useful? React with 👍 / 👎.

@n0900 n0900 merged commit f1305ff into develop Apr 9, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants