[UI] [Backend] OpenMetadata UI breaks when passing multiple principalDomains during InitialAdminCreation
Affected module Does it impact the UI, backend or Ingestion Framework? UI, Backend
Describe the bug If we set multiple principalDomains in openmetadata.yaml config for authorizerConfiguration section, this breaks UI post SSO Login with API's erroring out to get loggedInUsers and User Details.
To Reproduce
OpenMetadata.yaml
...
authorizer:
className: "org.openmetadata.catalog.security.DefaultAuthorizer"
containerRequestFilter: "org.openmetadata.catalog.security.JwtFilter"
initialAdmin: "akash"
botPrincipal: "ingestion-bot"
principalDomain: "abc.org, xyz.org"
...
Run the openmetadata Server up. Try to Single Sign On.
Expected behavior It should allow me to sign in with [email protected] or [email protected] and be admin.
Actual Behaviour UI breaks as Server response with 400 Bad Request for getLoggedInUser endpoint and UI shows only loading icon.
Request URL: https://hostname/api/v1/users/loggedInUser?fields=profile,teams,roles
{
“code”: 400,
“message”: “[email must match \“^\\S+@\\S+\\.\\S+$\“]”
}
Version:
- OpenMetadata version: [e.g. 0.8] 0.9.0
Additional context This bug was reported by community user here.
cc - @harshach , @sureshms
Additional comment:
Issue is replicable for users under initialAdmin (adminPrincipals), whereas for normal users our system takes the email from JWT token which works fine for signup as well as getLoggedInUser.
@akash-jain-10 I believe there should be just one principal domain or set enableEnforceDomain to false...let's close this if it makes sense
Closing this issue as this is not required anymore and it can be achieved with enableEnforceDomain attribute.