Skip to content

chore: status list and PoP huuge review, cryptojwt updated#538

Merged
peppelinux merged 2 commits into
feature/status_list_and_key_attestationfrom
1.3.3-review
Jun 11, 2026
Merged

chore: status list and PoP huuge review, cryptojwt updated#538
peppelinux merged 2 commits into
feature/status_list_and_key_attestationfrom
1.3.3-review

Conversation

@peppelinux

Copy link
Copy Markdown
Member

This pull request introduces several important improvements and bug fixes across the trust chain builder, OpenID4VCI endpoints, storage, status list encoding, validation utilities, and test coverage. The most significant changes include robust handling of JWT decoding, atomic allocation of credential status list indexes, improved bitstring encoding for status lists, and enhanced DPoP-bound access token handling and tests.

Key changes:

Trust Chain Builder and JWT Handling

  • Improved JWT decoding: Now checks if the JWT is a bytes-like object before decoding, preventing errors when the JWT is already a string. (pyeudiw/federation/trust_chain_builder.py) [1] [2]

OpenID4VCI Endpoints and Token Handling

  • Fixed request parsing and error messages: Handles missing context path gracefully and improves error reporting for unsupported grant types. (pyeudiw/satosa/frontends/openid4vci/endpoints/status_list_endpoint.py, token_endpoint.py) [1] [2]
  • Corrected payload handling for status list CWT: Avoids double compression by decompressing before encoding. (status_list_endpoint.py)
  • Defined and reused a constant for the DPoP token type for clarity and security linting. (token_response.py) [1] [2]

Credential Storage and Status List Indexing

  • Atomic incremental ID allocation: Introduced an atomic, thread-safe method for allocating unique status list indexes using MongoDB's findAndModify, preventing race conditions and duplicates. Also enforced uniqueness with a database index. (credential_storage.py) [1] [2] [3]

Status List Bitstring Encoding

  • Rewrote bitstring encoding: The array_to_bitstring_v1 function now packs credential status bits in least-significant-bit-first order, indexed by incremental_id, and handles sparse arrays correctly, aligning with the OAuth status list draft. The original wrapper is retained for backward compatibility. (status_list/__init__.py)

Validation Utilities and Test Improvements

  • Improved JWS validation logic: Now only warns about missing algorithm whitelists if not provided, and logs errors for unsupported algorithms. Removed debug print statements. (validation.py) [1] [2]
  • Expanded and corrected DPoP-bound access token tests: Added fixtures and helpers to generate valid DPoP-bound tokens and headers, ensuring proper test coverage for token binding. Updated test mocks to match refactored storage methods. (test_dpop.py, test_credential_endpoint.py) [1] [2] [3] [4] [5] [6] [7] [8]

Miscellaneous

  • Made several schema fields in CredentialConfiguration optional for better flexibility and compatibility. (metadata.py)

@peppelinux
peppelinux requested a review from mciofo June 8, 2026 14:39
@peppelinux
peppelinux requested a review from manpace June 8, 2026 14:50
@peppelinux
peppelinux merged commit 0815460 into feature/status_list_and_key_attestation Jun 11, 2026
15 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.

3 participants