public static boolean checkUserHasHostProxyPrivileges(String user, Configuration conf, String ipAddress) {
    DefaultImpersonationProvider sip = ProxyUsers.getDefaultImpersonationProvider();
    // Just need to initialize the ProxyUsers for the first time, given that the conf will not change on the fly
    if (sip == null) {
      ProxyUsers.refreshSuperUserGroupsConfiguration(conf);
      sip = ProxyUsers.getDefaultImpersonationProvider();
    }
    Map<String, Collection<String>> proxyHosts = sip.getProxyHosts();
    Collection<String> hostEntries = proxyHosts.get(sip.getProxySuperuserIpConfKey(user));
    MachineList machineList = new MachineList(hostEntries);
    // when schematool or metatool use this, its possible that the saslServer.getRemoteAddress() returns null
    // use localhost address first to see if it part of hadoop.proxyuser hosts.
    if (ipAddress == null) {
      try {
        ipAddress = InetAddress.getLocalHost().getHostAddress();
      } catch (UnknownHostException e) {
        ipAddress = StringUtils.EMPTY;
      }
    }
    return machineList.includes(ipAddress);
  }
Verify if the user is allowed to make DB notification related calls.
Only the superusers defined in the Hadoop proxy user settings have the permission.

@param user the short user name
@param conf that contains the proxy user settings
@return if the user has the permission
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/utils/MetaStoreServerUtils.java