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

Token Introspection #94

Merged
merged 10 commits into from
Feb 13, 2022
Merged

Token Introspection #94

merged 10 commits into from
Feb 13, 2022

Conversation

dshanske
Copy link
Member

@dshanske dshanske commented Sep 6, 2021

As per the proposal at the 2021 Popup, this extends the token verification response to match the token introspection endpoint parameters, and extends the request to support the POST method used in that extension. It does not remove GET, but retains it as an alternative, but aligns the response to same. It also changes trhe response to an invalid token to a 200 in line with the spec.

Closes #33.

public/source/index.php Outdated Show resolved Hide resolved
public/source/index.php Outdated Show resolved Hide resolved
public/source/index.php Outdated Show resolved Hide resolved
public/source/index.php Outdated Show resolved Hide resolved
Copy link
Contributor

@jamietanna jamietanna left a comment

Choose a reason for hiding this comment

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

Few comments, and adding it to CHANGES but looks good!

@jamietanna
Copy link
Contributor

We should make sure this closes #33.

@reiterate-app reiterate-app mentioned this pull request Sep 11, 2021
public/source/index.php Outdated Show resolved Hide resolved
public/source/index.php Outdated Show resolved Hide resolved
public/source/index.php Outdated Show resolved Hide resolved
@aaronpk aaronpk linked an issue Sep 23, 2021 that may be closed by this pull request
@aaronpk
Copy link
Member

aaronpk commented Sep 23, 2021

Didn't we discuss moving token introspection to its own endpoint with its own rel value? If an implementation wants to use the same endpoint for both it would be possible with <link rel="token_endpoint introspection_endpoint"...> and since the parameters don't conflict it would be possible to do this. But for a simpler implementation you could have separate URLs for those as well.

@dshanske
Copy link
Member Author

Didn't we discuss moving token introspection to its own endpoint with its own rel value? If an implementation wants to use the same endpoint for both it would be possible with <link rel="token_endpoint introspection_endpoint"...> and since the parameters don't conflict it would be possible to do this. But for a simpler implementation you could have separate URLs for those as well.

I don't recall this. If you look as what you yourself wrote in #33 we decided to use the same endpoint.

@dshanske
Copy link
Member Author

@aaronpk @jamietanna Hopefully made the suggested changes.

@@ -698,12 +698,13 @@
</ul>
<p>Note that the request to the endpoint will not contain any user-identifying information, so the resource server (e.g. Micropub endpoint) will need to know via out-of-band methods which token endpoint is in use.</p>

<p>The resource server SHOULD make a POST request to the token endpoint containing the Bearer token in the <code>token</code> parameter, which will generate a token verification response.</p>
<p>The resource server SHOULD make a POST request to the token endpoint containing the Bearer token in the <code>token</code> parameter, which will generate a token verification response. The endpoint MUST also require a HTTP Authorization header with a separate OAuth 2.0 access token to allow the call to this endpoint. If the token does not contain sufficient privileges or is otherwise invalid for the request, the authorization server MUST respond with an HTTP 401 code.</p>
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I agree with this - it could be provided using HTTP Basic, not a full access token. I'd prefer saying it could be any method of HTTP Authorization

@dshanske
Copy link
Member Author

Rewrite to support separate endpoint using metadata proposal #43 once PR for that is merged.

@dshanske
Copy link
Member Author

dshanske commented Nov 5, 2021

Refreshed PR to accommodate metadata endpoint.

public/source/index.php Outdated Show resolved Hide resolved
public/source/index.php Outdated Show resolved Hide resolved
Copy link
Contributor

@jamietanna jamietanna left a comment

Choose a reason for hiding this comment

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

Couple of minor tweaks, otherwise LGTM!

@aaronpk
Copy link
Member

aaronpk commented Feb 13, 2022

This is a pretty big change to the existing behavior, but essentially it's doing it by adding a new introspection feature with a new introspection endpoint, and removing the old introspection feature at the token endpoint. I'm going to add a little warning to the section to refer to the previous behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants