Skip to content

Commit 1aeb7bb

Browse files
cre8bc-pi
andauthored
fix: add extend for claim metadata (#337)
* fix: add extend for claim metadata Signed-off-by: Mirko Mollik <[email protected]> * fix: add lang value Signed-off-by: Mirko Mollik <[email protected]> * replace overwrite with refine Signed-off-by: Mirko Mollik <[email protected]> * add missing lang for final output Signed-off-by: Mirko Mollik <[email protected]> * fix: history message Signed-off-by: Mirko Mollik <[email protected]> * fix: using override for simplicity Signed-off-by: Mirko Mollik <[email protected]> * sigh --------- Signed-off-by: Mirko Mollik <[email protected]> Co-authored-by: Brian Campbell <[email protected]>
1 parent 8d131ff commit 1aeb7bb

File tree

1 file changed

+64
-0
lines changed

1 file changed

+64
-0
lines changed

draft-ietf-oauth-sd-jwt-vc.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1012,6 +1012,68 @@ disclosable. The following values are defined:
10121012

10131013
If omitted, the default value is `allowed`.
10141014

1015+
## Extending Claim Metadata {#claim-metadata-extends}
1016+
1017+
The `extends` property allows a type to inherit claim metadata from another type. When present, all claim metadata from the extended type MUST be respected and are inherited by the child type. The child type can extend the claim metadata by adding new claims or properties. If the child type defines claim metadata with the same `path` as in the extended type, the child type's object will override the corresponding object from the extended type.
1018+
1019+
Suppose we have a base type metadata document:
1020+
1021+
```json
1022+
{
1023+
"vct": "https://example.com/base-type-metadata",
1024+
"claims": [
1025+
{
1026+
"path": ["name"],
1027+
"display": [{"label": "Full Name", "lang": "en"}]
1028+
},
1029+
{
1030+
"path": ["address", "city"],
1031+
"display": [{"label": "City", "lang": "en"}]
1032+
}
1033+
]
1034+
}
1035+
```
1036+
1037+
And a child type metadata document that extends the base type:
1038+
1039+
```json
1040+
{
1041+
"vct": "https://example.com/custom-type-metadata",
1042+
"extends": "https://example.com/base-type-metadata",
1043+
"claims": [
1044+
{
1045+
"path": ["address", "city"],
1046+
"display": [{"label": "Town", "lang": "en"}]
1047+
},
1048+
{
1049+
"path": ["nationalities"],
1050+
"display": [{"label": "Nationalities", "lang": "en"}]
1051+
}
1052+
]
1053+
}
1054+
```
1055+
1056+
In this example, the child type inherits the `name` claim metadata from the base type, but overrides the `address.city` claim metadata with its own definition. It also adds a new claim metadata for `nationalities`. The final effective claim metadata for the child type is:
1057+
1058+
```json
1059+
{
1060+
"claims": [
1061+
{
1062+
"path": ["name"],
1063+
"display": [{"label": "Full Name", "lang": "en"}]
1064+
},
1065+
{
1066+
"path": ["address", "city"],
1067+
"display": [{"label": "Town", "lang": "en"}]
1068+
},
1069+
{
1070+
"path": ["nationalities"],
1071+
"display": [{"label": "Nationalities", "lang": "en"}]
1072+
}
1073+
]
1074+
}
1075+
```
1076+
10151077
# Security Considerations {#security-considerations}
10161078

10171079
The Security Considerations in the SD-JWT specification
@@ -1542,6 +1604,7 @@ Lukas J Han,
15421604
Leif Johansson,
15431605
Michael B. Jones,
15441606
Mike Prorock,
1607+
Mirko Mollik,
15451608
Orie Steele,
15461609
Paul Bastian,
15471610
Pavel Zarecky,
@@ -1556,6 +1619,7 @@ for their contributions (some of which substantial) to this draft and to the ini
15561619

15571620
-11
15581621

1622+
* Clarify extend support for claim metadata
15591623
* Add privacy concerns regarding the use of `x5u` parameter in JWKs and similar remote retrieval mechanisms
15601624
* Added a section on Credential Type Extension and Issuer Authorization.
15611625
* Fixed an inconsistency to the description of `display` attribute of claim metadata.

0 commit comments

Comments
 (0)