Shekharrajak commented on code in PR #28158:
URL: https://github.com/apache/flink/pull/28158#discussion_r3382778866
##########
flink-table/flink-table-api-java/src/main/java/org/apache/flink/table/catalog/CatalogManager.java:
##########
@@ -1644,6 +1647,68 @@ public void createTemporaryModel(
});
}
+ /**
+ * Creates a connection in a given fully qualified path.
+ *
+ * <p>Permanent connections require secret-store integration before
writing to the catalog, so
+ * this method rejects them instead of persisting raw sensitive values.
+ *
+ * @param connection The resolved connection to put in the given path.
+ * @param objectIdentifier The fully qualified path where to put the
connection.
+ * @param ignoreIfExists If false exception will be thrown if a connection
exists in the given
+ * path.
+ */
+ public void createConnection(
+ SensitiveConnection connection,
+ ObjectIdentifier objectIdentifier,
+ boolean ignoreIfExists) {
+ checkNotNull(connection, "Connection must not be null.");
+ checkNotNull(objectIdentifier, "Object identifier must not be null.");
+ throw new ValidationException(
+ "Permanent CREATE CONNECTION is not supported until secret
store integration is "
+ + "available for catalog connections.");
+ }
+
+ /**
+ * Creates a temporary connection in a given fully qualified path.
+ *
+ * @param connection The resolved connection to put in the given path.
+ * @param objectIdentifier The fully qualified path where to put the
connection.
+ * @param ignoreIfExists If false exception will be thrown if a connection
exists in the given
+ * path.
+ */
+ public void createTemporaryConnection(
+ SensitiveConnection connection,
+ ObjectIdentifier objectIdentifier,
+ boolean ignoreIfExists) {
+ checkNotNull(connection, "Connection must not be null.");
+ checkNotNull(objectIdentifier, "Object identifier must not be null.");
+ temporaryConnections.compute(
Review Comment:
Add an in-memory temporaryConnections map in CatalogManager, similar to
temporaryModels.
this Store SensitiveConnection only for temporary objects, since it contains
raw secrets and is explicitly runtime-
--
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]