[security] Adding HDFS diff mode logic