Github user rmetzger commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2425#discussion_r77174593
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/blob/BlobServer.java ---
    @@ -97,6 +101,16 @@ public BlobServer(Configuration config) throws 
IOException {
                this.storageDir = 
BlobUtils.initStorageDirectory(storageDirectory);
                LOG.info("Created BLOB server storage directory {}", 
storageDir);
     
    +           if(config.getBoolean(ConfigConstants.SECURITY_ENABLED, 
DEFAULT_SECURITY_ENABLED) == true) {
    +                   secureCookie = 
config.getString(ConfigConstants.SECURITY_COOKIE, null);
    +                   if(secureCookie == null) {
    +                           String errorMessage = "Missing " + 
ConfigConstants.SECURITY_COOKIE
    +                                           + " configuration in Flink 
config file";
    +                           LOG.error(errorMessage);
    +                           throw new 
IllegalConfigurationException(errorMessage);
    +                   }
    +           }
    +
    --- End diff --
    
    This looks a lot like duplicate code. Maybe it makes sense to move it to 
the `BlobUtils`, or even to the `SecurityUtils` as a static method, ensuring 
that security is enabled.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to