Skip to content

Commit 23bada3

Browse files
committed
Change default behavior to false
1 parent 491c722 commit 23bada3

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

IdentityCore/src/MSIDConstants.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,6 @@ extern NSString * _Nonnull const MSID_FLIGHT_IGNORE_COOKIES_IN_DUNA_RESUME;
230230
*/
231231
extern NSString * _Nonnull const MSID_FLIGHT_DISABLE_REMOVE_ACCOUNT_ARTIFACTS;
232232

233-
extern NSString * _Nonnull const MSID_FLIGHT_DISABLE_QUERYING_STK;
233+
extern NSString * _Nonnull const MSID_FLIGHT_ENABLE_QUERYING_STK;
234234

235235
#define METHODANDLINE [NSString stringWithFormat:@"%s [Line %d]", __PRETTY_FUNCTION__, __LINE__]

IdentityCore/src/MSIDConstants.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
// Making the flight string short to avoid legacy broker url size limit
9595
NSString *const MSID_FLIGHT_DISABLE_REMOVE_ACCOUNT_ARTIFACTS = @"disable_rm_metadata";
9696

97-
NSString *const MSID_FLIGHT_DISABLE_QUERYING_STK = @"disable_querying_stk";
97+
NSString *const MSID_FLIGHT_ENABLE_QUERYING_STK = @"enable_querying_stk";
9898

9999

100100
#define METHODANDLINE [NSString stringWithFormat:@"%s [Line %d]", __PRETTY_FUNCTION__, __LINE__]

IdentityCore/src/workplacejoin/MSIDWorkPlaceJoinUtilBase.m

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,13 +383,16 @@ + (MSIDWPJKeyPairWithCert *)getWPJKeysWithTenantId:(__unused NSString *)tenantId
383383
defaultKeys.keyChainVersion = MSIDWPJKeychainAccessGroupV2;
384384
MSID_LOG_WITH_CTX(MSIDLogLevelInfo, context, @"Returning EC private device key from default registration.");
385385
#if TARGET_OS_IPHONE
386-
bool isQueryingDisabledViaFlight = [MSIDFlightManager.sharedInstance boolForKey:MSID_FLIGHT_DISABLE_QUERYING_STK];
387-
// Query the session transport key only for iOS.
388-
// 1P apps use transport key to decrypt ECDH JWE responses when redeeming bound regular refresh tokens
389-
id keyType = privateKeyAttributes[(__bridge id)kSecAttrKeyType];
390-
if (!isQueryingDisabledViaFlight && keyType && [keyType isEqual: (__bridge id)kSecAttrKeyTypeECSECPrimeRandom])
386+
bool isQueryingEnabledViaFlight = [MSIDFlightManager.sharedInstance boolForKey:MSID_FLIGHT_ENABLE_QUERYING_STK];
387+
if (isQueryingEnabledViaFlight)
391388
{
392-
[defaultKeys initializePrivateTransportKeyRef:[self getSessionTransportKeyRefFromSecureEnclaveForTenantId:tenantId context:context]];
389+
// Query the session transport key only for iOS.
390+
// 1P apps use transport key to decrypt ECDH JWE responses when redeeming bound regular refresh tokens
391+
id keyType = privateKeyAttributes[(__bridge id)kSecAttrKeyType];
392+
if (keyType && [keyType isEqual: (__bridge id)kSecAttrKeyTypeECSECPrimeRandom])
393+
{
394+
[defaultKeys initializePrivateTransportKeyRef:[self getSessionTransportKeyRefFromSecureEnclaveForTenantId:tenantId context:context]];
395+
}
393396
}
394397
#endif
395398
return defaultKeys;

0 commit comments

Comments
 (0)