mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-09-03 14:13:06 +00:00
- Do not validate bot domain (#15796)
This commit is contained in:
parent
b79e5c064b
commit
daae3c48e3
@ -218,8 +218,10 @@ public class JwtFilter implements ContainerRequestFilter {
|
||||
domain = StringUtils.EMPTY;
|
||||
}
|
||||
|
||||
// validate principal domain
|
||||
if (enforcePrincipalDomain && !domain.equals(principalDomain)) {
|
||||
// validate principal domain, for users
|
||||
boolean isBot =
|
||||
claims.containsKey(BOT_CLAIM) && Boolean.TRUE.equals(claims.get(BOT_CLAIM).asBoolean());
|
||||
if (!isBot && (enforcePrincipalDomain && !domain.equals(principalDomain))) {
|
||||
throw new AuthenticationException(
|
||||
String.format(
|
||||
"Not Authorized! Email does not match the principal domain %s", principalDomain));
|
||||
|
Loading…
x
Reference in New Issue
Block a user