Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
The Implicit Flow: Part 1 #107
The Implicit Flow: Part 1 #107
Changes from 8 commits
6208afd
4299144
3bcad08
2fca0c6
3165e6b
63f7192
87e77df
27f3f93
f38ecb2
224389c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
response_type
can also be:token
token id_token token
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.
No.
token
(raw OAuth 2.0) MUST NOT be used for the authentication purpose. There are many explanations, for example, see: http://www.thread-safe.com/2012/01/problem-with-oauth-for-authentication.htmlAcceptable:
code
- Authorization Code Flowid_token token
- Implicit Flowcode id_token
- Hybrid Flow -- Financial-grade API Security Profile 1.0 - Part 2: AdvancedHowever, I think i will implement the Implicit Flow first. After finishing, I will consider whether to implement the Hybrid Flow.
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.
This method name
setup_phase
is confusing; maybevalidate_response_type!
is better. My point is there are many types ofresponse_type
values, and it's not clear to me that this is checking specific types for different flows.We may want to link: https://openid.net/specs/oauth-v2-multiple-response-types-1_0-03.html
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.
setup_phase
is a override method. It's OK.As you say, there are various combinations of
response_type
. However, they cannot be implemented without checking the use cases and risks one by one.If you want to implement the Hybrid Flow, I won't stop it and welcome you to do it.
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 see your security note about
id_token
, but this gem supported that configuration in the past (e.g. https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-protocols-oidc#send-the-sign-in-request). I'm a bit hesitant to break existing configurations.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.
There are too many things to point out and I am at a loss.
id_token token
is specified. In the case of the Hybrid Flow, enabling onlyid_token
is instructed.Furthermore, if you still want to get
id_token
only, OK, I consider implementing it. Let me do to accept onlyid_token
in the next patch part 2 and implement the public key validation in patch part 3.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.
@stanhu
Are there any additions? For reference, I would link to the implementation guide.
https://openid.net/specs/openid-connect-implicit-1_0.html
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 think there should be some method for
implicit_flow?
,client_credentials_flow?
, etc. There are many possibilities forconfigured_response_type
.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.
Ah, I see.
I want to organize it with the patch part 2 to push next.