Snowflake 管道 - 不同的用户需要什么权限才能使用其余的 API /insertReport

Snowflake pipe - what permissions are needed for a different user to use the rest API /insertReport

我有一个由用户 A 创建的 Snowpipe。然后我想要一个单独的用户 B 使用 Snowflake rest API 端点 /insertReport.

检查其状态
GRANT ALL ON PIPE <my pipe> TO ROLE USER_B_ROLE;
GRANT ALL ON FUTURE PIPES IN DATABASE <my db> TO ROLE USER_B_ROLE;
GRANT MONITOR ON DATABASE <my db> TO ROLE USER_B_ROLE;
GRANT USAGE ON DATABASE <my db> TO ROLE USER_B_ROLE;
GRANT MONITOR ON SCHEMA <my schema> TO ROLE USER_B_ROLE;
GRANT USAGE ON SCHEMA <my schema> TO ROLE USER_B_ROLE;
USE ROLE USER_B_ROLE;
SELECT CURRENT_ROLE();
-- USER_B_ROLE

DESCRIBE PIPE <my pipe>;
-- created_on,name,database_name,schema_name,definition,owner,notification_channel,comment,integration,pattern,error_integration
-- 2022-01-..., ..., ...

SELECT SYSTEM$PIPE_STATUS('<my db>.<my schema>.<my pipe>');
-- {"executionState":"RUNNING","pendingFileCount":0,"notificationChannelName":"arn:aws:sqs:...","numOutstandingMessagesOnChannel":0,"lastReceivedMessageTimestamp":"..."}

当我尝试使用用户 B 时,使用 GET https://{account}.snowflakecomputing.com/v1/data/pipes/{snowpipe}/insertReport 我收到:{'data': None, 'code': '390403', 'message': 'Not authorized to manage the specified object. Pipe access permission denied', 'success': False, 'headers': None}

我已经检查了 public 密钥 fp 和私钥是否有效,因为我可以获得正确的 JWT 令牌。

我不认为我可以运行将管道和所有未来此类管道的所有权作为对用户 B 的一揽子声明,因为 Terraform 部署,即使没有更改,也会重新创建 PIPE并删除用户 B 的所有权限 - 这就是我要使用 FUTURE.

的原因

我也试过GRANT MONITOR EXECUTION,但也没用。

我缺少什么权限?


相关文档:

我已与 Snowflake 代表核实 - 无论 MONITOROPERATE 权限如何,如果您想使用 /insertReport,您 必须 OWNERSHIP的管道。


这里 https://docs.snowflake.com/en/release-notes/2021-03.html#snowpipe-support-for-non-pipe-owners-to-manage-pipes-preview 的权限和功能完全没有提到 /insertReport。您可以让子角色 start/pause/load/read/check(通过 SQL)成为管道,但没有让非所有者使用 /insertReport.

的权限