The SD-JWT spec describes the possibility of recursive disclosures. Where you can have a selectively discloseable value, that then contains selectively discloseable values within the selectively discloseable value: https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-06.html#name-example-sd-jwt-with-recursi
Doesn't seem like a really important feature to support right away, but opening this issue to keep track of the status.
We would probably have to add another field that can be added to the disclosureFrame to indicate the property itself should be recursively dislcosed. Currently when you provide the following dislcosure frame:
{
credentialSubject: true,
__decoyCount: 2,
credential: {
__decoyCount: 3,
dateOfBirth: true,
name: true,
lastName: true
}
}
You get the following output (kinda)
{
iat: 1700555090380,
iss: 'did:key:some-random-did-key',
nbf: 1700555090480,
credential: { _sd: ['credential-disclosure-digest-1', 'credential-disclosure-digest-2'] },
_sd_alg: 'sha-256',
_sd: [
'txiegb4QZDKwnzkeYSzDCqdbR9uHUSU7RW2uPIFO2_k',
'uNPp8xv9pJwWUkMDY17jEiUuPjIcZOJwS75GXJ8SIW8',
'xZapa_MT9GR3NpyhrgEyM12sUNOknfRYTSahiQISUlM'
]
}
Following the structure of __decoyCount, I think we can do something like this for the disclosure frame:
{
credentialSubject: true,
__decoyCount: 2,
credential: {
__recursiveDisclosure: true
__decoyCount: 3,
dateOfBirth: true,
name: true,
lastName: true
}
}
To receive this output:
{
iat: 1700555090380,
iss: 'did:key:some-random-did-key',
nbf: 1700555090480,
_sd_alg: 'sha-256',
_sd: [
'txiegb4QZDKwnzkeYSzDCqdbR9uHUSU7RW2uPIFO2_k',
'uNPp8xv9pJwWUkMDY17jEiUuPjIcZOJwS75GXJ8SIW8',
'xZapa_MT9GR3NpyhrgEyM12sUNOknfRYTSahiQISUlM',
'this-is-the-digest-for-credential-the-disclosure-contains-the-nested-disclosures'
]
}
Not fully happy with the __recursiveDisclosure name yet, but I hope you get the idea.
The SD-JWT spec describes the possibility of recursive disclosures. Where you can have a selectively discloseable value, that then contains selectively discloseable values within the selectively discloseable value: https://www.ietf.org/archive/id/draft-ietf-oauth-selective-disclosure-jwt-06.html#name-example-sd-jwt-with-recursi
Doesn't seem like a really important feature to support right away, but opening this issue to keep track of the status.
We would probably have to add another field that can be added to the disclosureFrame to indicate the property itself should be recursively dislcosed. Currently when you provide the following dislcosure frame:
You get the following output (kinda)
Following the structure of
__decoyCount, I think we can do something like this for the disclosure frame:To receive this output:
Not fully happy with the
__recursiveDisclosurename yet, but I hope you get the idea.