SVV_ATTACHED_MASKING_POLICY
使用 SVV_ATTACHED_MASKING_POLICY 查看所有关系和已在当前连接的数据库上附加了策略的角色/用户。
只有拥有 sys:secadmin 角色的用户才可以查看 SVV_ATTACHED_MASKING_POLICY。常规用户将看到 0 行。
SVV_MASKING_POLICY 中仅显示在预置集群上创建的策略。
表列
| 列名称 | 数据类型 | 描述 |
|---|---|---|
| policy_name | text | 已附加到表的屏蔽策略的名称。 |
| schema_name | text | 已附加策略的表的 Schema。 |
| table_name | text | 已附加策略的表的名称。 |
| table_type | text | 已附加策略的表的类型。 |
| grantor | text | 已附加策略的用户的名称。 |
| grantee | text | 已为其附加策略的用户/角色的名称。 |
| grantee_type | text | 被授权者的类型。这可以是角色、用户或公有。 |
| priority | int | 附加策略的优先级。 |
| input_columns | text | 附加策略的输入列属性。 |
| output_columns | text | 附加策略的输出列属性。 |
内部函数
SVV_ATTACHED_MASKING_POLICY 支持以下内部函数:
mask_get_policy_for_role_on_column
获取适用于给定列/角色对的最高优先级策略。
语法
mask_get_policy_for_role_on_column (relschema, relname, colname, rolename);
参数
- relschema
-
策略所在 Schema 的名称。
- relname
-
策略所在表的名称。
- colname
-
策略所附加到的列的名称。
- rolename
-
策略所附加到的角色的名称。
mask_get_policy_for_user_on_column
获取适用于给定列/用户对的最高优先级策略。
语法
mask_get_policy_for_user_on_column (relschema, relname, colname, username);
参数
- relschema
-
策略所在 Schema 的名称。
- relname
-
策略所在表的名称。
- colname
-
策略所附加到的列的名称。
- rolename
-
策略所附加到的用户的名称。