Skip to content

Commit fb7a0c4

Browse files
committed
Merge branch 'dev' into veena/fixHttpErrorMapping
2 parents dd69baa + fd46b2e commit fb7a0c4

7 files changed

+210
-3
lines changed

CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
# Unless a later match takes precedence, these users will be requested
33
# for review whenever someone opens a pull request.
44
* @AzureAD/AppleIdentityTeam
5-
# @AzureAD/AppleIdentityTeam and @AzureAD/MSAL-ObjC-CIAM will be the co-owners of MSAL.project, CHANGELOG.md and all files under azure_pipelines
5+
# @AzureAD/AppleIdentityTeam and @AzureAD/MSAL-ObjC-CIAM will be the co-owners of MSAL.project, CHANGELOG.md, Package.swift and all files under azure_pipelines
66
/MSAL/MSAL.xcodeproj/project.pbxproj @AzureAD/AppleIdentityTeam @AzureAD/MSAL-ObjC-CIAM
77
CHANGELOG.md @AzureAD/AppleIdentityTeam @AzureAD/MSAL-ObjC-CIAM
88
/azure_pipelines/ @AzureAD/AppleIdentityTeam @AzureAD/MSAL-ObjC-CIAM
9+
/Package.swift @AzureAD/AppleIdentityTeam @AzureAD/MSAL-ObjC-CIAM
910
# @AzureAD/MSAL-ObjC-CIAM owns any files in the */native_auth
1011
# directories, subdirectories and other files related to native auth.
1112
/MSAL/module.modulemap @AzureAD/MSAL-ObjC-CIAM
@@ -22,7 +23,6 @@ CHANGELOG.md @AzureAD/AppleIdentityTeam @AzureAD/MSAL-ObjC-CIAM
2223
/MSAL/MSAL.xcodeproj/xcshareddata/xcschemes/unit-test-host-mac.xcscheme @AzureAD/MSAL-ObjC-CIAM
2324
/MSAL/MSAL.xcodeproj/xcshareddata/xcschemes/MSAL\ iOS\ Native\ Auth\ E2E\ Tests.xcscheme @AzureAD/MSAL-ObjC-CIAM
2425
/MSAL/MSAL.xcodeproj/xcshareddata/xcschemes/MSAL\ Mac\ Native\ Auth\ E2E\ Tests.xcscheme @AzureAD/MSAL-ObjC-CIAM
25-
/Package.swift @AzureAD/MSAL-ObjC-CIAM
2626
/spm-integration-test.sh @AzureAD/MSAL-ObjC-CIAM
2727
# For more details about inheritance patterns, or to assign different
2828
# owners for individual file extensions, see:

MSAL/test/integration/native_auth/end_to_end/mfa/MSALNativeAuthSignInWithMFAEndToEndTests.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import MSAL
2929
final class MSALNativeAuthSignInWithMFAEndToEndTests: MSALNativeAuthEndToEndPasswordTestCase {
3030

3131
func test_signInUsingPasswordWithMFASubmitWrongChallengeResendChallengeThen_completeSuccessfully() async throws {
32+
throw XCTSkip("Retrieving OTP failure")
3233
#if os(macOS)
3334
throw XCTSkip("For some reason this test now requires Keychain access, reason needs to be investigated")
3435
#endif
@@ -88,6 +89,7 @@ final class MSALNativeAuthSignInWithMFAEndToEndTests: MSALNativeAuthEndToEndPass
8889
}
8990

9091
func test_signInUsingPasswordWithMFAGetAuthMethods_thenCompleteSuccessfully() async throws {
92+
throw XCTSkip("Retrieving OTP failure")
9193
#if os(macOS)
9294
throw XCTSkip("For some reason this test now requires Keychain access, reason needs to be investigated")
9395
#endif
@@ -146,6 +148,7 @@ final class MSALNativeAuthSignInWithMFAEndToEndTests: MSALNativeAuthEndToEndPass
146148
}
147149

148150
func test_signInUsingPasswordWithMFANoDefaultAuthMethod_completeSuccessfully() async throws {
151+
throw XCTSkip("Retrieving OTP failure")
149152
#if os(macOS)
150153
throw XCTSkip("For some reason this test now requires Keychain access, reason needs to be investigated")
151154
#endif

MSAL/test/integration/native_auth/end_to_end/reset_password/MSALNativeAuthResetPasswordEndToEndTests.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ final class MSALNativeAuthResetPasswordEndToEndTests: MSALNativeAuthEndToEndBase
3131
private let codeRetryCount = 3
3232

3333
func test_resetPassword_withoutAutomaticSignIn_succeeds() async throws {
34+
throw XCTSkip("1secmail service is down. Ignoring test for now.")
35+
3436
guard let sut = initialisePublicClientApplication(),
3537
let username = retrieveUsernameForResetPassword()
3638
else {
@@ -72,6 +74,8 @@ final class MSALNativeAuthResetPasswordEndToEndTests: MSALNativeAuthEndToEndBase
7274

7375
// SSPR - with automatic sign in
7476
func test_resetPassword_withAutomaticSignIn_succeeds() async throws {
77+
throw XCTSkip("1secmail service is down. Ignoring test for now.")
78+
7579
guard let sut = initialisePublicClientApplication(),
7680
let username = retrieveUsernameForResetPassword()
7781
else {

MSAL/test/integration/native_auth/end_to_end/sign_in/MSALNativeAuthSignInUsernameEndToEndTests.swift

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ final class MSALNativeAuthSignInUsernameEndToEndTests: MSALNativeAuthEndToEndBas
4949

5050
// Hero Scenario 2.2.7. Sign in - Invalid OTP code
5151
func test_signInAndSendingIncorrectOTPResultsInError() async throws {
52-
52+
throw XCTSkip("The test account is locked")
53+
5354
guard let sut = initialisePublicClientApplication(clientIdType: .code), let username = retrieveUsernameForSignInCode() else {
5455
XCTFail("Missing information")
5556
return
@@ -85,6 +86,7 @@ final class MSALNativeAuthSignInUsernameEndToEndTests: MSALNativeAuthEndToEndBas
8586

8687
// Hero Scenario 2.2.1. Sign in - Use email and OTP to get token and sign in
8788
func test_signInAndSendingCorrectOTPResultsInSuccess() async throws {
89+
throw XCTSkip("Retrieving OTP failure")
8890

8991
guard let sut = initialisePublicClientApplication(clientIdType: .code), let username = retrieveUsernameForSignInCode() else {
9092
XCTFail("Missing information")
@@ -128,6 +130,8 @@ final class MSALNativeAuthSignInUsernameEndToEndTests: MSALNativeAuthEndToEndBas
128130

129131
// Sign In - Verify Custom URL Domain - "https://<tenantName>.ciamlogin.com/<tenantName>.onmicrosoft.com"
130132
func test_signInCustomSubdomainLongInSuccess() async throws {
133+
throw XCTSkip("Retrieving OTP failure")
134+
131135
guard let sut = initialisePublicClientApplication(clientIdType: .code, customAuthorityURLFormat: .tenantSubdomainLongVersion), let username = retrieveUsernameForSignInCode() else {
132136
XCTFail("Missing information")
133137
return
@@ -170,6 +174,8 @@ final class MSALNativeAuthSignInUsernameEndToEndTests: MSALNativeAuthEndToEndBas
170174

171175
// Sign In - Verify Custom URL Domain - "https://<tenantName>.ciamlogin.com/<tenantId>"
172176
func test_signInCustomSubdomainIdInSuccess() async throws {
177+
throw XCTSkip("Retrieving OTP failure")
178+
173179
guard let sut = initialisePublicClientApplication(clientIdType: .code, customAuthorityURLFormat: .tenantSubdomainTenantId), let username = retrieveUsernameForSignInCode() else {
174180
XCTFail("Missing information")
175181
return
@@ -212,6 +218,8 @@ final class MSALNativeAuthSignInUsernameEndToEndTests: MSALNativeAuthEndToEndBas
212218

213219
// Sign In - Verify Custom URL Domain - "https://<tenantName>.ciamlogin.com/"
214220
func test_signInCustomSubdomainShortInSuccess() async throws {
221+
throw XCTSkip("Retrieving OTP failure")
222+
215223
guard let sut = initialisePublicClientApplication(clientIdType: .code, customAuthorityURLFormat: .tenantSubdomainShortVersion), let username = retrieveUsernameForSignInCode() else {
216224
XCTFail("Missing information")
217225
return

MSAL/test/integration/native_auth/end_to_end/sign_up/MSALNativeAuthSignUpUsernameAndPasswordEndToEndTests.swift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ final class MSALNativeAuthSignUpUsernameAndPasswordEndToEndTests: MSALNativeAuth
2929

3030
// Hero Scenario 1.1.1. Sign up - with Email verification as LAST step (Email & Password)
3131
func test_signUpWithPassword_withEmailVerificationLastStep_succeeds() async throws {
32+
throw XCTSkip("Retrieving OTP failure")
33+
3234
guard let sut = initialisePublicClientApplication() else {
3335
XCTFail("Missing information")
3436
return
@@ -87,6 +89,8 @@ final class MSALNativeAuthSignUpUsernameAndPasswordEndToEndTests: MSALNativeAuth
8789

8890
// Use case 1.1.2. Sign up - with Email & Password, Resend email OOB
8991
func test_signUpWithEmailPassword_resendEmail_success() async throws {
92+
throw XCTSkip("Retrieving OTP failure")
93+
9094
guard let sut = initialisePublicClientApplication() else {
9195
XCTFail("Missing information")
9296
return
@@ -139,6 +143,8 @@ final class MSALNativeAuthSignUpUsernameAndPasswordEndToEndTests: MSALNativeAuth
139143

140144
// Hero Scenario 1.1.3. Sign up - with Email verification as LAST step & Custom Attributes (Email & Password)
141145
func test_signUpWithPassword_withEmailVerificationAsLastStepAndCustomAttributes_succeeds() async throws {
146+
throw XCTSkip("Retrieving OTP failure")
147+
142148
guard let sut = initialisePublicClientApplication(clientIdType: .passwordAndAttributes) else {
143149
XCTFail("Missing information")
144150
return
@@ -199,6 +205,8 @@ final class MSALNativeAuthSignUpUsernameAndPasswordEndToEndTests: MSALNativeAuth
199205

200206
// Hero Scenario 1.1.4. Sign up - with Email verification as FIRST step (Email & Password)
201207
func test_signUpWithPassword_withEmailVerificationAsFirstStepAndThenSetPassword_succeeds() async throws {
208+
throw XCTSkip("Retrieving OTP failure")
209+
202210
guard let sut = initialisePublicClientApplication() else {
203211
XCTFail("Missing information")
204212
return
@@ -273,6 +281,8 @@ final class MSALNativeAuthSignUpUsernameAndPasswordEndToEndTests: MSALNativeAuth
273281

274282
// Use case 1.1.5. Sign up - with Email & Password, Verify email address using email OTP, resend OTP and then set password
275283
func test_signUpWithEmailOTP_andSetPasswordAfterOTP_success() async throws {
284+
throw XCTSkip("Retrieving OTP failure")
285+
276286
guard let sut = initialisePublicClientApplication() else {
277287
XCTFail("Missing information")
278288
return
@@ -339,6 +349,8 @@ final class MSALNativeAuthSignUpUsernameAndPasswordEndToEndTests: MSALNativeAuth
339349

340350
// Hero Scenario 1.1.6. Sign up - with Email verification as FIRST step & Custom Attribute (Email & Password)
341351
func test_signUpWithPasswordWithEmailVerificationAsFirstStepAndCustomAttributes_succeeds() async throws {
352+
throw XCTSkip("Retrieving OTP failure")
353+
342354
guard let sut = initialisePublicClientApplication(clientIdType: .passwordAndAttributes) else {
343355
XCTFail("Missing information")
344356
return
@@ -431,6 +443,8 @@ final class MSALNativeAuthSignUpUsernameAndPasswordEndToEndTests: MSALNativeAuth
431443

432444
// Sign up - with Email verification as FIRST step & Custom Attributes over MULTIPLE screens (Email & Password)
433445
func test_signUpWithPasswordWithEmailVerificationAsFirstStepAndCustomAttributesOverMultipleScreens_succeeds() async throws {
446+
throw XCTSkip("Retrieving OTP failure")
447+
434448
guard let sut = initialisePublicClientApplication(clientIdType: .passwordAndAttributes) else {
435449
XCTFail("Missing information")
436450
return
@@ -541,6 +555,8 @@ final class MSALNativeAuthSignUpUsernameAndPasswordEndToEndTests: MSALNativeAuth
541555

542556
// Sign up – without automatic sign in (Email & Password)
543557
func test_signUpWithPasswordWithoutAutomaticSignIn() async throws {
558+
throw XCTSkip("Retrieving OTP failure")
559+
544560
guard let sut = initialisePublicClientApplication() else {
545561
XCTFail("Missing information")
546562
return

MSAL/test/integration/native_auth/end_to_end/sign_up/MSALNativeAuthSignUpUsernameEndToEndTests.swift

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ final class MSALNativeAuthSignUpUsernameEndToEndTests: MSALNativeAuthEndToEndBas
2929

3030
// Hero Scenario 2.1.1. Sign up – with Email Verification (Email & Email OTP)
3131
func test_signUpWithCode_withEmailVerification_succeeds() async throws {
32+
throw XCTSkip("Retrieving OTP failure")
33+
3234
guard let sut = initialisePublicClientApplication(clientIdType: .code) else {
3335
XCTFail("Missing information")
3436
return
@@ -73,6 +75,8 @@ final class MSALNativeAuthSignUpUsernameEndToEndTests: MSALNativeAuthEndToEndBas
7375

7476
// Hero Scenario 2.1.2. Sign up – with Email Verification as LAST step & Custom Attributes (Email & Email OTP)
7577
func test_signUpWithCode_withEmailVerificationAsLastStepAndCustomAttributes_succeeds() async throws {
78+
throw XCTSkip("Retrieving OTP failure")
79+
7680
guard let sut = initialisePublicClientApplication(clientIdType: .codeAndAttributes) else {
7781
XCTFail("OTP code not retrieved from email")
7882
return
@@ -114,6 +118,8 @@ final class MSALNativeAuthSignUpUsernameEndToEndTests: MSALNativeAuthEndToEndBas
114118

115119
// Hero Scenario 2.1.3. Sign up – with Email Verification as FIRST step & Custom Attributes (Email & Email OTP)
116120
func test_signUpWithCode_withEmailVerificationAsFirstStepAndCustomAttributes_succeeds() async throws {
121+
throw XCTSkip("Retrieving OTP failure")
122+
117123
guard let sut = initialisePublicClientApplication(clientIdType: .codeAndAttributes) else {
118124
XCTFail("Missing information")
119125
return
@@ -168,6 +174,8 @@ final class MSALNativeAuthSignUpUsernameEndToEndTests: MSALNativeAuthEndToEndBas
168174

169175
// Hero Scenario 2.1.4. Sign up – with Email Verification as FIRST step & Custom Attributes over MULTIPLE screens (Email & Email OTP)
170176
func test_signUpWithCode_withEmailVerificationAsFirstStepAndCustomAttributesOverMultipleScreens_succeeds() async throws {
177+
throw XCTSkip("Retrieving OTP failure")
178+
171179
guard let sut = initialisePublicClientApplication(clientIdType: .codeAndAttributes) else {
172180
XCTFail("Missing information")
173181
return
@@ -239,6 +247,8 @@ final class MSALNativeAuthSignUpUsernameEndToEndTests: MSALNativeAuthEndToEndBas
239247

240248
// use case 2.1.5. Sign up - with Email & OTP resend email OTP
241249
func test_signUpWithEmailOTP_resendEmail_success() async throws {
250+
throw XCTSkip("Retrieving OTP failure")
251+
242252
guard let sut = initialisePublicClientApplication(clientIdType: .code) else {
243253
XCTFail("Missing information")
244254
return
@@ -366,6 +376,8 @@ final class MSALNativeAuthSignUpUsernameEndToEndTests: MSALNativeAuthEndToEndBas
366376

367377
// Hero Scenario 2.1.9. Sign up – without automatic sign in (Email & Email OTP)
368378
func test_signUpWithoutAutomaticSignIn() async throws {
379+
throw XCTSkip("Retrieving OTP failure")
380+
369381
guard let sut = initialisePublicClientApplication(clientIdType: .code) else {
370382
XCTFail("Missing information")
371383
return
Lines changed: 164 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,164 @@
1+
# Xcode
2+
# Build, test, and archive an Xcode workspace on macOS.
3+
# Add steps that install certificates, test, sign, and distribute an app, save build artifacts, and more:
4+
# https://docs.microsoft.com/azure/devops/pipelines/languages/xcode
5+
6+
trigger:
7+
branches:
8+
include:
9+
- dev
10+
11+
pr:
12+
autoCancel: true
13+
branches:
14+
include:
15+
- '*'
16+
drafts: true
17+
18+
pool:
19+
name: 'Azure Pipelines'
20+
21+
resources:
22+
repositories:
23+
- repository: azure-activedirectory-tokenbroker-for-objc
24+
type: github
25+
endpoint: 'MSAL ObjC Service Connection'
26+
name: AzureAD/azure-activedirectory-tokenbroker-for-objc
27+
28+
- repository: WorkplaceJoin-for-iOS
29+
type: github
30+
endpoint: 'MSAL ObjC Service Connection'
31+
name: AzureAD/WorkplaceJoin-for-iOS
32+
33+
jobs:
34+
- job: 'Validate_Pull_Request'
35+
displayName: Validate Pull Request
36+
pool:
37+
vmImage: 'macOS-14'
38+
timeOutInMinutes: 30
39+
40+
steps:
41+
- checkout: azure-activedirectory-tokenbroker-for-objc
42+
displayName: 'Checkout Broker'
43+
clean: false
44+
submodules: false
45+
fetchTags: true
46+
persistCredentials: true
47+
48+
- checkout: self
49+
displayName: 'Checkout MSAL'
50+
clean: false
51+
submodules: false
52+
fetchTags: true
53+
path: 's/azure-activedirectory-tokenbroker-for-objc/ADAuthenticationBroker/Frameworks/microsoft-authentication-library-for-objc'
54+
persistCredentials: true
55+
56+
- task: Bash@3
57+
displayName: 'Checkout MSAL submodules + ADAL'
58+
inputs:
59+
workingDirectory: $(Pipeline.Workspace)/s
60+
targetType: 'inline'
61+
script: |
62+
cd azure-activedirectory-tokenbroker-for-objc
63+
git submodule update --init --recursive ADAuthenticationBroker/Frameworks/adal
64+
cd ADAuthenticationBroker/Frameworks/microsoft-authentication-library-for-objc
65+
git submodule update --init --recursive
66+
67+
- checkout: WorkplaceJoin-for-iOS
68+
displayName: 'Checkout WPJ'
69+
clean: false
70+
submodules: false
71+
fetchTags: true
72+
path: 's/azure-activedirectory-tokenbroker-for-objc/ADAuthenticationBroker/Frameworks/WorkplaceJoin-for-iOS'
73+
persistCredentials: true
74+
75+
- task: AzureCLI@2
76+
inputs:
77+
azureSubscription: 'AuthSdkResourceManager'
78+
scriptType: 'pscore'
79+
scriptLocation: 'inlineScript'
80+
inlineScript: |
81+
# if this fails, check out this bash script that includes diagnostics:
82+
# https://gist.github.com/johnterickson/19f80a3e969e39f1000d118739176e62
83+
# uncomment these for more debugging spew
84+
# GIT_TRACE=1
85+
# GIT_CURL_VERBOSE=1
86+
87+
# Note that the resoruce is specified to limit the token to Azure DevOps
88+
$token = az account get-access-token --query accessToken --resource 499b84ac-1321-427f-aa17-267ca6975798 -o tsv
89+
Write-Host "##vso[task.setvariable variable=aadToken;issecret=true]$token"
90+
- task: Bash@3
91+
displayName: 'Checkout NGC Submodules'
92+
env:
93+
AccessToken: $(MSAzureToken_encoded)
94+
inputs:
95+
workingDirectory: $(Pipeline.Workspace)/s
96+
targetType: 'inline'
97+
script: |
98+
cd azure-activedirectory-tokenbroker-for-objc/ADAuthenticationBroker/Frameworks
99+
git -c http.https://msazure.visualstudio.com/DefaultCollection/One/_git/AD-MFA-NGCAuthentication.extraheader="AUTHORIZATION: bearer $(aadToken)" submodule update --init AD-MFA-NGCAuthentication
100+
cd AD-MFA-NGCAuthentication
101+
git -c http.https://msazure.visualstudio.com/DefaultCollection/One/_git/AD-MFA-NGCKeyProvider-ios.extraheader="AUTHORIZATION: bearer $(aadToken)" submodule update --init NGCKeyProvider
102+
git -c http.https://msazure.visualstudio.com/DefaultCollection/One/_git/AD-MFA-MSAuthNetworking.extraheader="AUTHORIZATION: bearer $(aadToken)" submodule update --init MSAuthNetworking
103+
104+
- task: Bash@3
105+
displayName: 'Checkout WPJ openssl-msft submodule'
106+
inputs:
107+
workingDirectory: $(Pipeline.Workspace)/s
108+
targetType: 'inline'
109+
script: |
110+
cd azure-activedirectory-tokenbroker-for-objc/ADAuthenticationBroker/Frameworks/WorkplaceJoin-for-iOS
111+
git -c http.https://msazure.visualstudio.com/DefaultCollection/PlatformCrypto/_git/openssl-msft.extraheader="AUTHORIZATION: bearer $(aadToken)" submodule update --init Frameworks/openssl-msft
112+
113+
- task: Bash@3
114+
displayName: 'Update WPJ submodules'
115+
inputs:
116+
workingDirectory: $(Pipeline.Workspace)/s
117+
targetType: 'inline'
118+
script: |
119+
cd azure-activedirectory-tokenbroker-for-objc/ADAuthenticationBroker/Frameworks/WorkplaceJoin-for-iOS
120+
git submodule update --init --recursive Frameworks/microsoft-authentication-library-for-objc
121+
122+
- script: 'gem uninstall xcpretty -I --version 0.4.0'
123+
displayName: 'Uninstall xcpretty v0.4.0'
124+
125+
- script: 'gem install xcpretty -N -v 0.3.0'
126+
displayName: 'Install xcpretty v0.3.0'
127+
128+
- script: 'gem install slather -N'
129+
displayName: 'Install slather'
130+
131+
- task: UsePythonVersion@0
132+
displayName: 'Use Python 3.x'
133+
134+
- task: Bash@3
135+
displayName: 'Select Xcode version'
136+
inputs:
137+
targetType: 'inline'
138+
script: '/bin/bash -c "sudo xcode-select -s /Applications/Xcode_15.4.app"'
139+
140+
# The following is needed to install the visionOS SDK on macos-14 vm image which
141+
# doesn't have visionOS installed by default.
142+
# TODO: Remove when macos-14-arm64 is supported on ADO.
143+
- task: Bash@3
144+
displayName: download visionOS SDK
145+
inputs:
146+
targetType: 'inline'
147+
script: |
148+
echo "Downloading simulator for visionOS"
149+
sudo xcode-select -s /Applications/Xcode_15.4.app/Contents/Developer
150+
defaults write com.apple.dt.Xcode AllowUnsupportedVisionOSHost -bool YES
151+
defaults write com.apple.CoreSimulator AllowUnsupportedVisionOSHost -bool YES
152+
xcodebuild -downloadPlatform visionOS
153+
failOnStderr: false
154+
155+
156+
- task: Bash@3
157+
displayName: 'Run a python script for Broker'
158+
inputs:
159+
targetType: 'inline'
160+
script: |
161+
cd azure-activedirectory-tokenbroker-for-objc
162+
echo "executing build:./build.py"
163+
python3 ./build.py
164+

0 commit comments

Comments
 (0)