-
Notifications
You must be signed in to change notification settings - Fork 999
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
Implementing "client_assertion" #744
Comments
we are interested of this feature as well. |
Hi @zetaab! I see that you have made some contributions to client_assertion is the client credentials flow! However, this feature also needs to be added into the 'oauth2/internal' directory for the auth code grant flow. The auth code grant flow retrieves both an access token and an id token, the ideal grant flow for SSO (user + app). See this link for more info on this grant flow. |
@naizerjohn-ms that can be done already? Example (disclaimer: I did not test this but afaik when reading code it should be possible)
|
@zetaab Great point, let me implement this and test... looks like it should work? I'm looking at oauth2/internal/token.go at function 'newTokenRequest', and it seems it only adds the client_secret to the body of the request if it is not null/empty |
@naizerjohn-ms yep it adds it only if its defined, but you can define extra parameters with oauth2.SetAuthURLParam before that. Please test it if you have use-case :) |
we are also interested in this feature as well, waiting for the PR to be approve |
@zetaab This has been tested and verified. Will close issue now! |
Hello @zetaab! I am reopening this issue, but I may just create a new one for specificity. Your recommendation above as stated has been verified to work which is great! There is one issue though... the token refresh does not work when using the method above by setting the authURLparams. This is because when this package does a token refresh it calls the TokenSource method inside oauth2.go file here: TokenSource does NOT support passing in additional authURLparams like the Exchange method does. Any help to get this support implemented would be much appreciated! Or if I missed something, please show me! |
@naizerjohn-ms yeah well might be.. but the main issue is that none is reviewing. I have no idea how to get reviews |
Hello!
Currently this package does not support client_assertion/client_assertion_type OAuth2.0 client authentication outlined here in the OpenID Connect documentation (not up to standard). Here is an example outlined in this documentation, for a visual on what the request would look like:
as opposed to what this package only currently supports (client_secret):
I am willing to work towards this implementation and am asking for any support/guidance for achieving this solution. Many tech companies (including ours) are migrating away from using secrets and towards more secure authentication systems. Please see this article which provides a deeper description on what client_assertions are as well.
The text was updated successfully, but these errors were encountered: