microsoft / DurableFunctionsMonitor

A monitoring/debugging UI tool for Azure Durable Functions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Should username claim be case insensitive?

vineetnair opened this issue · comments

Great work with this project guys! So useful :)

I noticed the username-based claim failed a couple of times for us due to case-sensitivity reasons. Should this check be done case-insensitively?

Thanks for your feedback, @vineetnair .

Are you saying that the same username sometimes appears in e.g. lower case and sometimes in upper case in your tokens?

No, the username claim via the token just retains the casing in which it was setup in AAD. But the configuration in DFM to only allow certain users seems to have a case-sensitive checking.

So, if the claim is John.Smith@contoso.com and the allowed username is john.smith@contoso.com, it doesn't allow access and throws a 401.

Then I'd suggest to stay on the safe side and keep this validation case-sensitive. At least, so long as it doesn't block any particular scenario.

That's fair, thanks