bcgov / vc-authn-oidc

Apache License 2.0
119 stars 69 forks source link

Persistent subject_identifier is an object #561

Closed esune closed 3 weeks ago

esune commented 4 weeks ago

When the generate_consistent_identifier flag to true for a presentation configuration, vc-authn canonicalizes the available presented attributes and places them in the sub claim of the token. This is not desirable, especially since the subject identifier MUST NOT exceed 255 ASCII characters in length (quoting the OpenID Spec. Additionally, a JSON object may include characters that require serialization/escaping.

The generate consistent identifier option should calculate a hash (suggested sha256) of the canonicalized JSON object currently used as a subject identifier to meet the field size restrictions as well as to make the value actually usable.