fix: warn operators about deprecated attributes in session requests (#522) - #579
fix: warn operators about deprecated attributes in session requests (#522)#579dobby-coder[bot] wants to merge 4 commits into
Conversation
…522) When a disclosure session requested an attribute whose credential type or issuer is deprecated (e.g. pbdf.pbdf.mobilenumber.mobilenumber), irmago returned only a generic end-user error and logged nothing, even with verbose logging enabled. This made it hard for operators to understand why the session could not be completed. Add AttributeConDisCon.DeprecatedAttributes(conf), which returns the (deduplicated) requested attribute identifiers whose credential type or issuer is deprecated. The irma server now logs a clear warning at session-request validation time naming those attribute identifiers. The warning is non-blocking: a user who still holds a non-expired instance of a deprecated credential can keep disclosing it, so the request is not rejected. Add a regression test covering deprecated credential types, deprecated issuers, future deprecation dates and deduplication. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
/dobby fix the failing CI checks |
|
On it, @rubenhensen! I'm picking up the CI fixes for irmago#579 and will open a draft PR with the changes shortly. |
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Dobby's run crashed before it finished and could not be recovered automatically: Rescue could not continue: the crashed node is unknown. If this still needs doing, ping Dobby again. |
|
/dobby would this work with eudi cert based or diip DID based attributes? |
|
On it! I'm looking into the EUDI certificate and DIIP DID attribute compatibility question now. |
|
Good question — and the short answer is no, not as written. This PR only covers the classic Yivi/IRMA disclosure path, not the EUDI cert-based or DIIP DID-based (OpenID4VP) flows. Here's why, after tracing the code: What the PR actually hooks into The new check lives in the verifier server's credType := conf.CredentialTypes[attr.Type.CredentialTypeIdentifier()]
issuer := conf.Issuers[credType.IssuerIdentifier()]
// credType.DeprecatedSince / issuer.DeprecatedSinceSo it's entirely scoped to (a) the classic IRMA condiscon request format and (b) EUDI cert-based (X.509) and DIIP DID-based attributes Those are disclosed over OpenID4VP with DCQL queries, which is a separate validation path:
Both go through On top of that, the EUDI scheme has no deprecation concept at all: The one nuance SD-JWT VC credentials that are issued over IRMA are bridged into To extend it to EUDI/DIIP you'd need two things this PR doesn't attempt:
Happy to open a follow-up issue to track EUDI/DIIP deprecation warnings if that's wanted — but I'd keep it out of this PR, which is a focused fix for #522 (classic IRMA disclosure). |
|
Good question, @rubenhensen! I dug into the code and the short answer is no — PR #579 only covers the classic IRMA disclosure path. The deprecation check hooks into One nuance worth noting: SD-JWT VC credentials issued over IRMA are mapped into Left a full breakdown in the PR comment: #579 (comment) — and I'd suggest opening a follow-up issue to tackle deprecation handling for the EUDI/DIIP paths separately, keeping this fix focused. |
|
Dobby's run crashed before it finished and could not be recovered automatically: Rescue could not continue: the crashed node is unknown. If this still needs doing, ping Dobby again. |
|
/dobby fix conflicts |
|
Got it — I'm on it. I'll take a look at PR #579 and work on resolving the merge conflicts. |
…-attributes-522 # Conflicts: # CHANGELOG.md
There was a problem hiding this comment.
VERDICT: approve
Conflicts resolved and the branch is now mergeable against master. Consolidated gatekeeper review: clean, no blocking issues.
Reviewed HEAD 4917538:
- Focused Go change (4 files, 146 lines): new
AttributeConDisCon.DeprecatedAttributes(conf)inirma/requests.go+ a warning atvalidateRequestinirma/server/irmaserver/helpers.go. stringsimport present after the merge — build stays clean.- No struct
==/!=pointer-equality trap (uses.IsZero()/.Before()). - Regression test
TestDeprecatedAttributescovers cred-type/issuer deprecation, future-date exclusion, and dedup. - Conventional title,
Closes #522, CHANGELOG entry present.
Rule sweep (Go/PR/prose rules) and Review Dobby 2 both returned zero findings.
|
Conflicts are resolved — the branch merges cleanly against Since this PR is mine, I left it as a COMMENT-type approval rather than self-merging — it's ready whenever a maintainer wants to merge it. |
Closes #522
Problem
When a disclosure session requests an attribute whose credential type or issuer is deprecated (e.g.
pbdf.pbdf.mobilenumber.mobilenumber), irmago returned only a generic end-user error and logged nothing server-side — even with verbose logging enabled. Operators had no way to tell why the session could not be completed.Repro (from the issue)
Expected: a clear error/warning saying the attribute is deprecated. Actual: silent failure, generic error in the app.
Fix
Add
AttributeConDisCon.DeprecatedAttributes(conf)(irma/requests.go), which returns the deduplicated requested attribute identifiers whose credential type or issuer is deprecated (DeprecatedSinceset and in the past), mirroring the existing deprecation check inirmaclient.The irma server now logs a clear warning at session-request validation time (
validateRequestinirma/server/irmaserver/helpers.go) naming the deprecated attribute identifier(s):Why a warning, not a hard error
A user who still holds a non-expired instance of a deprecated credential can legitimately keep disclosing it (
credCandidates/satisfiesCondo not filter held credentials on deprecation). Rejecting the request outright would break those still-valid disclosures, so the request is left to proceed while the operator gets clear visibility in the logs.Tests
TestDeprecatedAttributesinirma/irmago_test.gocovers:Runs without docker:
The full server/keyshare suites require docker services and are left to CI.
🤖 Generated with Claude Code