OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

[UI] [Backend] OpenMetadata UI breaks when passing multiple principalDomains during InitialAdminCreation

Open akash-jain-10 opened this issue 4 years ago • 3 comments

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

akash-jain-10 avatar Mar 30 '22 13:03 akash-jain-10

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.

darth-coder00 avatar Mar 30 '22 13:03 darth-coder00

@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

mohityadav766 avatar May 08 '23 18:05 mohityadav766

Closing this issue as this is not required anymore and it can be achieved with enableEnforceDomain attribute.

akash-jain-10 avatar May 09 '23 06:05 akash-jain-10