gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.4k stars 547 forks source link

[Bug]: OAuth fails for Azure AD external users due to `#` in user id #2773

Open nazarewk opened 8 months ago

nazarewk commented 8 months ago

What happened?

Azure AD external users are in format: user.name_external.domain.com#EXT#@internaltenant.onmicrosoft.com for user user.name@external.domain.com and internaltenant , which does not pass the internal check due to presence of #: https://github.com/gravitl/netmaker/blob/630c95c48b43ac8b0cdff1c3de13339c8b322889/models/structs.go#L274-L282

Version

v0.22.0

What OS are you using?

Linux

Relevant log output

[netmaker] 2024-01-18 09:45:56 error creating user, krzysztof.nazarewski_[REDACTED].com#EXT#@[REDACTED].onmicrosoft.com ; user not added

Contributing guidelines

nazarewk commented 8 months ago

actually it is a lot more than just a # present in the SSO username, validation should be skipped completely as per #2776 it fails: