Skip to content

Introduce mapping for claims #94

@jeanouii

Description

@jeanouii

After creating a MP-JWT implementation in TomEE, I have done a small demo application using it so I could go and speed at conferences.

I found 2 things quite painful

  • the 'aud' which is required and I'm not quite sure why
  • the 'sub' which is also required.

Though I would be interesting in having details about why the 'aud' is required, I'd like to discuss here about the 'sub'.

The 'sub' claim is used to build the Subject so the security context can be used for all sort of things.
I understand the fact we need a name to build the subject but I don't get why we have introduced a new claim.

Most providers have already a claim with a name or something that can be used, so why adding another one?

I was wondering if now that we are working on configuration we could provide mapping for

  • principal claim, aka the name which would be 'sub' for background compatibility reasons
  • roles/groups claim - choose the name of the claim used to build up the list of role principals (it could be groups by default, but why not roles or scopes?)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions