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

adding credential issuer logo parameter in the issuer metadata #170

Merged
merged 9 commits into from
Jan 10, 2024

Conversation

Sakurann
Copy link
Collaborator

@Sakurann Sakurann commented Dec 22, 2023

PR born out of this comment on PR #141 (comment)

@@ -1342,6 +1342,9 @@ This specification defines the following Credential Issuer Metadata:
* `display`: OPTIONAL. Array of objects, where each object contains display properties of a Credential Issuer for a certain language. Below is a non-exhaustive list of valid parameters that MAY be included:
* `name`: OPTIONAL. String value of a display name for the Credential Issuer.
* `locale`: OPTIONAL. String value that identifies the language of this object represented as a language tag taken from values defined in BCP47 [@!RFC5646]. There MUST be only one object for each language identifier.
* `logo`: OPTIONAL. A JSON object with information about the logo of the Credential Issuer with a following non-exhaustive list of parameters that MAY be included:
* `uri`: OPTIONAL. String value that contains a URI where the Wallet can obtain a logo of the Credential from the Credential Issuer. Wallet needs to determine the scheme, since the URI value could use `https:` scheme, `data:` scheme, etc.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
* `uri`: OPTIONAL. String value that contains a URI where the Wallet can obtain a logo of the Credential from the Credential Issuer. Wallet needs to determine the scheme, since the URI value could use `https:` scheme, `data:` scheme, etc.
* `uri`: REQUIRED when the `logo` object is present. String value that contains a URI where the Wallet can obtain a logo of the Credential from the Credential Issuer. Wallet needs to determine the scheme, since the URI value could use `https:` scheme, `data:` scheme, etc.

If the logo object is present but doesn't contain any properties (like uri), it would indeed result in "logo": {}. This would be nonsensical because the logo object is supposed to contain at least the uri property when it is present. Therefore, it's important to specify that uri is required when logo is present to avoid such situations.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

we should discuss this. logo object is optional. so the issuer can avoid "logo": {} by not including logo parameter at all.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's also about setting clear expectations for what we expect issuers to do, as well as making it clear what situations we might end up needing to conformance test that wallets correctly parse. So I think it's good to make it clear that we don't expect issuers to use "logo": {} if that is our expectation.

It would probably be clearer if the logo object was defined in a new section. Then uri could I think just be marked as 'REQUIRED' and I think it would be clear that means "if the logo object is present".

Copy link
Collaborator Author

@Sakurann Sakurann Jan 4, 2024

Choose a reason for hiding this comment

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

I don't think a separate section is necessary. I changed uri parameter to required. it made more sense from the expectations perspective and from the consistency with the rest of the spec perspective.

@Sakurann Sakurann added this to the ID-1 milestone Jan 4, 2024
Co-authored-by: Joseph Heenan <[email protected]>
@Sakurann
Copy link
Collaborator Author

Sakurann commented Jan 4, 2024

Jan-04-2024 WG call. agreed on "required" terminology. agreed to change uri to required for credential_configurations_supported too. no objections to merge once @peppelinux's approval is in

Copy link
Member

@peppelinux peppelinux left a comment

Choose a reason for hiding this comment

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

fully approved

Copy link
Member

@selfissued selfissued left a comment

Choose a reason for hiding this comment

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

Please apply my editorial suggestions, then I'll approve.

openid-4-verifiable-credential-issuance-1_0.md Outdated Show resolved Hide resolved
openid-4-verifiable-credential-issuance-1_0.md Outdated Show resolved Hide resolved
@@ -1343,6 +1343,9 @@ This specification defines the following Credential Issuer Metadata:
* `display`: OPTIONAL. Array of objects, where each object contains display properties of a Credential Issuer for a certain language. Below is a non-exhaustive list of valid parameters that MAY be included:
* `name`: OPTIONAL. String value of a display name for the Credential Issuer.
* `locale`: OPTIONAL. String value that identifies the language of this object represented as a language tag taken from values defined in BCP47 [@!RFC5646]. There MUST be only one object for each language identifier.
* `logo`: OPTIONAL. Object with information about the logo of the Credential Issuer with the following non-exhaustive list of parameters that MAY be included:
* `uri`: REQUIRED. String value that contains a URI where the Wallet can obtain a logo of the Credential Issuer. The Wallet needs to determine the scheme, since the URI value could use `https:` scheme, `data:` scheme, etc.
Copy link
Contributor

Choose a reason for hiding this comment

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

As I've raised in other forums before, I'm concerned at the shear number of options this definition permits, both in by value and by reference based resolution of the image based logo, it also allows an open ended number of image formats. Good standards make choices and this definition is avoiding making a choice which could meaningfully improve interoperability.

I also have concerns from a security perspective because many of these URI mechanisms can resolve to much more than just images and because we aren't limiting to certain image formats its likely implementations will leave themselves vulnerable in certain ways such as via RCE through mistakenly downloading and executing something like javascript. At an absolute minimum I'd like to see normative guidance which recommends implementations take precautions in the URI resolution process to improve the likelihood that they actually obtain an image as the result. That might include validating the mediatype of a data URI to check it is indicating its an image OR using headers when resolving an HTTPS based URI to request an image and validate a response.

Copy link
Contributor

@jogu jogu Jan 9, 2024

Choose a reason for hiding this comment

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

I'd suggest raising a separate issue about this, or perhaps two issues (one about the normative security note, one to discuss if we should limit the options) - I think the concerns apply to all logos, not just the one added in this PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with Tobias, wallets already have many responsibilities and options to implement, limiting the logo formats is definitely a good idea

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@tplooker I think we agreed that we need to discuss limiting the logo formats, but that should not block this PR. Please open a separate issue on this topic as also agreed in #141.

Copy link
Contributor

Choose a reason for hiding this comment

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

Opened in #205.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thank you!

@Sakurann
Copy link
Collaborator Author

@selfissued accepted. please re-review

@Sakurann Sakurann merged commit f693414 into main Jan 10, 2024
2 checks passed
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.

8 participants