Conversation
9e3307d to
60af9de
Compare
|
Thanks for offering this @the-voidl. While I respect that RFC7519 does allow multiple
Emphasis in the above is mine. In my view, from the BookStack perspective we would only be trusting the Therefore I'm hesitant to change the existing logic since I'm specifically working to OIDC guidance, instead of the wider scope of what's possible in a JWT. Let me know if I've misunderstood though, or if you think I'm misinterpreting the OIDC guidance. |
|
There is a whole discussion about the use of OpenID seems to be inconsistent about itself in this manner: While the errata to openid-core states following: My interpretation therefore is:
The only trustworthy conclusion weather To answer the question about the comment I removed: |
Thanks for that info, but the conversation does not alter or lead to changes in the lines I've followed here. The proposals right at the end even specifically retain the
Since this related to auth, I'd side on the safe default of not trusting anything unless there's a reason to, and therefore stick to the official guidance in strict terms. I'd much rather "over-interpret" than under-interpret. To be honest, I'd question why extra |
|
You are right. The phrase openid-connect-core: 2. (ID Token)
And this answer on StackOverflow. And Michael Jones in the referred discussion on Bitbucket:
and
William Denniss also figured scenarios there, which comply with what I understand (search for "Multiple Audience Format" or "Dual Audience Format"). Zitadel implements this hierarchy: This scenario, that multiple audiences occur, can also happen with ORY, AzureAD, and Keycloak as well. Also interesting is that ORY say:
Further I'd consider the payload trustworthy as long as a single |
None of those quoted lines, nor the stack overflow answer, lead me to think it's valid to not strictly follow the OIDC wording. Nor do they seem incompatible with the wording I'm following.
That makes sense, where project is an application, especially in the context of potential micro services that would maybe share tokens at some level as part of a single application/project.
I'm sure there are valid multi-audience OIDC scenarios, like the touched on above. I'm just not sure the scenario in question is one of those. BookStack with OIDC has been used in many environments, including in AzureAD and Keycloak, without this being an issue. I believe the existence/use of multi-audience for OIDC would be conditional based upon context of the client application, and how it's auth is shared/connected with other applications (If any).
No, there may be absolutely no reason to reject like this, or there may be a non-obvious reason which is what prompted the wording to be written into the implementers guide in the first place. Either way, I'd play it safe and stick to the wording of the guide. |
Sadly that's not possible because, like mentioned before, Zitadel sends the project id as audience as well, so we always get at least two values. We could also thump on a change in Zitadel to be able to send a single audience. I'd rather like to see BookStack more flexible in accepting OICD servers than authentication providers adopting to single instances they need to authenticate for. Also since both of us clearly agree that it's valid to have more than one audience. I support you in being more strict about authentication, but in this particular case here I'd wish to see more flexibility. If I understand you right, the only problem is that one cannot determine if an audience different from client_id can be trusted? |
I'm not too comfortable with that either, it seems like an option that would only act as a hack around this exact scenario. From the BookStack perspective, it should not need to trust other audiences, it's not like it's expected that auth/tokens need to be shared. I understand the desire for us to be more flexible, but I'm hesitant on adding additional specific options, and widening the scope of what we support, to specifically address outlying cases from specific identity providers. That said, as touched upon in your other PR, I'd be happy to add a new logical theme event to allow customization of incoming user token data, which would allow generic ultimate flexibility, allowing any shape of ID token to be manipulated to the format that BookStack supports as required. |
|
I'm going to go ahead and close this off since, as explained above, I don't see myself going against the OIDC guidance or adding scenario/vendor specific workarounds. As said above, happy to add a new logical theme event to allow customization of incoming user token data. Just shout if you want that to be added and a feature request issue can be added for that. |
|
Well, I still don't see that this is against OIDC guideline, while I understand your doubts. Thus I think I will be fine with a customization of the user token data in the new system. |
|
@the-voidl Thanks for the understanding. I've opened a new issue for the mentioned theme even in #4200. Have assigned to the current milestone with an aim to sneak this into our next feature release. |
Our oidc authentication endpoint (zitadel) returns multiple audience fields for the user and places the expected value in
azp.In
OidcIdToken.phpyou were assuming that there can only be one audience, while RCF 7519 does not.I added a check that allows to use
azponce there are multipleaudvalues available in the token and the client id is found therein.An example payload of our oicd server looks like this...: