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

Provide capability to redact sensitive information #718

Open
tedyu opened this issue Apr 24, 2024 · 1 comment
Open

Provide capability to redact sensitive information #718

tedyu opened this issue Apr 24, 2024 · 1 comment

Comments

@tedyu
Copy link

tedyu commented Apr 24, 2024

This issue is for the feature of redaction.

With pino, we can do:

    redact: {
      paths: [
        'req.headers.authorization',
        '*.options.headers.authorization',
        '*.requestOptions.headers.authorization',

We can write custom serializer to recursively inspect the data to redact any sensitive attributes.

@tedyu
Copy link
Author

tedyu commented Apr 24, 2024

It seems the redaction can be done in lib/bunyan.js:

// Serialize an HTTP request.
Logger.stdSerializers.req = function (req) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant