anchor.diff:          ln -s "$cassandraLogbackConfig" "$out/logback.xml"
   
           cp "$cassandraEnvPkg" "$out/cassandra-env.sh"
  +
           # Delete default JMX Port, otherwise we can't set it using env variable
           sed -i '/JMX_PORT="7199"/d' "$out/cassandra-env.sh"
  -      '';
  -    };
  +
  +        # Delete default password file
  +        sed -i '/-Dcom.sun.management.jmxremote.password.file=\/etc\/cassandra\/jmxremote.password/d' "$out/cassandra-env.sh"
  +      '';
  +    };
  +  jmxPasswordFile = builtins.foldl'
  +     (left: right: left + right) ""
  +     (map (role: "${role.username} ${role.password}") cfg.jmxRoles);
  +  fullJvmOptions = cfg.jvmOpts
  +    ++ lib.optionals (cfg.jmxRoles != []) [
  +      "-Dcom.sun.management.jmxremote.authenticate=true"
  +      "-Dcom.sun.management.jmxremote.password.file=${pkgs.writeText "jmxremote.password" jmxPasswordFile}"
  +    ]
  +    ++ lib.optionals cfg.remoteJmx [
  +      "-Djava.rmi.server.hostname=${cfg.rpcAddress}"
  +    ];
   in {
     options.services.cassandra = {
       enable = mkEnableOption ''
  
positive.code:         For security reasons, you should not expose this port to the internet.
          Firewall it if needed.
        '';
      };
    };
  
  
negative.code:         after = [ "network.target" ];
          environment =
            { CASSANDRA_CONF = "${cassandraEtc}";
              JVM_OPTS = builtins.concatStringsSep " " fullJvmOptions;
              MAX_HEAP_SIZE = toString cfg.maxHeapSize;
              HEAP_NEWSIZE = toString cfg.heapNewSize;
              MALLOC_ARENA_MAX = toString cfg.mallocArenaMax;
  