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

Allow certain response headers coming from AzurePipelinesCredential to be logged #23444

Closed
ahsonkhan opened this issue Sep 16, 2024 · 1 comment · Fixed by #23485
Closed

Allow certain response headers coming from AzurePipelinesCredential to be logged #23444

ahsonkhan opened this issue Sep 16, 2024 · 1 comment · Fixed by #23485
Assignees
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library.
Milestone

Comments

@ahsonkhan
Copy link
Member

ahsonkhan commented Sep 16, 2024

These two response headers are useful for the service team to debug and diagnose issues, and hence it is requested that we do log them.

  • x-vss-e2eid
  • x-msedge-ref

We decided, other than logging them, to also add these header values to the exception message that is thrown, so they are always visible, even with logging disabled.

Given our logged headers are based on an allow list, currently these two headers are REDACTED.

// construct default hash set of allowed headers
allowedHeaders := map[string]struct{}{
"accept": {},
"cache-control": {},
"connection": {},
"content-length": {},
"content-type": {},
"date": {},
"etag": {},
"expires": {},
"if-match": {},
"if-modified-since": {},
"if-none-match": {},
"if-unmodified-since": {},
"last-modified": {},
"ms-cv": {},
"pragma": {},
"request-id": {},
"retry-after": {},
"server": {},
"traceparent": {},
"transfer-encoding": {},
"user-agent": {},
"www-authenticate": {},
"x-ms-request-id": {},
"x-ms-client-request-id": {},
"x-ms-return-client-request-id": {},

@ahsonkhan
Copy link
Member Author

See Azure/azure-sdk-for-cpp#6001 for an example change from C++.

@scottaddie scottaddie added the Client This issue points to a problem in the data-plane of the library. label Sep 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Azure.Identity Client This issue points to a problem in the data-plane of the library.
Projects
Development

Successfully merging a pull request may close this issue.

3 participants