This repository was archived by the owner on Jun 2, 2026. It is now read-only.
Allow more filtering of openid claims and user properties#9
Open
rowleya wants to merge 6 commits into
Open
Conversation
Author
|
(I also updated some gradle things here as they weren't working for me - feel free to tell me you don't want those though and I can revert those changes) |
Author
|
Also closes UoMResearchIT/STARTER-KIT#63 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
The plugin allows filtering by email domain, which is useful, but my OpenID provider (Entra in this case) also provides some other things to filter on, which I think make it more secure (tenant-id in this case). To avoid this plugin being specific to a use case, I thought it was more useful to simply enable a regular expression on any token. This works in my testing for my case. The plugin config is simply updated with extra properties that start with
regexFilter.e.g. for tenant-id in Entra, which istidif I want to add this to filter to the manchester.ac.uk, nhs.net and icr.ac.uk tenants on theauth0client, I can add:openid.auth0.regexFilter.tid=37c354b2-85b0-47f5-b222-07b48d774ee3|c152cb07-614e-4abb-818a-f035cfa91a77|6138f7b9-eeea-47f7-a06b-b90a692f238eThis could also potentially remove the need for email domain filtering, since that could be simply done with:
openid.auth0.regexFilter.email=*\.manchester.ac.uk|*\.nhs.net|*\.icr.ac.ukHowever as I suspect that use case is more common, it may be worth keeping that option too.