Repository navigation
Fix | Fixes concurrent connection speed issues due to 'Authentication Context' cache not maintained in NetCore - #466
Conversation
- Added support for enclave simulator bypassing the actual attestation. - Added BuildSimulator property to enable the simulator support. How to use the enclave simulator: Given Attestation Protocol = SIM and Enclave Attestation Url= SomeDummyURL in the connection string and run the AE enclave-enabled tests. NOTE: This change is for internal testing only. The simulator support should be disabled in the official nuget package releases.
The authentication context cache of the connection pool was not being updated in the netcore code. This was resulting in poor connection speed for subsequent connections which used AAD auth since they could not take advantage of the cached token. This code looks to have been missed when AAD authentication was ported from netfx to netcore.
|
It might be worth using private reflection to reach into the internals and find the cache to verify that it has been populated rather than relying on a timing artefact that could be flaky. I know private reflection is generally bad but as the owners you're allowed to assume your own internal details in this case I'd say. |
@Wraith2 |
The authentication context cache of the connection pool was not being updated upon successful fedauth authentication in the netcore code. This was resulting in poor connection speed for subsequent connections which used AAD auth since they could not take advantage of the cached token. This code looks to have been missed when AAD authentication was ported from netfx to netcore.
This was found during investigation of #408
The new test should detect if subsequent connections are not using the cache. Hopefully connection times are consistent enough that this does not produce intermittent failures.