Problem/Motivation

Currently /oauth/authorize, used for the Implicit Grant, requires the "access content" perm. This page is visit most commonly by anon users. If anon users don’t have that "access content", a common case for sites with mainly private content, the user will receive "Access Denied" and the flow back to their app breaks down. Removing this requirement from the route should be negligible since /user is accessible by anon users as well and this is essentially just a fancy /user visit.

Proposed resolution

Remove this perm requirement from the oauth2_token_extras.authorize route.

Remaining tasks

  • Create patch

User interface changes

None

API changes

None

Data model changes

None

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

infiniteluke created an issue. See original summary.

e0ipso’s picture

Issue summary: View changes
e0ipso’s picture

I don't feel strongly either way. Let's see if other people think about this before taking a resolution.

lauriii’s picture

We need this on one of our sites as well. It is not too bad to have a patch for this but maybe it is worth supporting this use case. If you feel concerned to remove the access control from this route, maybe we can add a new permission for this?

hampercm’s picture

I think the proposed approach is reasonable.

Is there any use case where you would want to restrict access to the authorization endpoint? I'm not coming up with one, myself, but I'm not especially familiar with the Implicit Grant. If there is any such use case, then adding a new permission would be necessary.

lauriii’s picture

Status: Active » Needs review
FileSize
483 bytes

Another reason to remove usage of this permission is that it creates undocumented dependency to Node module.

  • e0ipso committed da7da2f on 8.x-2.x authored by lauriii
    fix(Access control): Unrestricted access to initiate the Implicit grant...
e0ipso’s picture

Status: Needs review » Fixed

I keep going back and forth with this, but if you guys feel this is useful that settles it for me.

Thank you all!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.