- 
                Notifications
    
You must be signed in to change notification settings  - Fork 378
 
For Mtls, throw exception when service config region is set to null. #5182
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
Conversation
| 
           not sure if this is the correct fix. The issue is not in MTLS code path but in the the Azure Region API code path. After your fix trying running the test   | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
may not fix all region cases
          
 @gladjohn - I ran the tests as original and with your suggestion under debugger putting a breakpoint on the line I fixed. It didn't even hit the breakpoint. Do you have a different test in mind? Can you run tests against this PR branch and check? Thanks.  | 
    
          
 I am not sure if we I am following you. The fix is simple and adds test cases for string.empty scenario as well as for the new whitespace. And the test passes in all three cases. What am I missing here? Also, do you have a change in mind as you requested a change here?  | 
    
          
 And what is the outcome of the test?  | 
    
          
 The correct fix should happen here  | 
    
        
          
                tests/Microsoft.Identity.Test.Unit/PublicApiTests/MtlsPopTests.cs
              
                Outdated
          
            Show resolved
            Hide resolved
        
      There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe the test MtlsPopWithoutRegionAsync is misleading. It should not set an env variable. Regional opt-in is done via API.
          
 It passed.  | 
    
          
 Correct, see my response here as well.  | 
    
          
 @ksaaf the actual issue is not in the AcquireTokenForClient API or flows, The issue you are describing stems from WithAzureRegion API. I am happy to discuss this with you and go over the actual problem. As @bgavrilMS, mentioned there could be other bugs that are present in the Region flow that has been exposed by this test. So this needs a little more investigation.  | 
    
          
 Yes, let's discuss; happy to learn the context as I am new to the codebase.  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good.
This PR fixes throwing exception when service config region is set to null for Mtls.
Fixes #5181
Changes proposed in this request
string.IsNullOrEmptywithnullinAcquireTokenForClientParameterBuilder.csfor Azure region check when the authority is AAD.Testing
Performance impact
N/A
Documentation