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

Define successful and error responses for Automatic Registration #82

Merged
merged 7 commits into from
Oct 23, 2024

Conversation

selfissued
Copy link
Member

Fixes #69

Cc: @cicnavi

If the OP fails to establish trust with the RP, it SHOULD use
appropriate <spanx style="verb">error</spanx> code and
<spanx style="verb">error_description</spanx> values
to enable the RP to understand what went wrong.
Copy link
Collaborator

Choose a reason for hiding this comment

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

In this comment I explained that failing to establish trust in the caller automatically means that the redirect_uri must not be used, hence an error code cannot be transmitted via the redirect back to the caller.

#69 (comment)

Since the trust in the caller must be established first before doing anything else that is OIDC / OAuth specific, it makes sense to put this paragraph first.

Copy link
Collaborator

Choose a reason for hiding this comment

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

It would also help to explain in what contexts the missing_trust_anchor and validation_failed errors apply and can be passed back to the caller, because when the trust establishment fails the redirect_uri must not be used. From this follows that these codes apply to PAR with automatic registration only. They are also useful in explicit registration requests, but currently are not defined for use there.

Copy link
Member Author

Choose a reason for hiding this comment

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

This commit says that redirection should not be performed when trust cannot be established. It also says that the new error codes can be used with PAR.

Copy link
Collaborator

@vdzhuvinov vdzhuvinov left a comment

Choose a reason for hiding this comment

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

I think the spec should be strict about the redirections when the RP isn't trusted.

when using Automatic Registration is the same as the
successful authentication responses defined in <xref target="OpenID.Core"/>.
In particular, it is a successful OAuth 2.0 authorization response
sent via redirection to the Client's redirection URI.
Copy link
Collaborator

Choose a reason for hiding this comment

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

sent via redirection -> sent

(a client may choose to use the response_mode=form_post parameter, in which case the response parameters are POSTed to the redirect_uri)

when using Automatic Registration is the same as the
error authentication responses defined in <xref target="OpenID.Core"/>.
In particular, it is an OAuth 2.0 authorization error response
sent via redirection to the Client's redirection URI,
Copy link
Collaborator

Choose a reason for hiding this comment

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

sent via redirection -> sent

both of which are about reasons trust failed to be established,
SHOULD only be returned in
<xref target="RFC9126">Pushed Authorization Request</xref>
error responses, and not via redirection.
Copy link
Collaborator

Choose a reason for hiding this comment

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

and not via redirection -> and not to the Client's redirection URI.

</t>
<t>
If the OP fails to establish trust with the RP,
it SHOULD consider the redirection URI to be invalid
Copy link
Collaborator

Choose a reason for hiding this comment

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

it SHOULD consider the redirection URI to be invalid
->
it MUST treat the redirection URI as invalid

(if the RP is not trusted, there I don't see a good reason to act upon its redirect_uri; I also don't think it's a good idea for an OP to say in the login UI "the RP that initiated is not trusted here, but if you want you can still redirect by clicking here)

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.

According to @vdzhuvinov suggestions being included, I approve this PR

@selfissued selfissued merged commit 274f002 into openid:main Oct 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants