intentionet / netconan

netconan - a Network Configuration Anonymizer
Apache License 2.0
145 stars 12 forks source link

#107 Support quoted sensitive phrases with spaces in them #138

Closed Elviraant closed 3 years ago

Elviraant commented 4 years ago

This pull request is about issue #107 . Implementing this change by modifying some regexes in default_pwd_regexes in order to allow passwords that are enclosed in quotes to be anonymized as a single word. This regexes match config lines that are used in juniper devices where quoted phrases are allowed.

Here is an example of the implemenation:

Running the following command

netconan -i juniper.cfg -o anonymized.cfg -p

with the following content in juniper.cfg

juniper

the anonymized.cfg will contain the following

anonymized2


This change is Reviewable

sfraint commented 4 years ago

Hi @Elviraant thanks for contributing! This has been a busy week, but I will try to make some time to review this next week.

Elviraant commented 4 years ago

Hey @sfraint ! I also had the following question about the issue.

Currently, the anonymization of passwords is implemented by preserving the anonymization of spaces that surround the phrase.

More specifically, the following happens: Input:

set system license keys key " something something "

Output:

set system license keys key " netconanRemoved0 "

I was thinking whether it should be anonymized like this:

set system license keys key "netconanRemoved0"

, considering that the values are quoted when they include spaces or/and other special characters and, thus, they are part of the value.

Do you think that this is a case that should be considered in this solution or it would be better to create another issue about it?

dhalperi commented 4 years ago

Please reopen if you wish to continue this PR.

Elviraant commented 3 years ago

Hello @dhalperi, I'm really sorry for the delay. I would like to reopen the pull request but the reopen option is not available. Could you please reopen the PR?

ratulm commented 3 years ago

reopened

dhalperi commented 3 years ago

Hey folks! Looks like this has gone idle again.

If you would like to resume, please push a commit responding to the review, and then comment here. Thanks!