Skip to content

Conversation

@Sakurann
Copy link
Collaborator

@Sakurann Sakurann commented Sep 1, 2023

addresses issue #40.
Moved from Bitbucket: https://bitbucket.org/openid/connect/pull-requests/590

I wonder if batch credential endpoint needs additional error codes...

Copy link
Member

@bc-pi bc-pi left a comment

Choose a reason for hiding this comment

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

few remaining nits

Sakurann and others added 2 commits September 6, 2023 21:54
thank you!

Co-authored-by: Brian Campbell <71398439+bc-pi@users.noreply.github.com>
Co-authored-by: Brian Campbell <71398439+bc-pi@users.noreply.github.com>
@Sakurann Sakurann requested a review from bc-pi September 7, 2023 15:28
@Sakurann Sakurann requested a review from pmhsfelix September 28, 2023 14:46
The following additional error codes are specified:
* `error`: REQUIRED. A key at the top level of a JSON object, the value of which SHOULD be a single ASCII [@!USASCII] error code from the following:
* `invalid_credential_request`: The Credential Request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, or is otherwise malformed.
* `unsupported_credential_type`: Requested credential type is not supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

type is specific to the *_vc_* (W3C) formats, right? So, probably it shouldn't be in these format-independent error values.

Choose a reason for hiding this comment

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

A more general error could be unsupported_credential. This could be used to target non format related credential errors of this klnd.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

type is not specific to W3C formats :) it is used to refer to a claimset to be included in a credential. the definition of doctype in ISO 18013-5 is docType is the requested document type. and we use the following definition of doctype in VCI too

doctype: REQUIRED. JSON string identifying the credential type as defined in [ISO.18013-5].

so I think the current text is ok

Copy link
Collaborator

Choose a reason for hiding this comment

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

That's a slippery slope as the spec treats any credential type information as format specific. In addition, W3C has an array of type values. I assume the issuer would like to indicate which of them is unsupported.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

how should your comment be interpreted? are you agreeing with Jacob and Pedro that a generic use of a term type in the spec should be revisited? i do not disagree but that should be a separate issue.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with Jacob and Pedro that types are format specific. Whether we go for the more generic error code (as sugested by Jacob) or use format specific error codes depends on whether what wallets can reasonably process. If wallets anyway treat it generically, I would be in favor of the generic error code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with @jacobideskog .

Copy link

@jacobideskog jacobideskog left a comment

Choose a reason for hiding this comment

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

My only concern is the same as @pmhsfelix 's to name the unsupported_credential_type value after a W3C specific item.

The following additional error codes are specified:
* `error`: REQUIRED. A key at the top level of a JSON object, the value of which SHOULD be a single ASCII [@!USASCII] error code from the following:
* `invalid_credential_request`: The Credential Request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, or is otherwise malformed.
* `unsupported_credential_type`: Requested credential type is not supported.

Choose a reason for hiding this comment

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

A more general error could be unsupported_credential. This could be used to target non format related credential errors of this klnd.

Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it>
Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it>
@Sakurann Sakurann requested a review from peppelinux October 5, 2023 06:01
Copy link
Member

@bc-pi bc-pi left a comment

Choose a reason for hiding this comment

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

authorization error response can't mandate the auth-scheme value "Bearer

Co-authored-by: Brian Campbell <71398439+bc-pi@users.noreply.github.com>
@Sakurann Sakurann requested a review from bc-pi October 5, 2023 18:02
If the Credential Request does not contain an Access Token that enables issuance of a requested credential, the Credential Endpoint returns an authorization error response such as defined in section 3 of [@!RFC6750].

- Credential Request was malformed. One or more of the parameters (i.e., `format`, `proof`) are missing or malformed.
For the errors specific to the Credential Request such as those caused by `type`, `format`, `proof`, or encryption parameters in the request, the error codes values defined in (#credential-request-errors) SHOULD be used instead of a generic `invalid_request` parameter defined in section 3.1 of [@!RFC6750].
Copy link
Collaborator

Choose a reason for hiding this comment

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

I find this paragraph underneath #### Authorization Errors {#authorization-errors} misleading. Suggest to remove the section heading and just have two paragraphs or to move the second section into the credential issuance errors section.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I think it would be more misleading to have two separate paragraphs talking about errors for credential endpoint. we can change section titles (credential error response; authorization errors; credential request errors) if they are misleading, but I really do not think we need to change the structure.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok. Let's try the current text.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

discussed in the WG call, agreed to move line 889 under 891.

The following additional error codes are specified:
* `error`: REQUIRED. A key at the top level of a JSON object, the value of which SHOULD be a single ASCII [@!USASCII] error code from the following:
* `invalid_credential_request`: The Credential Request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, or is otherwise malformed.
* `unsupported_credential_type`: Requested credential type is not supported.
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's a slippery slope as the spec treats any credential type information as format specific. In addition, W3C has an array of type values. I assume the issuer would like to indicate which of them is unsupported.

Co-authored-by: Kristina <52878547+Sakurann@users.noreply.github.com>
Sakurann and others added 3 commits October 26, 2023 13:14
Co-authored-by: Giuseppe De Marco <giuseppe.demarco@teamdigitale.governo.it>
@Sakurann Sakurann requested a review from tlodderstedt October 26, 2023 20:17
@Sakurann
Copy link
Collaborator Author

@tlodderstedt we restructured as you suggested, please re-review. the WG was not clear on your second comment regarding "type"

The following additional error codes are specified:
* `error`: REQUIRED. A key at the top level of a JSON object, the value of which SHOULD be a single ASCII [@!USASCII] error code from the following:
* `invalid_credential_request`: The Credential Request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, or is otherwise malformed.
* `unsupported_credential_type`: Requested credential type is not supported.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with Jacob and Pedro that types are format specific. Whether we go for the more generic error code (as sugested by Jacob) or use format specific error codes depends on whether what wallets can reasonably process. If wallets anyway treat it generically, I would be in favor of the generic error code.

The following additional error codes are specified:
* `error`: REQUIRED. A key at the top level of a JSON object, the value of which SHOULD be a single ASCII [@!USASCII] error code from the following:
* `invalid_credential_request`: The Credential Request is missing a required parameter, includes an unsupported parameter or parameter value, repeats the same parameter, or is otherwise malformed.
* `unsupported_credential_type`: Requested credential type is not supported.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with @jacobideskog .

If the Credential Request does not contain an Access Token that enables issuance of a requested credential, the Credential Endpoint returns an authorization error response such as defined in section 3 of [@!RFC6750].

- Credential Request was malformed. One or more of the parameters (i.e., `format`, `proof`) are missing or malformed.
For the errors specific to the Credential Request such as those caused by `type`, `format`, `proof`, or encryption parameters in the request, the error codes values defined in (#credential-request-errors) SHOULD be used instead of a generic `invalid_request` parameter defined in section 3.1 of [@!RFC6750].
Copy link
Collaborator

Choose a reason for hiding this comment

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

Ok. Let's try the current text.

@Sakurann
Copy link
Collaborator Author

agreed with torsten to open an issue to rename unsupported_credential_type to unsupported_credential and merge this PR for now.

@Sakurann Sakurann merged commit af2ee50 into main Oct 31, 2023
@Sakurann Sakurann deleted the credential-error-response branch October 31, 2023 17:42
@Sakurann
Copy link
Collaborator Author

6 approvals. open for more than a week. no objection to merge during the WG call.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants