dimas-b commented on code in PR #1026:
URL: https://github.com/apache/polaris/pull/1026#discussion_r2006822292


##########
spec/polaris-management-service.yml:
##########
@@ -850,9 +850,92 @@ components:
         - $ref: "#/components/schemas/Catalog"
         - type: object
           properties:
-            remoteUrl:
-              type: string
-              description: URL to the remote catalog API
+            connectionConfigInfo:
+              $ref: "#/components/schemas/ConnectionConfigInfo"
+
+    ConnectionConfigInfo:
+      type: object
+      description: A connection configuration representing a remote catalog 
service
+      properties:
+        connectionType:
+          type: string
+          enum:
+            - ICEBERG_REST
+          description: The type of remote catalog service represented by this 
connection
+        uri:
+          type: string
+          description: URI to the remote catalog service
+      required:
+        - connectionType
+      discriminator:
+        propertyName: connectionType
+        mapping:
+          ICEBERG_REST: "#/components/schemas/IcebergRestConnectionConfigInfo"
+
+    IcebergRestConnectionConfigInfo:
+      type: object
+      description: Configuration necessary for connecting to an Iceberg REST 
Catalog
+      allOf:
+        - $ref: '#/components/schemas/ConnectionConfigInfo'
+      properties:
+        remoteCatalogName:
+          type: string
+          description: The name of a remote catalog instance within the remote 
catalog service; in some older systems
+            this is specified as the 'warehouse' when multiple logical 
catalogs are served under the same base
+            uri, and often translates into a 'prefix' added to all REST 
resource paths
+        restAuthentication:
+          $ref: "#/components/schemas/AuthenticationParameters"
+
+    AuthenticationParameters:
+      type: object
+      description: Authentication-specific information for a REST connection
+      properties:
+        restAuthenticationType:
+          type: string
+          enum:
+            - OAUTH
+            - BEARER
+          description: The type of authentication to use when connecting to 
the remote rest service
+      required:
+        - restAuthenticationType
+      discriminator:
+        propertyName: restAuthenticationType
+        mapping:
+          OAUTH: "#/components/schemas/OAuthClientCredentialsParameters"
+          BEARER: "#/components/schemas/BearerAuthenticationParameters"
+
+    OAuthClientCredentialsParameters:
+      type: object
+      description: OAuth authentication based on client_id/client_secret
+      allOf:
+        - $ref: '#/components/schemas/AuthenticationParameters'
+      properties:
+        tokenUri:
+          type: string
+          description: Token server URI
+        clientId:
+          type: string
+          description: oauth client id
+        clientSecret:
+          type: string
+          format: password
+          description: oauth client secret (input-only)
+        scopes:
+          type: array
+          items:
+            type: string
+          description: oauth scopes to specify when exchanging for a 
short-lived access token
+
+    BearerAuthenticationParameters:
+      type: object
+      description: Bearer authentication directly embedded in request auth 
headers
+      allOf:
+        - $ref: '#/components/schemas/AuthenticationParameters'
+      properties:
+        bearerToken:

Review Comment:
   I believe even passing secrets through the Management API is a security risk.
   
   Ideally, the act of configuring an external catalog would reference secrets 
(e.g. by URN) as opposed to submitting them directly. It might be best to start 
another dev ML thread and doc for this, tough. I'm there are alots of details 
to iron out.
   
   Iterative approach LGTM.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to