flyrain commented on code in PR #808: URL: https://github.com/apache/polaris/pull/808#discussion_r1932759716
########## spec/rest-catalog-open-api.yaml: ########## @@ -3977,6 +4241,151 @@ components: items: type: integer description: "List of equality field IDs" + + Policy: + type: object + required: + - owner_id + - policy-id + - policy-type + - name + - content + - version + properties: + owner-id: + type: string + policy-id: + type: string + policy-type: + type: string + name: + type: string + description: + type: string + content: + $ref: '#/components/schemas/PolicyContent' + version: + type: integer + created-at-ms: + type: integer + format: int64 + updated-at-ms: + type: integer + format: int64 + + PolicyContent: {} + + CreatePolicyRequest: + type: object + required: + - name + - type + - content + properties: + name: + type: string + type: + type: string + description: + type: string + content: + $ref: '#/components/schemas/PolicyContent' + + LoadPolicyResult: + type: object + properties: + policy: + $ref: '#/components/schemas/Policy' + + UpdatePolicyRequest: + type: object + properties: + description: + type: string + content: + $ref: '#/components/schemas/PolicyContent' + + SetPolicyRequest: + type: object + required: + - entity + properties: + entity: + $ref: '#/components/schemas/EntityIdentifier' + parameters: + type: object + additionalProperties: + type: string + + UnsetPolicyRequest: + type: object + required: + - entity + properties: + entity: + $ref: '#/components/schemas/EntityIdentifier' + + CatalogIdentifier: + allOf: + - $ref: '#/components/schemas/EntityIdentifier' + - type: object + required: + - catalog + properties: + catalog: + type: string + + NamespaceIdentifier: + allOf: Review Comment: We will always need the full path to support cross-catalog policy attachment. For example, we will need an identifier like `c1.ns1` to make sure a policy can be attached to the namespace `ns1` under catalog `c1`. The exiting schema `namespace` doesn't contain the full path. We will need `NamespaceIdentifier`. `TableLikeIdentifier` is needed as policy could be applied to any table-like entities, like views, volumes(WIP) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@polaris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org