Jason Fehr created IMPALA-15574:
-----------------------------------

             Summary: Startup Flags Incorrectly Logged when Redaction Rules 
Active
                 Key: IMPALA-15574
                 URL: https://issues.apache.org/jira/browse/IMPALA-15574
             Project: IMPALA
          Issue Type: Bug
    Affects Versions: Impala 5.0.0
            Reporter: Jason Fehr


When using a specific redaction rule on Impala versions that have the 
'--ai_api_key_jceks_secret' startup flag and another flag with the string 
"password" in its name has a value containing a space, then startup flags are 
not correctly logged.

To replicate this issue, follow these steps:

1. Create a redaction-rules.json file with the following contents:
{noformat}
{
  "version": 1,
  "rules": [
    {
      "description": "Redact secret= and secret:",
      "trigger": "secret",
      "search": "secret[:=][^ \"\\\\]+",
      "caseSensitive": false,
      "replace": "secret=LOG-REDACTED"
    }
  ]
}
{noformat}
2. Start the minicluster using the command:
{noformat}
start-impala-cluster.py --catalogd_args='-webserver_password_file="/dev/null 
foo" -redaction_rules_file=redaction-rules.json'
{noformat}
3. Look in 'logs/cluster/catalogd.INFO', the '--ai_api_key_jceks_secret' flag 
will have a value of "LOG-REDACTED foo" and will appear in the wrong place in 
the list of startup flags.
4. Start the minicluster again using the command:
{noformat}
start-impala-cluster.py 
--catalogd_args='-redaction_rules_file=/home/impdev/impala/redaction-rules.json'
{noformat}
5. Look again in 'logs/cluster/catalogd.INFO', the '--ai_api_key_jceks_secret' 
flag will have the correct value "LOG-REDACTED" and will also appear last in 
the list of startup flags in the log file.

 



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to