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

Google: extended hd whitelisting support #16

Open
drzraf opened this issue Apr 27, 2019 · 10 comments
Open

Google: extended hd whitelisting support #16

drzraf opened this issue Apr 27, 2019 · 10 comments

Comments

@drzraf
Copy link
Contributor

drzraf commented Apr 27, 2019

hd parameters allow to limit allowed users to those belonging to one specific GSuite domain (other values like * or unset allow every user).
This is done by vendor/league/oauth2-google/src/Provider/Google.php::assertMatchingDomain()
which is the last instruction done before Provider::getResourceOwner() returns.

This is not as flexible as possible as it may be desirable to provide whitelisted domains either as a list or a regexp, ...
A flexible and future-proof solution would be to simply allow user-provided function to define this behavior (taking OIDC user-data as parameters and returning a boolean about whether user is accepted).

Do you think there could be room, either inBaseProvider.php or GoogleProvider.php for such an improvement?

@rhukster
Copy link
Member

Please submit a PR against GoogleProvider for now.

@drzraf
Copy link
Contributor Author

drzraf commented May 3, 2019

@drzraf
Copy link
Contributor Author

drzraf commented May 8, 2019

Any comment on upstream PR?

@drzraf
Copy link
Contributor Author

drzraf commented Feb 25, 2020

Up. Since upstream considered this to be up to library's consumers, could you please reconsider?

@drzraf
Copy link
Contributor Author

drzraf commented May 10, 2020

ping

@rhukster
Copy link
Member

Is there a PR to review?

@mahagr
Copy link
Contributor

mahagr commented May 13, 2021

@drzraf What is the status of this one?

@drzraf
Copy link
Contributor Author

drzraf commented May 18, 2021

If you feel that upstream rejection means it'd be adequate to do it within grav-plugin-login-oauth2 and likely to be merged, then I could try to come up with a PR.
Please let me know in advance if you've any guidance and/or preferred way to resolve it.

@mahagr
Copy link
Contributor

mahagr commented May 18, 2021

If it was rejected, we shouldn't add the feature. But that said, if they figured out another method to add it, I'm not against adding the support.

@drzraf
Copy link
Contributor Author

drzraf commented Nov 11, 2021

They didn't reject the feature per-se but the implementation.
Still the question is whether this sounds useful to other users.

I manage the GSuite for an organization which have multiple domains and users belonging to these domains. Without a patch I can't offer cross-domain logging (whitelisting more than one domain)

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

No branches or pull requests

3 participants