bilfeldt / laravel-http-client-logger

A logger for the Laravel HTTP Client
MIT License
144 stars 19 forks source link

Mask sensitive data in logs with the MessageAccessor #35

Open flexponsive opened 3 weeks ago

flexponsive commented 3 weeks ago

Description

This PR improves the handling of sensitive data, like passwords and auth tokens, by making it possible to easily configure the replacing of sensitive values, headers etc. in the package configuration. It does this by integrating the existing MessageAccessor (#13) with the `PsrMessageToStringConverter``

The configuration file template now includes detailed documentation on replacement options available for sensitive data, including:

Backward Compatibility: By default, this update does not alter the package’s behavior, ensuring compatibility for existing users. However, since logging sensitive data is such a widespread problem, it may be worthwhile to consider in a future release to mask the Authentication and Authorization headers by default.

Type of change

Please delete options that are not relevant.

Checklist