Skip to content

Variable 'aud' claims based on source of request and matching validation #262

Open
@AlexanderNeilson

Description

@AlexanderNeilson

Hi Team

I am coming up on a requirement at work for the ability we can set the audience dynamically based on which system our users login from and validate they are using the JWT on the same system. For us this involves our internal facing portal system and an external facing user portal allowing staff to log their timesheets / do time tracking and request leave etc which all needs to feed into the same core database and will share some endpoints.

To this library I am considering adding settings to allow signalling where the aud claim should be derived from and validated against and also either add a mechanism to use from permissions checking to ensure the audience further is allowed to access certain endpoints (or this would be handled inside my main code and leave this aside).

My review of the code here indicates support for static aud claims using the config but not currently a dynamic method so I am looking at adding such a feature (either locally vendored in my project or as a contribution).

As the name includes "simple" I wanted to check before I started coding if this was something the project would see a benefit from / want me to fork and propose a PR on this or if the solution above sits too far outside the goals / restrictions this project sees for itself so I can contribute it back if keen.

I would love to see any feedback / discussion on this and happy to answer questions about what I would be planning to implement or changes to bring it more inline with the goals of the project.

Thank you
Alexander

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions