gyfora commented on code in PR #1104:
URL: 
https://github.com/apache/flink-kubernetes-operator/pull/1104#discussion_r3152327691


##########
flink-kubernetes-operator/src/main/java/org/apache/flink/kubernetes/operator/config/KubernetesOperatorConfigOptions.java:
##########
@@ -332,6 +333,34 @@ public static String operatorConfigKey(String key) {
                             "Custom HTTP header for HttpArtifactFetcher. The 
header will be applied when getting the session job artifacts. "
                                     + "Expected format: 
headerKey1:headerValue1,headerKey2:headerValue2.");
 
+    @Documentation.Section(SECTION_DYNAMIC)
+    public static final ConfigOption<List<String>> JAR_URI_ALLOWED_SCHEMES =
+            operatorConfig("user.artifacts.allowed-schemes")
+                    .stringType()
+                    .asList()
+                    .defaultValues("https", "local")
+                    .withDescription(
+                            "Comma separated list of URI schemes that are 
allowed for the job's jarURI. "
+                                    + "By default only 'https' and 'local' are 
allowed to prevent SSRF and "
+                                    + "local file disclosure via user-supplied 
URIs (e.g. 'http', 'file', "
+                                    + "'s3', 'hdfs', 'gs'). The 'local' scheme 
is preserved for application "
+                                    + "clusters that ship the JAR inside the 
image and is never fetched by "
+                                    + "the operator. Operators that need to 
fetch artifacts via other "
+                                    + "schemes (such as 's3' or 'hdfs') can 
extend this list. "
+                                    + "Scheme matching is case-insensitive.");
+
+    @Documentation.Section(SECTION_DYNAMIC)

Review Comment:
   These configs should go into SECTION_SYSTEM and be resolved in 
FlinkOperatorConfiguration otherwise the user would be able to override them 
from their CR's config



-- 
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