pypi openbadgeslib 3.7.0
v3.7.0

latest releases: 4.6.5, 4.6.4, 4.6.3...
4 months ago

Feature + supply-chain release: audit the credential registry and automate issuance from the CLI, verify multi-key did:web issuers, deprecate OpenBadges 1.0 — and drop pycryptodome + python-ecdsa for a single, CVE-free crypto backend.

Added

  • feat(publish): openbadges-publish -V 3 --list [-b badge] tabulates every issued credential (jti, recipient, issue date, state) and --status <jti|email> prints one credential's full record including its revocation/suspension date and reason — closing the credential lifecycle from the CLI (issue → revoke → audit). Both are read-only and need no output directory. (#157)
  • feat(cli): --json machine-readable output for openbadges-signer, openbadges-publish and openbadges-keygenerator (the verifier already had it), under one documented exit-code contract — 0 success, 2 partial, 1 any error (as {"error": …}) — so issuance can be automated without scraping human text. (#166)
  • feat(ob3): JWT-VC verification now honours the token's kid header for a multi-key did:web issuer, selecting the exact verificationMethod it names (key rotation, or one key per badge) and failing closed on a kid that points at a different DID or a method absent from the document. (#163)

Changed

  • feat(ob1): OpenBadges 1.0 is deprecated (removal scheduled for the grouped 4.0.0 release). The legacy import surface — the openbadgeslib.ob1 package, the top-level badge/signer/verifier shims, and the unprefixed re-exports — now emits a DeprecationWarning, and the -V 1 CLI paths print a notice. A bare import openbadgeslib stays silent, and OpenBadges 2.0 is not affected — it remains fully supported. (#159)
  • refactor(cli): dropped openbadges-keygenerator's decorative -V/--ob-version flag (key material never depended on the OB version — the algorithm comes from the badge's key_type), a dead if args.badge guard in the signer, and the redundant tests/runtests.sh wrapper. (#156)

Security

  • security(deps): keys.py (and the OB1 key-loading path) are ported to cryptography, and pycryptodome and python-ecdsa are dropped as dependencies. They only ever generated and parsed key material here — signing always went through PyJWT + cryptography, already a hard dependency. This removes python-ecdsa's permanent pip-audit flag (CVE-2024-23342 "Minerva", wontfix upstream), moves ECC key generation onto constant-time code, and shrinks the install to a single crypto backend. PEM output is byte-compatible (PKCS#1 / SEC1 private keys, SubjectPublicKeyInfo public keys), so existing key files round-trip. key_to_pem still accepts a live pycryptodome/python-ecdsa object via a soft import. (#167)

Verified: the full local gate — flake8, mypy --strict, and the complete suite (902 tests, [ldp] extra) with pycryptodome and python-ecdsa uninstalled to prove the port stands alone — plus the CI matrix on Python 3.10–3.14, which gated the (OIDC Trusted Publishing) publish.

Full history: Changelog.txt

Don't miss a new openbadgeslib release

NewReleases is sending notifications on new releases.