Skip to content

Enable configuring HttpLoggingPolicy allow list at initialization #12153

Closed

Description

Key Vault has custom diagnostic headers whose values are by default redacted by HttpLoggingPolicy. Preventing that redaction requires instantiating a policy then modifying its allow list:

logging_policy = HttpLoggingPolicy(**kwargs)
logging_policy.allowed_header_names.update(
{"x-ms-keyvault-network-info", "x-ms-keyvault-region", "x-ms-keyvault-service-version"}
)

It would be nice if the policy instead accepted these as optional keyword arguments, enabling usage like

HttpLoggingPolicy(additional_allowed_headers=["x-key-vault-stuff"])

or

HttpLoggingPolicy(allowed_headers=HttpLoggingPolicy.DEFAULT_ALLOWED_HEADERS.union(["x-key-vault-stuff"]))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Labels

Azure.CoreClientThis issue points to a problem in the data-plane of the library.feature-requestThis issue requires a new behavior in the product in order be resolved.

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions