There is no configuration option available to log the value of the Authorization headers. It is possible to use the custom_fields_by_lua feature to log the values to a different custom field. For example, you could set a log field called x-original-authorization and set this to the value for the Authorization using the Kong PDK.
As an example, the udp-log plugin could be configured like this;
curl -s -X POST 'https://api.kong.lan:8444/default/routes/{{routeName}}/plugins/' \
-H 'Content-Type: application/json' \
--data-raw '{
"tags": [
"plugin-example"
],
"name": "udp-log",
"config": {
"custom_fields_by_lua": {
"x-original-authorization": "return kong.request.get_header(\"authorization\")"
},
"timeout": 10000,
"port": 5555,
"host": "udp-log-hostname"
}
}'
Calling the Route with an Authorization header;
curl -H "Authorization: fred123" http://proxy.kong.lan/echo
will still log the REDACTED value for the Authorization header, but there will also be an extra entry in the log showing the complete value sent for the Authorization header;
"x-original-authorization": "fred123"
Note, there is a potential security implication of saving the Authentication headers, please ensure that you are comfortable with logging these values and disable/delete the plugin once you have completed the debugging.