Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] identity_credential::credential::builder::default() inconsistent with VC 1.1 regarding @context #1550

Open
Oran-Dan opened this issue Feb 24, 2025 · 2 comments
Assignees
Labels
Bug Something isn't working.

Comments

@Oran-Dan
Copy link

Oran-Dan commented Feb 24, 2025

Bug description

The identity_credential::credential::builder::default() gives as default value for the @context property:

{
    "@context": "https://www.w3.org/2018/credentials/v1",
    ....
}

The spec states that the value MUST be an "ordered set", which would be:

{
    "@context": ["https://www.w3.org/2018/credentials/v1"],
    ....
}

https://www.w3.org/TR/vc-data-model/#contexts

Language version

rustc 1.82.0 (f6e511eec 2024-10-15)

IOTA Identity version

These are the Cargo.toml deps

identity_credential = { version = "1.3", default-features = false, features = [
    "credential",
    "domain-linkage",
    "presentation",
    "validator",
] }
identity_core = { version = "1.3" }
identity_eddsa_verifier = { version = "1.3" }
identity_iota = { version = "1.3" }
identity_jose = { version = "1.3" }
iota_stronghold = { version = "2.1" }

Hardware specification

  • Operating system: Linux Ubuntu 24.04.1 LTS

Steps To reproduce the bug

  1. Use the identity_credential::credential::builder::default()
  2. Print the created struct to see the incoherence with the spec
@eike-hass
Copy link
Collaborator

eike-hass commented Feb 25, 2025

@Oran-Dan thank you for reporting the issue. That indeed looks faulty, we will investigate ASAP.

@Oran-Dan
Copy link
Author

Thanks :)

@UMR1352 UMR1352 self-assigned this Feb 26, 2025
@UMR1352 UMR1352 moved this from Product Backlog to In Progress in IOTA Trust Framework Developments Feb 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working.
Projects
Status: In Progress
Development

No branches or pull requests

3 participants