-
-
Notifications
You must be signed in to change notification settings - Fork 794
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
Openid Connect Core support #545
Conversation
The CI will be broke until OAuthLib version containing this PR oauthlib/oauthlib#488 |
Hi @wiliamsouza Thanks, this is a high quality PR. I'm not merging it until the upstream work is fully released, but once it is, feel free to ping here again and I'll do a full review pass. |
OAuthLib upcoming release 3.0.0 oauthlib/oauthlib#512 |
Great PR. It will be very good when It wore merged |
Hi all, |
@jleclanche, oauthlib's PR oauthlib/oauthlib#488 has been merged into oauthlib's master branch. Would be great to validate the changes here before releasing the [email protected] |
@afabiani As soon as [email protected] get released |
@JonathanHuot Winter is pretty busy here, I'm not sure I'll soon be in a situation where i can do an updated review. And either way, I wouldn't want to land this without testing it (and I'm not in a position to test it). So if people want to get this PR moving ahead of oauthlib 3.0 release, bring it into your installations and try it out, report back with any issues. |
@jleclanche @JonathanHuot I can manage this |
@wiliamsouza currently I had to fork this one [1] since it required few more changes in order to fully work with OIDC 1.0 (tested mainly using Keycloak). Will look forward to the new release anyway. Thanks. [1] - https://github.com/GeoNode/geonode-oauth-toolkit |
I would love to see OIDC support in DOT. Looking forward to seeing this merged. |
@wiliamsouza [email protected] is released 🎉 |
I created dummy Django app with this library integrated, seems like the patch is currently doesn't work. Here is the app: https://dummy-idp-dot.herokuapp.com. I created an OAuth app, you can view it's credentials here: https://dummy-idp-dot.herokuapp.com/oauth/applications/1. I tested it with OpenID Connect debugger: https://oidcdebugger.com. Currently there is an
|
Working on it |
266ff15
to
0d3904a
Compare
Pull Request Test Coverage Report for Build 1345
💛 - Coveralls |
@afabiani Great! Can you explain the changes and how do you test it with Keycloak? |
@jejenone You can help it get done reviewing and testing this branch. |
@tribals Can you update the code and redo the test? |
@wiliamsouza Finally I'm testing in local environment. It seems to mostly work. I tried implicit flow with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please re-base to master while updating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's better to pull updates from master and change models based on latest master, and then regenerate migrations based on the migrations in masters branch.
@auvipy Your merge broke the build. Why did you do that before any discussion? |
2e013c3
to
df1a154
Compare
tests are failing. you could add me to your branch |
This is a big improvement and a lot of new code. I think we should hold off merging this until after the 1.3.0 release which I'm hoping to get out today or tomorrow. Given the significant new functionality, perhaps this becomes a 1.4.0 or 2.0 release. What are your thoughts on whether this is a major or minor release per semver? And, of course, failing tests have to be resolved. They are mostly isort/flake8 issues because I undid the disabling of those tests in #798. They should be really easy to fix:
|
I will fix tests.
Done! Welcome. |
Great!
1.4.0 is ok. |
@@ -33,6 +34,7 @@ deps = | |||
pytest-xdist | |||
py27: mock | |||
requests | |||
jwcrypto | |||
|
|||
[testenv:py37-docs] | |||
basepython = python |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe you need to add jwcrypto to deps here as well to resolve tox -e py37-docs
failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And, of course, failing tests have to be resolved. They are mostly isort/flake8 issues because I undid the disabling of those tests in #798. They should be really easy to fix:
Those things were fixed here wiliamsouza#8. After merging this, only documentation and examples items (#545 (comment)) will remain to merge this PR
Checklist
I think this the job that must be done. |
I can fix the 1 and 2 items. And about item 3, is it really necessary to put the |
It seems to have some logic. |
sorry to be late at the party, what/how can I help? |
Can you handle any item from the checklist? |
you can start with rebase |
The items 1 and 2 from the checklist were fixed here wiliamsouza#8 |
And about item 3, I made this comment #545 (comment) and created this PR to do it here wiliamsouza#9. This makes sense for me, but if not, just ignore it. |
Add project settings to be ignored in coverage
Fix flake8 and test doc issues
settings.AUTH_USER_MODEL, on_delete=models.CASCADE, blank=True, null=True, | ||
related_name="%(app_label)s_%(class)s" | ||
) | ||
token = models.TextField(unique=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Testing locally using MySQL the migration created by this errors with MySQL err 1170, "BLOB/TEXT column 'token' used in key specification without a key length".
Reference: https://dev.mysql.com/doc/refman/8.0/en/server-error-reference.html#error_er_blob_key_without_length
Given that this is not the primary key and (if my understanding is correct) typically a value generated by the application, perhaps we could not use a database index to ensure uniqueness? Happy to make a PR if so.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure plz
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see wiliamsouza#10
I think that this PR can be closed because we already have this implementation merged here #859 |
This PR add OpenID Connect Core http://openid.net/specs/openid-connect-core-1_0.html support.
To run the tests do:
Django OAuth Toolkit cloned repository
Usage examples:
Authorization-code
http://openid.net/specs/openid-connect-core-1_0.html#CodeFlowAuth
token and id_token
Only token
implicit
http://openid.net/specs/openid-connect-core-1_0.html#ImplicitFlowAuth
token
id_token
token and id_token
openid-hybrid
http://openid.net/specs/openid-connect-core-1_0.html#HybridFlowAuth
code, id_token and token
code and id_token
code and token
code
TODO: