Skip to content

Fix - LoTE filtering logic#598

Open
StjepanovicSrdjan wants to merge 4 commits into
a-sit-plus:developfrom
StjepanovicSrdjan:fix/LoTE-filtering
Open

Fix - LoTE filtering logic#598
StjepanovicSrdjan wants to merge 4 commits into
a-sit-plus:developfrom
StjepanovicSrdjan:fix/LoTE-filtering

Conversation

@StjepanovicSrdjan

Copy link
Copy Markdown
Contributor
  • Fix filtering of the Trust Lists, where absence of the ServiceTypeIdentifier signifies that all listed trusted entity
    services are of the same type. Previous filtering logic was too strict

…he same type in the list if serviceTypeIdentifier is absent
fun fromSchemeType(rawSchemeType: String?): LoTEServiceType? {
if (rawSchemeType.isNullOrBlank()) return null

return when {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think that could be written like entries().firstOrNull { it.type.equals(rawSchemeType, true) } ... because why would we do a "contains" check?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The reason we have to use .contains() instead of .equals() is because the rawSchemeType (which comes from vcType, sdJwtType, or isoDocType) is a fully qualified URI/URN, not a simple string. For example, a PID's scheme type is usually urn:eudi:pid:1. Did add the firstOrNull pattern in c4ccebb, but with contains.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Okay, then we'll need to adapt two more things: Do not name the function and parameter schemeType but schemeIdentifier to align with nomenclature in VC-K. Also we would need to explicitly check if this is the PID identifier (urn:eudi:pid:1: for SD-JWT or eu.europa.ec.eudi.pid.1 for MDOC, see https://github.com/eu-digital-identity-wallet/eudi-doc-attestation-rulebooks-catalog/blob/main/rulebooks/pid/pid-rulebook.md) or the mDL identifier (org.iso.18013.5.1.mDL) and then map it. Can it ever be a WRPAC or WALLET?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Applied in the 827072c.

Comment thread vck/src/jvmTest/kotlin/at/asitplus/wallet/lib/etsi/LoTEFilterTest.kt Outdated

@nodh nodh left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

See comment above

@StjepanovicSrdjan
StjepanovicSrdjan requested a review from nodh July 16, 2026 11:57
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