以其他用户身份运行DB功能

时间:2018-01-30 12:59:06

标签: security roles greenplum

我觉得这个问题相当愚蠢,因为我觉得它面对所有的安全原则都是正确的。唉,这是我的问题。我很好奇是否有可能基本上代表' Greenplum数据库中的各种用户帐户,但未提供其凭据。我问的原因是我有一个功能帐户,并希望代表请求者用户名执行数据库程序,函数等。这是为了确保我们不会运行他们自己无法运行的程序,或者访问他们自己无法访问的数据集的程序。

再次,对这个感到愚蠢,但如果这是可能的话,它将解决我遇到的一个非常大的问题:D

提前致谢, 亚历

1 个答案:

答案 0 :(得分:1)

确实存在这种行为的规定:

SECURITY INVOKER indicates that the function is to be executed with the privileges of the user that calls it. That is the default. SECURITY DEFINER specifies that the function is to be executed with the privileges of the user that created it.

见这里:https://www.postgresql.org/docs/9.3/static/sql-createfunction.html