-
Notifications
You must be signed in to change notification settings - Fork 43
aud
is using client_id
by default
#32
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
Comments
@hassaanalansary, I agree with the second option, in other words: @hassaanalansary and @chmoder, I created a PR to fix it. Could you review it? Thanks |
Thank you gor your response, I think that is the easiest solution. Left a trivial comment |
Thanks @marcelo225, I am not 100% sure what the default should be (if any) based on my research in PyJWT. I think any default is okay. But it seems that different configurations will have different audiences. What are your thoughts on exposing the audience parameter to the middleware and public methods? For example, we use this method to authenticate a user and the middleware for authorization. So the
|
@chmoder, could you verify this PR? I've been swamped lately. I can't fix it at the moment. I wanna advise you all it doesn't look like I'm not working on the project |
Thank you for the awareness. I will make time for it this week. |
Hi @hassaanalansary, thank you for the question and suggestions. I think I understand what you are asking here. From the stack overflow article you referred to:
So if I understand correctly, this library has a setting to set what the Setting that field to I was going to write some changes to support your request but it doesn't look like that will be necessary. Sorry for the long post. Please let me know if that makes sense to you as well. ✋ |
I am not sure that I am 100% following. Later I had to use I believe that In other words, the client used by the backend doesn't need to be related to the user's client. Yes keycloak has a default behavior (sometimes not documented) but that doesn't mean that I need to stick to the default behavior. Right now I am inheriting and overriding this code to make it work for my use case. |
I am sorry for the trouble this caused you. The underlying The use of the claim is optional, and verifying it can be disabled by setting the option The creator of the token does not enforce that the |
@marcelo225, I think this pr is able to be closed after this discussion. If we want we can open a new issue with a label, "feature request". To
This pr appears to have some related work. Maybe we can review that one first. |
Ok, @chmoder I'll close this pr Thank you for helping! |
Hello, we are implementing keycloak at my job, and we decided to use your awesome library.
I have an issue/question.
I created a client called
django-client
in keycloak and left all the default configurations as is.When setting
LOCAL_DECODE=True
the JWT authorization fails because the keycloak sendsaud=['account']
however,you have
This results in an error because the
django-client
is not in the intendedaud
coming from keycloakI was able to add a custom
Dedicated Scope
to myClient
with the same name (django-client
), following the answers here. makingaud=['account', 'django-client']
which makes it pass the JWT check.but I think this is not a real solution.
from my research all created
Clients
haveaud='account'
by default from hereand you can remove this
aud
if you want and assign custom scopes instead.I think that using
audience = self.client_id
by default is not correct here."account"
LOCAL_DECODE_AUD
in the config that should indicate that the developer wants to enforce a specificaud
, which could be anything"account", CLIENT_ID, "www.supersecretwebapp.com", etc..
I am not sure if my issue is very coherent and up to code. please reach out if you need more info about this.
P.S. A useful resource about
JWT aud
vsclient-id
hereThe text was updated successfully, but these errors were encountered: