Skip to content

Commit

Permalink
[ZEPPELIN-4341] update SecurityUtils#getRoles to catch errors so if m…
Browse files Browse the repository at this point in the history
…ultiple realms they will all be attempted
  • Loading branch information
primerano committed Sep 27, 2019
1 parent e2e1d19 commit ad26443
Showing 1 changed file with 6 additions and 2 deletions.
Expand Up @@ -158,8 +158,12 @@ public static HashSet<String> getRoles() {
if (auth != null) {
roles = new HashSet<>(auth.getRoles());
}
} catch (NamingException e) {
log.error("Can't fetch roles", e);
} catch (Throwable t) {
if (log.isDebugEnabled()) {
String msg = "Realm [" + realm +
"] threw an exception during a multi-realm authorization attempt:";
log.debug(msg, t);
}
}
break;
} else if (name.equals("org.apache.zeppelin.realm.ActiveDirectoryGroupRealm")) {
Expand Down

0 comments on commit ad26443

Please sign in to comment.