Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Log Redaction for Sensitive Information #44

Open
kashifkhan0771 opened this issue Nov 19, 2024 · 2 comments
Open

[FEATURE] Log Redaction for Sensitive Information #44

kashifkhan0771 opened this issue Nov 19, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@kashifkhan0771
Copy link
Owner

Feature Description

In certain applications, logs may contain sensitive or personally identifiable information (PII), such as passwords, credit card numbers, or email addresses, which should not be exposed in log files. This feature will enable automatic redaction of sensitive information from logs. It will allow the user to define patterns or keywords that, when detected in a log message, will be replaced with redacted placeholders (e.g., REDACTED).


Use Case

  • Security
  • Internal Development
  • Support

Proposed Solution

Users can define patterns (e.g., regex) or specify sensitive fields such as password, email, credit_card_number to be automatically redacted. Users can also define custom redaction rules based on specific requirements. For instance, some users may want to redact full fields while others might only redact part of the value (e.g., showing only the last four digits of a credit card).


Additional Context

N/A


Pseudo Code

logger := NewLogger()
logger.SetRedactionRules(map[string]string{
    "password": "***REDACTED***",
    "credit_card": "***REDACTED***",
})

logger.Info("User logged in with password: userpassword")
logger.Error("Sensitive data: credit_card=1234-5678-9876-5432")

// output:
[INFO] User logged in with password: ***REDACTED***
[ERROR] Sensitive data: credit_card=***REDACTED***
@kashifkhan0771 kashifkhan0771 added enhancement New feature or request help wanted Extra attention is needed labels Nov 19, 2024
@kashifkhan0771
Copy link
Owner Author

This is dependent on issue: #43

@kashifkhan0771 kashifkhan0771 added the waiting-on The issue is waiting for another issue to be fixed first label Nov 19, 2024
@Turtel216
Copy link
Contributor

Could you assign this to me ? Since I implemented the logger, it would be easy for me to extend it

@kashifkhan0771 kashifkhan0771 removed the waiting-on The issue is waiting for another issue to be fixed first label Jan 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants