Skip to content

feat: loki-logger should not log authorization headers #13452

@marek-obuchowicz

Description

@marek-obuchowicz

Description

As a apisix user, I have enabled loki-logger (without overriding log_format) and I have quickly noticed, that all headers are being logged - including request_headers_authorization, request_headers_x_userinfo,request_headers_x_access_token.

According to very common security practices, such data should not be logged. While we have possibility to override what's being logged via log_format - I would expect defaults to follow security practices.

In ideal scenario, we should introduce a parameter to the plugin configuration, which contains list of HTTP headers to be dropped, and it should by default include Authorization, X-Userinfo, X-Access-Token fields.

This could possibly apply to other logger plugins, too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions