-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Auth grant jwt bearer support #2229
Comments
High level, this looks good. I think however that we should allow multiple subjects. I also think that |
Also I would be ok with sending the JWK in the POST request! |
I think we should not allow multiple subjects. Conceptually we are granting (that's why i love your variant with If we draw parallels with normal authorization grant flow, there we also granting one-time permission for concrete client to represent us. If client wants to act on behalf of another user, it must again ask permission to do this. In normal flow, client explicitly asks for permission. In jwt bearer flow, "asking permission" is done in the way, that user shares private key with client. So i think we must have unique key pair per each subject. That means we should not allow to have multiple subjects for one public key. The only exception i think can thinks of, is to make subject optional. If we won't provide subject, that means we are allowing to represent client any user, however we can achieve the same with Considering API naming, i liked your variant. Endpoint |
However with the new name for endpoint |
With {
"issuer": "trusted-issuer",
"subject": "john",
"created_at": "2019-08-24T14:15:22Z",
"expires_at": "2020-08-24T14:15:22Z",
"public_key": {
"set": "set1",
"kid": "04471f17-43bf-4953-aa5d-ae722ade6acc",
},
"scopes": [
"openid",
"permissions"
]
} Looks good for me. What do you think? But still i don't know what to use as |
You convinced me - I like both approaches - explicit subject allow list plus "anonymous" option. Great! Regarding the naming convention:
Payload would look like this (please notice that I changed scopes -> scope as we use singular in all other APIs):
|
Thanks for your detailed answer, i will start implementing this) |
Awesome! :) |
I am marking this issue as stale as it has not received any engagement from the community or maintainers in over half a year. That does not imply that the issue has no merit! If you feel strongly about this issue
We are cleaning up issues every now and then, primarily to keep the 4000+ issues in our backlog in check and to prevent maintainer burnout. Burnout in open source maintainership is a widespread and serious issue. It can lead to severe personal and health issues as well as enabling catastrophic attack vectors. Thank you for your understanding and to anyone who participated in the issue! 🙏✌️ If you feel strongly about this issues and have ideas on resolving it, please comment. Otherwise it will be closed in 30 days! |
Marked as stale in error. |
Hi! I want to implement authorization grant using JWT RFC.
In order to do this we first need to make changes in fosite, so it can support this grant. This is mostly done and soon i will open PR with it in fosite.
Second we need to store somewhere in hydra information how to check incoming authorization grant which is represented by jwt. In order to check jwt, we need to check it's signature (so we need public key), requested scopes, issuer claim and subject claim. Scopes and subject makes sense to attach to public key and public key to issuer. Because we can have issuer, that issued a lot of pairs for different assertions with different scopes and subjects.
I was suggested in Slack channel to open issuer and describe here how api in Hydra to store this new information can look like, so i will:
At first i would like to introduce new resource Issuer:
GET /issuer/{issuer_name}
will return json like this:To create
Issuer
we just make request like thisPOST /issuers/{issuer_name}
with contents similar to above, keys in POST will be represented with jwk.Keys added in this manner can be managed using existing API /keys. Deleting key, will result in deleting it from
issuer=>public_keys
also.To delete issuer completely, not just keys, we can make request:
DELETE /issuers/{issuer_name}
To add new key with scopes and subject to existing issuer:
PUT /issuers/{issuer_name}
The text was updated successfully, but these errors were encountered: