B22DCCN393 Nguyễn Việt Huy
11/26/2025, 9:14 AMresult: false. Could you please help me identify the root cause of this issue?B22DCCN393 Nguyễn Việt Huy
11/26/2025, 9:15 AMrowFilters:
trino_table_mariadb_demo_petition:
- action: view_all
expression: "1=1"
- action: view_own_data
expression: "prosecution_unit_id = (SELECT department_id FROM user_position_department JOIN users ON users.id = user_position_department.user_id WHERE users.username = current_user)"
- action: view_part_data
expression: "prosecution_unit_id IN (SELECT id FROM prosecution_unit WHERE parent_id = (SELECT department_id FROM user_position_department JOIN users ON users.id = user_position_department.user_id WHERE users.username = current_user) UNION SELECT department_id FROM user_position_department JOIN users ON users.id = user_position_department.user_id WHERE users.username = current_user)"
# Note:
# - The resource name follows the format: trino_table_{catalog}_{schema}_{table}
# - The 'action' corresponds to the action in your Permit policy
# - The 'expression' is the SQL WHERE clause that will be applied to queries
# - Multiple filters can be defined per table
# - If a user has permission for multiple actions, all corresponding expressions will be returned
# Column Masking Configuration
columnMasking:
trino_table_mariadb_demo_petition:
action: view_sensitive_data
columns:
# 1. Che hoàn toàn nội dung chi tiết
- column_name: content
view_expression: "'*** NỘI DUNG ĐÃ BỊ ẨN ***'"
# 2. Che một phần trích yếu (chỉ hiện 10 ký tự đầu)
- column_name: subject
view_expression: "CONCAT(SUBSTRING(subject, 1, 10), '...')"
# 3. Làm giả ID người tạo (để bảo vệ người tố giác)
- column_name: create_by_user_id
view_expression: "-1"
# Note for Column Masking:
# - The resource name follows the same format as row filters: trino_table_{catalog}_{schema}_{table}
# - The 'action' at the table level is the default action for all columns
# - Each column can optionally override the action
# - The 'view_expression' is the SQL expression that will be used to mask the column
# - Optional 'identity' field allows evaluating the expression as a different user
# - Column masks are applied based on permissions:
# * Table-level permission: user has 'action' permission on the table resource
# * Column-level permission: user has 'action' permission on the specific column resource
# * A mask is applied if EITHER table-level OR column-level permission is grantedAlon Boshi
11/26/2025, 9:43 AMB22DCCN393 Nguyễn Việt Huy
11/26/2025, 10:13 AMtrino-authz-example. The Permit CLI command automatically generates a lot of system-level permissions there, but I had only defined specific resources and actions in my trino-authz.yaml. That explains the mismatch.B22DCCN393 Nguyễn Việt Huy
11/26/2025, 10:15 AMFilterCatalogs) are checked by default so I can configure them correctlyDan
11/26/2025, 2:59 PM