读书人

Hive禁止用户设立特定的hiveconf值

发布时间: 2013-10-24 18:27:21 作者: rapoo

Hive禁止用户设置特定的hiveconf值

我们的Hive中开启了authentication(hive.security.authorization.enabled为true),为了防止用户在hive session中reset这个配置为false,绕过authorization策略,我们在setProcessor中会预先加载hiveConfSetBlackList,如果用户set blacklist中的hiveconf会抛异常,今天发现Hive0.11中已经增加了一个配置选项“hive.conf.restricted.list”,value用逗号分割,会起到相同的效果。

  public void verifyAndSet(String name, String value) throws IllegalArgumentException {    if (restrictList.contains(name)) {      throw new IllegalArgumentException("Cann't modify " + name + " at runtime");    }    set(name, value);  }

通过设置hive.conf.restricted.list,能防止用户reset某些禁止的hiveconf值


本文链接http://blog.csdn.net/lalaguozhe/article/details/12976511,转载请注明

读书人网 >云计算

热点推荐