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

Release Common Core 1.7.43 #1441

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
57ecb42
Add new requestType for telemetry service
Oct 15, 2024
65ab20c
Add MSID_BROKER_SDK_BROKER_XPC_CAPABILITY const
Oct 15, 2024
b0aec4e
completion block before perform request
xinyuxu1026 Oct 16, 2024
49d28f5
Merge pull request #1433 from AzureAD/release/1.7.42
ameyapat Oct 16, 2024
d683a33
Merge pull request #1434 from AzureAD/xinyu/completion-block
xinyuxu1026 Oct 22, 2024
489397b
add new yaml file for MSAL submodule check pipeline
mipetriu Oct 25, 2024
44915cd
use azure pipeline integrated checkout system and update triggers
mipetriu Oct 25, 2024
514a957
copy over tested pipeline yaml from different branch
mipetriu Nov 1, 2024
a135e06
Merge branch 'dev' into kasong/2914059-telemetry
Nov 4, 2024
d99a5f3
Merge pull request #1435 from AzureAD/mipetriu/msal_submodule_pipeline
mipetriu Nov 4, 2024
4455dbd
Add new key for sub error description
juan-arias Nov 5, 2024
48e8643
Merge branch 'dev' into kasong/2914059-telemetry
Nov 5, 2024
c557f9e
Merge pull request #1438 from AzureAD/jarias/return-suberror-silent-c…
juan-arias Nov 5, 2024
06ba313
Trigger the build with a dummy change
kaisong1990 Nov 7, 2024
c5f50e0
dummy change to trigger the pipeline
kaisong1990 Nov 7, 2024
9760f46
Merge branch 'dev' into kasong/2914059-telemetry
Nov 7, 2024
4a3be7f
Merge pull request #1436 from AzureAD/kasong/2914059-telemetry
kaisong1990 Nov 8, 2024
03a24f4
Support web_page_uri. (#1440)
antrix1989 Nov 11, 2024
a8ef17e
Update changelog
Veena11 Nov 12, 2024
dcd1acf
Resolve a crash when assign the 0 to expectedFulfillmentCount
Nov 12, 2024
e9e97ed
Merge pull request #1443 from AzureAD/kasong/automation-crash-fix
mipetriu Nov 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions IdentityCore/src/MSIDBrokerConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ extern NSString * _Nonnull const MSID_ADAL_BROKER_MESSAGE_VERSION;
extern NSString * _Nonnull const MSID_MSAL_BROKER_MESSAGE_VERSION;
extern NSString * _Nonnull const MSID_BROKER_SDK_CAPABILITIES_KEY;
extern NSString * _Nonnull const MSID_BROKER_SDK_SSO_EXTENSION_CAPABILITY;
extern NSString * _Nonnull const MSID_BROKER_SDK_BROKER_XPC_CAPABILITY;
extern NSString * _Nonnull const MSID_BROKER_SSO_URL;
extern NSString * _Nonnull const MSID_BROKER_ACCOUNT_IDENTIFIER;
extern NSString * _Nonnull const MSID_BROKER_TYPES_OF_HEADER;
Expand Down
1 change: 1 addition & 0 deletions IdentityCore/src/MSIDBrokerConstants.m
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
NSString *const MSID_MSAL_BROKER_MESSAGE_VERSION = @"3";
NSString *const MSID_BROKER_SDK_CAPABILITIES_KEY = @"sdk_broker_capabilities";
NSString *const MSID_BROKER_SDK_SSO_EXTENSION_CAPABILITY = @"sso_extension";
NSString *const MSID_BROKER_SDK_BROKER_XPC_CAPABILITY = @"broker_xpc";
NSString *const MSID_BROKER_SSO_URL = @"sso_url";
NSString *const MSID_BROKER_ACCOUNT_IDENTIFIER = @"account_identifier";
NSString *const MSID_BROKER_TYPES_OF_HEADER = @"types_of_header";
Expand Down
1 change: 1 addition & 0 deletions IdentityCore/src/MSIDError.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
extern NSString * _Nonnull MSIDErrorDescriptionKey;
extern NSString * _Nonnull MSIDOAuthErrorKey;
extern NSString * _Nonnull MSIDOAuthSubErrorKey;
extern NSString * _Nonnull MSIDOAuthSubErrorDescriptionKey;
extern NSString * _Nonnull MSIDCorrelationIdKey;
extern NSString * _Nonnull MSIDHTTPHeadersKey;
extern NSString * _Nonnull MSIDHTTPResponseCodeKey;
Expand Down
1 change: 1 addition & 0 deletions IdentityCore/src/MSIDError.m
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
NSString *MSIDErrorDescriptionKey = @"MSIDErrorDescriptionKey";
NSString *MSIDOAuthErrorKey = @"MSIDOAuthErrorKey";
NSString *MSIDOAuthSubErrorKey = @"MSIDOAuthSubErrorKey";
NSString *MSIDOAuthSubErrorDescriptionKey = @"MSIDOAuthSubErrorDescriptionKey";
NSString *MSIDCorrelationIdKey = @"MSIDCorrelationIdKey";
NSString *MSIDHTTPHeadersKey = @"MSIDHTTPHeadersKey";
NSString *MSIDHTTPResponseCodeKey = @"MSIDHTTPResponseCodeKey";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ NS_ASSUME_NONNULL_BEGIN

@property (nonatomic, class, readonly) NSString *operation;
@property (nonatomic) NSUUID *correlationId;
@property (nonatomic) NSInteger requestType;

- (nullable NSString *)logInfo;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, nullable) MSIDClaimsRequest *claimsRequest;
@property (nonatomic) NSDate *requestSentDate;
@property (nonatomic) NSString *nonce;
@property (nonatomic) NSString *webPageUri;
@property (nonatomic, nullable) NSString *accountHomeTenantId;
@property (nonatomic, nullable) NSString *clientSku;
@property (nonatomic) BOOL skipValidateResultAccount;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ + (BOOL)fillRequest:(MSIDBrokerOperationTokenRequest *)request
request.claimsRequest = parameters.claimsRequest;
request.requestSentDate = requestSentDate;
request.nonce = parameters.nonce;
request.webPageUri = parameters.webPageUri;
request.clientSku = parameters.clientSku;
request.skipValidateResultAccount = parameters.skipValidateResultAccount;
request.forceRefresh = parameters.forceRefresh;
Expand All @@ -79,6 +80,8 @@ - (instancetype)initWithJSONDictionary:(NSDictionary *)json error:(NSError *__au
_configuration = [[MSIDConfiguration alloc] initWithJSONDictionary:json error:error];
if (!_configuration) return nil;

_webPageUri = [json msidStringObjectForKey:@"web_page_uri"];

_providerType = MSIDProviderTypeFromString([json msidStringObjectForKey:MSID_PROVIDER_TYPE_JSON_KEY]);

_oidcScope = [json msidStringObjectForKey:MSID_BROKER_EXTRA_OIDC_SCOPES_KEY];
Expand Down Expand Up @@ -135,6 +138,7 @@ - (NSDictionary *)jsonDictionary
}

[json addEntriesFromDictionary:configurationJson];
json[@"web_page_uri"] = self.webPageUri;
json[MSID_PROVIDER_TYPE_JSON_KEY] = MSIDProviderTypeToString(self.providerType);
json[MSID_BROKER_EXTRA_OIDC_SCOPES_KEY] = self.oidcScope;
json[MSID_BROKER_EXTRA_QUERY_PARAM_KEY] = [self.extraQueryParameters msidWWWFormURLEncode];
Expand Down
1 change: 1 addition & 0 deletions IdentityCore/src/parameters/MSIDRequestParameters.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
@property (nonatomic) MSIDAuthority *providedAuthority;
@property (nonatomic) MSIDAuthority *cloudAuthority;
@property (nonatomic) NSString *redirectUri;
@property (nonatomic) NSString *webPageUri;
@property (nonatomic) NSString *clientId;
@property (nonatomic) NSString *target;
@property (nonatomic) NSString *oidcScope;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,9 @@ - (void)executeRequestWithCompletion:(nonnull MSIDGetAccountsRequestCompletionBl
self.authorizationController.delegate = self.extensionDelegate;

self.requestSentDate = [NSDate date];
[self.authorizationController msidPerformRequests];


self.requestCompletionBlock = completionBlock;
[self.authorizationController msidPerformRequests];
}

#pragma mark - AuthenticationServices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ - (void)executeRequestWithCompletion:(nonnull MSIDGetDeviceInfoRequestCompletion
self.authorizationController = [self controllerWithRequest:ssoRequest];
self.authorizationController.delegate = self.extensionDelegate;
self.requestSentDate = [NSDate date];
[self.authorizationController msidPerformRequests];


self.requestCompletionBlock = completionBlock;
[self.authorizationController msidPerformRequests];
}

#pragma mark - AuthenticationServices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,9 @@ - (void)executeRequestWithCompletion:(MSIDInteractiveRequestCompletionBlock)comp
self.authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[ssoRequest]];
self.authorizationController.delegate = self.extensionDelegate;
self.authorizationController.presentationContextProvider = self;
[self.authorizationController msidPerformRequests];

self.requestCompletionBlock = completionBlock;

[self.authorizationController msidPerformRequests];
}];
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,8 @@ - (void)executeRequestWithCompletion:(nonnull MSIDSignoutRequestCompletionBlock)
self.authorizationController = [self controllerWithRequest:ssoRequest];
self.authorizationController.delegate = self.extensionDelegate;
self.requestSentDate = [NSDate date];
[self.authorizationController msidPerformRequests];

self.requestCompletionBlock = completionBlock;
[self.authorizationController msidPerformRequests];
}

#pragma mark - AuthenticationServices
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,8 @@ - (void)executeRequestImplWithCompletionBlock:(MSIDRequestCompletionBlock _Nonnu
self.authorizationController = [[ASAuthorizationController alloc] initWithAuthorizationRequests:@[ssoRequest]];
self.authorizationController.delegate = self.extensionDelegate;

[self.authorizationController msidPerformRequests];

self.requestCompletionBlock = completionBlock;
[self.authorizationController msidPerformRequests];
}

- (id<MSIDCacheAccessor>)tokenCache
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,10 @@ - (NSArray *)loadTestAccountRequest:(MSIDAutomationBaseApiRequest *)accountReque
XCTAssertTrue(results.count >= 1);

XCTestExpectation *passwordLoadExpecation = [self expectationWithDescription:@"Get password"];
passwordLoadExpecation.expectedFulfillmentCount = results.count;
if (results && results.count > 0)
{
passwordLoadExpecation.expectedFulfillmentCount = results.count;
}

for (MSIDTestAutomationAccount *account in results)
{
Expand Down
112 changes: 112 additions & 0 deletions azure_pipelines/msal_submodule_check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
# Pipeline will be triggered for PR & any updates on the PR on all branches
pr:
branches:
include:
- '*'

# Trigger CI for only main/release branches
trigger:
branches:
include:
- main
- release/*

resources:
repositories:
- repository: microsoft-authentication-library-for-objc
type: github
endpoint: 'MSAL ObjC Service Connection'
name: AzureAD/microsoft-authentication-library-for-objc

# Define parallel jobs that run build script for specified targets
jobs:
- job: 'Validate_Pull_Request'
strategy:
maxParallel: 3
matrix:
IOS_FRAMEWORK:
target: "iosFramework iosTestApp sampleIosApp sampleIosAppSwift"
MAC_FRAMEWORK:
target: "macFramework"
VISION_FRAMEWORK:
target: "visionOSFramework"
displayName: Validate Pull Request
pool:
vmImage: 'macOS-14'
timeOutInMinutes: 30

steps:
- script: |
/bin/bash -c "sudo xcode-select -s /Applications/Xcode_15.4.app"
displayName: 'Switch to use Xcode 15.4'
- task: CmdLine@2
displayName: Installing dependencies
inputs:
script: |
gem install xcpretty slather bundler -N
failOnStderr: true

# The following is needed to install the visionOS SDK on macos-14 vm image which
# doesn't have visionOS installed by default.
# TODO: Remove when macos-14-arm64 is supported on ADO.
- task: Bash@3
displayName: download visionOS SDK
inputs:
targetType: 'inline'
script: |
echo $(target)
if [ $(target) == 'visionOSFramework' ]; then
echo "Downloading simulator for visionOS"
sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
xcodebuild -downloadPlatform visionOS
else
echo "Not visionOS job, no download needed"
fi
failOnStderr: false

- checkout: microsoft-authentication-library-for-objc
displayName: 'Checkout MSAL'
clean: true
submodules: true
fetchTags: true
persistCredentials: true

- checkout: self
clean: true
submodules: false
fetchDepth: 1
path: 's/microsoft-authentication-library-for-objc/MSAL/IdentityCore'
persistCredentials: false

- task: Bash@3
displayName: Run Build script & check for Errors
inputs:
targetType: 'inline'
script: |
cd $(Agent.BuildDirectory)/s/microsoft-authentication-library-for-objc
{ output=$(./build.py --target $(target) 2>&1 1>&3-) ;} 3>&1
final_status=$(<./build/status.txt)
echo "FINAL STATUS = ${final_status}"
echo "POSSIBLE ERRORS: ${output}"

if [ $final_status != "0" ]; then
echo "Build & Testing Failed! \n ${output}" >&2
fi
failOnStderr: true
- task: Bash@3
condition: always()
displayName: Cleanup
inputs:
targetType: 'inline'
script: |
rm -rf $(Agent.BuildDirectory)/s/build/status.txt
- task: PublishTestResults@2
condition: always()
displayName: Publish Test Report
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '$(Agent.BuildDirectory)/s/build/reports/*'
failTaskOnFailedTests: true
testRunTitle: 'Test Run - $(target)'
6 changes: 6 additions & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Version 1.7.43
* Support web_page_uri #1440
* Save error received from ESTS, and return it to the client on silent broker calls (#1438)
* XPC CommonCore Minor change to support broker XPC changes (#1436)
* Assign completion block before perform request (#1434)

Version 1.7.42
* Support extra query parameters on signout (#1243)
* Wrap ASAuthorizationProviderExtensionAuthorizationRequest methods (#1427)
Expand Down
Loading