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

fix(azidentity): do not strip away request headers in doForClient #22098

Merged
merged 3 commits into from
Jan 2, 2024

Commits on Dec 8, 2023

  1. Configuration menu
    Copy the full SHA
    93ef8e8 View commit details
    Browse the repository at this point in the history

Commits on Dec 14, 2023

  1. test(azidentity): add unit test for doForClient function

    The focus is on methods/behavior implemented by azidentity
    package. I didn't aim to hit 100% coverage, mainly because
    there are error paths determined by e.g. std http package etc.
    
    Signed-off-by: HandsomeJack <dusek.honza@gmail.com>
    handsomejack-42 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    dd65c25 View commit details
    Browse the repository at this point in the history
  2. fix(azidentity): do not strip away request headers in doForClient

    Some authorities might require certain headers to be passed.
    
    For example, in our dSTS auth flow, the request form contains
    client_info, which needs to be accompanied by X-Client-SKU=MSAL.Go
    header, else the API call produces
    
    AADSTS501791: Client_info is only supported for MSAL/ADAL,
    please ensure that MSAL/ADAL custom headers are being sent.
    
    The `doForClient` function creates new `runtime.Request` from the incoming
    request, but it fails to propagate the respective headers.
    
    This commits is addressing that.
    
    Signed-off-by: HandsomeJack <dusek.honza@gmail.com>
    handsomejack-42 committed Dec 14, 2023
    Configuration menu
    Copy the full SHA
    4962931 View commit details
    Browse the repository at this point in the history