Skip to content

Re-introduced "role" JWT claim to attempt to limit impact of breaking change#6832

Merged
donker merged 1 commit intodnnsoftware:release/10.2.0from
valadas:jwt-breaking-change
Dec 9, 2025
Merged

Re-introduced "role" JWT claim to attempt to limit impact of breaking change#6832
donker merged 1 commit intodnnsoftware:release/10.2.0from
valadas:jwt-breaking-change

Conversation

@valadas
Copy link
Copy Markdown
Contributor

@valadas valadas commented Dec 8, 2025

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

image

…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
@valadas valadas added this to the 10.2.0 milestone Dec 8, 2025
Copy link
Copy Markdown
Contributor

@david-poindexter david-poindexter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@valadas valadas deleted the branch dnnsoftware:release/10.2.0 December 9, 2025 16:54
@valadas valadas closed this Dec 9, 2025
@bdukes bdukes reopened this Dec 9, 2025
@donker donker merged commit 19a135b into dnnsoftware:release/10.2.0 Dec 9, 2025
3 checks passed
@valadas valadas changed the title Re-intoduced "role" JWT claim to attempt to limit impact of breaking change Re-introduced "role" JWT claim to attempt to limit impact of breaking change Dec 10, 2025
@CBPSC
Copy link
Copy Markdown
Contributor

CBPSC commented Dec 10, 2025

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants