IdentityServer4 icon indicating copy to clipboard operation
IdentityServer4 copied to clipboard

Allowlist for Authorize Request Objects

Open user1336 opened this issue 6 years ago • 4 comments

We would like to implement an allowlist for Authorize Request Objects so we can prevent requests to untrusted sources.

The spec says:

To prevent such attack to succeed, the server should (a) check that the value of "request_uri" parameter does not point to an unexpected location."

https://tools.ietf.org/html/draft-ietf-oauth-jwsreq-23#section-10.4

I'm aware we can implement our own IJwtRequestUriHttpClient and implement the behaviour described in 10.4.* and create a list with allowed endpoints that we can request.

We can also set a property on the Client with an allowlist so we can prevent requests to unexpected locations. How do you feel about this?

user1336 avatar Jul 23 '20 11:07 user1336

We won't add this to the core - but added all the necessary extensibility points we think.

The long term solution to this will be PAR (https://tools.ietf.org/wg/oauth/draft-ietf-oauth-par/) IMO.

leastprivilege avatar Jul 23 '20 13:07 leastprivilege

Out of curiousity: why don't you consider this as a core feature? I can confirm that the extensibility points are in place so it's quite easy to prevent requests to untrusted sources.

PAR makes sense to me, this helps mitigate possible SSRF issues.

user1336 avatar Jul 23 '20 18:07 user1336

because

https://tools.ietf.org/html/draft-ietf-oauth-jwsreq-25#section-10.4

And as stated above - the real solution IMO is to provide a "drop location" for jws requests. And that's called PAR. We will add PAR once it is stable.

leastprivilege avatar Jul 24 '20 07:07 leastprivilege

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

github-actions[bot] avatar Nov 26 '20 20:11 github-actions[bot]