-
-
Notifications
You must be signed in to change notification settings - Fork 50
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
Supported custom validateRedirectUri() #97
Conversation
Can you also include some docs and write some tests? |
Hi, sorry, I truly have very few time, so all I can do just now is to review original project pr's, and But you are right: it is important to have doc and tests, so: can someone help writing them? Regards. |
BTW, changed the target branch to development |
@jorenvandeweyer I think if @FStefanni has not much time then we can work on this as well without cloning the PR repository: $ git fetch origin pull/97/head
$ git checkout -b pullrequest FETCH_HEAD |
While writing tests and documentation for this pull request I came across multiple issues.
@jankapunkt I think I can not push my commits to this pull request because I'm not listed as a member of this organisation / maintainer of this repo. |
I think we are on good point to add more people @HappyZombies @jwerre |
@HappyZombies Thank you for adding me.I was able to push my commits now. I included some docs and tests. I also made sure promises and callbacks are also supported. |
my 2 cents: I dont like it. An integration-implementer of the model could mess up the redirectUri validation. Actually what we need is a standardized way to give the integration-implementer the opportunity to add allowed redirectUri's to the client instance and we should implement a very safe way to validate the incoming redirectUri with the allowed redirectUris. Redirect_uri is actually quite sensitive, e.g.: So we should take the responsibility from implementing a correct validation away from integration-implementer. We should actually add a |
@Uzlopak thank you for the linked blog article I will read it and review again with this in mind |
I disagree.. We should allow them to write their own validation at their own risk. Since we are not able to provide a solution for all use cases. We can provide in addition some safe helper functions that can be safely used in their own implementation. For example: |
I suggest we all take or time to read rfc OAuth 2.0 Threat Model and Security Considerations and ensure the PR implements it in a way that concerns from the rfc are covered. I at least would go this round. If the risks involve the default behavior
If the risks involve the implementor's code I would at least
what do both of you think? |
I read the spec quickly, and the solutions a bit more carefully. At the moment we have the solution from Section-5.2.3.5 implemented and this is used as the default validation.
The risk exists when an implementor creates their own implementation of We should provide this function as an option in combination with a warning and a link to the full spec, since the spec also aknowledges more complicate Authorization servers require more dynamic solutions and are not able to require a full URI. I think it's not our right / responsibility to enforce a single solution. |
@jorenvandeweyer I agree |
After some thoughts I also agree |
Summary
This pr proposes a feature to allow custom 'validateRedirectUri()' method implementation.
Linked issue(s)
This pr follows issue #89, point 4, and original pr 482.
Added tests?
This is missing.
OAuth2 standard
Unknown