Redact Secrets

Redact portions of a string, to prevent secrets from being exposed (in logs, etc.) while maintaining the ability to debug.

This block converts a secret, like ‘password’, into a redacted version, like ‘pa****rd’. The first and last few characters and the number of characters can be seen, but the exact content is concealed. You can redact up to 4 secrets at a time for convince when generating logs.

Inputs

Secret 1

The first secret you want to redact.

Example: secret_one

Secret 2

The second secret you want to redact.

Example: secret_two

Secret 3

The third secret you want to redact.

Example: secret_three

Secret 4

The fourth secret you want to redact.

Example: secret_four

Outputs

Redacted Secret 1

The redacted version of the first secret.

Example: sec****one

Redacted Secret 2

The redacted version of the second secret.

Example: sec****two

Redacted Secret 3

The redacted version of the third secret.

Example: sec******ree

Redacted Secret 4

The redacted version of the fourth secret.

Example: sec*****our