bolkedebruin / rdpgw

Remote Desktop Gateway in Go for deploying on Linux/BSD/Kubernetes
Apache License 2.0
758 stars 119 forks source link

Use multiple oidc claim to find the username #68

Closed totomz closed 1 year ago

totomz commented 1 year ago

The claim preferred_username is optional in Azure AD [1] . Although it is listed as preferred, in some enterprise environment it's not possible to add this additional claim. unique_name and upn are legacy alternatives

[1] - https://learn.microsoft.com/en-us/azure/active-directory/develop/active-directory-optional-claims#v10-specific-optional-claims-set

bolkedebruin commented 1 year ago

Awesome! Can you please add a test against your new function? And maybe you would like to make the claim configurable as well in addition to the hardcoded ones?