Re-introduced "role" JWT claim to attempt to limit impact of breaking change#6832
Merged
donker merged 1 commit intodnnsoftware:release/10.2.0from Dec 9, 2025
Merged
Conversation
…hange In dnnsoftware#6356 a dependency update made an unintentional breaking change. Instead of the classic "role" claim we now give a "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" claim for roles. JWT in itself has no specs for roles or claims which is left to whatever implementation is targetted like OIDC, OAuth, etc. In DNN context it is a simple JWT but we do provide roles and the new package email values uses microsoft "standard" values that have been around in the Microsoft ecosystem since .Net Framework 4.5 and still lives all the way up to .Net 10. I am not sure if we should support our old "role" claim forever or the Microsoft claim as there are 0 specs about "role". IETF does have a spec about "roles" so if we would change it to that spec, it would still be a breaking change. What this PR does is provide both the old (<=9.13.9) behavior of "role" as well as the new microsoft way which may be better known in the .Net ecosystem. It also adds a deprecation note on both the plain and encrypted token to try and bring attention to this breacking change with the old way being obsolete and removed in v12. Closes dnnsoftware#6829
bdukes
approved these changes
Dec 8, 2025
david-poindexter
approved these changes
Dec 8, 2025
Contributor
There was a problem hiding this comment.
I think this is a case of the "lesser of evils" and what you propose makes sense. I am honestly shocked nobody has discovered this issue yet for DNN 10. Thanks @valadas
Note
I won't merge this PR in hopes we can discuss it during tomorrow's meeting.
mitchelsellers
approved these changes
Dec 9, 2025
Contributor
|
Nice! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
In #6356 a dependency update made an unintentional breaking change. Instead of the classic "role" claim we now give a "http://schemas.microsoft.com/ws/2008/06/identity/claims/role" claim for roles.
JWT in itself has no specs for roles or claims which is left to whatever implementation is targeted like OIDC, OAuth, etc.
In DNN context it is a simple JWT but we do provide roles and the new package enum values uses Microsoft "standard" values that have been around in the Microsoft ecosystem since .Net Framework 4.5 and still lives all the way up to .Net 10.
I am not sure if we should support our old "role" claim forever or the Microsoft claim as there are 0 specs about "role". IETF does have a spec about "roles" so if we would change it to that spec, it would still be a breaking change.
What this PR does is provide both the old (<=9.13.9) behavior of "role" as well as the new Microsoft way which may be better known in the .Net ecosystem. It also adds a deprecation note on both the plain and encrypted token to try and bring attention to this breaking change with the old way being obsolete and removed in v12.
Closes #6829