Skip to content

Commit 8c51e06

Browse files
committed
Merge branch 'dev' into veena/addPSSORepairStatus
2 parents 1a876c2 + fd46b2e commit 8c51e06

19 files changed

+863
-25
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,14 @@
1-
## [1.6.2]:
1+
## [1.6.3]
2+
* Merge 1.6.1-hotfix
3+
4+
## [1.6.2]:
25
* Add native auth instructions to error description when reset password required is returned (#2582)
36
* Save error received from ESTS, and return it to the client on silent broker calls (#2379)
47
* Support web_page_uri (#2384)
58

9+
## [1.6.1-hotfix]
10+
* Add support of "lookup" mode in broker #2414
11+
612
## [1.6.1]:
713
* Support extra query parameters on logout endpoint (#2339)
814
* Add support functions to help broker improve cross cloud experience (#2361)

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.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |s|
22
s.name = "MSAL"
3-
s.version = "1.6.2"
3+
s.version = "1.6.3"
44
s.summary = "Microsoft Authentication Library (MSAL) for iOS"
55
s.description = <<-DESC
66
The MSAL library for iOS gives your app the ability to begin using the Microsoft Cloud by supporting Microsoft Azure Active Directory and Microsoft Accounts in a converged experience using industry standard OAuth2 and OpenID Connect. The library also supports Microsoft Azure B2C for those using our hosted identity management service.

MSAL/MSAL.xcodeproj/project.pbxproj

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@
9595
0D96DB3C27850F0F00DEAF87 /* MSALWipeCacheForAllAccountsConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D96DB2E27850E1300DEAF87 /* MSALWipeCacheForAllAccountsConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
9696
0D96DB3D27850F1100DEAF87 /* MSALWipeCacheForAllAccountsConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D96DB2E27850E1300DEAF87 /* MSALWipeCacheForAllAccountsConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
9797
0D96DB3E27850F1200DEAF87 /* MSALWipeCacheForAllAccountsConfig.h in Headers */ = {isa = PBXBuildFile; fileRef = 0D96DB2E27850E1300DEAF87 /* MSALWipeCacheForAllAccountsConfig.h */; settings = {ATTRIBUTES = (Public, ); }; };
98+
12E2160B2D11D3920000F44C /* AuthorityURLFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E2160A2D11D3920000F44C /* AuthorityURLFormat.swift */; };
99+
12E2160C2D11D3920000F44C /* AuthorityURLFormat.swift in Sources */ = {isa = PBXBuildFile; fileRef = 12E2160A2D11D3920000F44C /* AuthorityURLFormat.swift */; };
98100
1E04572324BD5A7D00444756 /* MSALCacheItemDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1E04572024BD5A7D00444756 /* MSALCacheItemDetailViewController.m */; };
99101
1E06CD6524D116F800E3D0E5 /* Security.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6A206371FC510B500755A51 /* Security.framework */; };
100102
1E1A2E042256D12F001009ED /* MSALTestAppSettings.m in Sources */ = {isa = PBXBuildFile; fileRef = D61A64B01E5AAC5C0086D120 /* MSALTestAppSettings.m */; };
@@ -1922,6 +1924,7 @@
19221924
04D32CCF1FD8AFF3000B123E /* MSALErrorConverterTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSALErrorConverterTests.m; sourceTree = "<group>"; };
19231925
0D96DB2E27850E1300DEAF87 /* MSALWipeCacheForAllAccountsConfig.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSALWipeCacheForAllAccountsConfig.h; sourceTree = "<group>"; };
19241926
0D96DB3627850E3900DEAF87 /* MSALWipeCacheForAllAccountsConfig.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSALWipeCacheForAllAccountsConfig.m; sourceTree = "<group>"; };
1927+
12E2160A2D11D3920000F44C /* AuthorityURLFormat.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthorityURLFormat.swift; sourceTree = "<group>"; };
19251928
1E04571F24BD5A7D00444756 /* MSALCacheItemDetailViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MSALCacheItemDetailViewController.h; sourceTree = "<group>"; };
19261929
1E04572024BD5A7D00444756 /* MSALCacheItemDetailViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MSALCacheItemDetailViewController.m; sourceTree = "<group>"; };
19271930
1E1A2E052256D194001009ED /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
@@ -3425,6 +3428,7 @@
34253428
9B235D9E2A3CFB4300657331 /* MSALNativeAuthEndToEndBaseTestCase.swift */,
34263429
2809E8342C3C37B7009F14D7 /* MSALNativeAuthEndToEndPasswordTestCase.swift */,
34273430
280095EA2C32CAFC00F1653E /* ClientIdType.swift */,
3431+
12E2160A2D11D3920000F44C /* AuthorityURLFormat.swift */,
34283432
);
34293433
path = end_to_end;
34303434
sourceTree = "<group>";
@@ -6367,6 +6371,7 @@
63676371
281A0E182C21E1FD00CB30CB /* SignInDelegateSpies.swift in Sources */,
63686372
28A277D92C22ED5E00D95E00 /* MSALNativeAuthEmailCodeRetriever.swift in Sources */,
63696373
E24CE9CC2C57F1160069E2E4 /* AttributesStub.swift in Sources */,
6374+
12E2160B2D11D3920000F44C /* AuthorityURLFormat.swift in Sources */,
63706375
281A0E1B2C21E20600CB30CB /* MSALNativeAuthEndToEndBaseTestCase.swift in Sources */,
63716376
28188F652C8F4C1100CFDD05 /* MFADelegateSpies.swift in Sources */,
63726377
281A0E192C21E20000CB30CB /* MSALNativeAuthResetPasswordEndToEndTests.swift in Sources */,
@@ -7418,6 +7423,7 @@
74187423
DE1BD1062C3C284900B0888E /* SignInDelegateSpies.swift in Sources */,
74197424
DE1BD1072C3C284C00B0888E /* MSALNativeAuthResetPasswordEndToEndTests.swift in Sources */,
74207425
DE9EB8622C5CE44B00328AA4 /* AttributesStub.swift in Sources */,
7426+
12E2160C2D11D3920000F44C /* AuthorityURLFormat.swift in Sources */,
74217427
DE1BD1012C3C283C00B0888E /* MSALNativeAuthSignUpUsernameEndToEndTests.swift in Sources */,
74227428
28188F662C8F4C1100CFDD05 /* MFADelegateSpies.swift in Sources */,
74237429
DE1BD1032C3C284100B0888E /* SignUpDelegateSpies.swift in Sources */,

MSAL/resources/ios/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.6.2</string>
18+
<string>1.6.3</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSPrincipalClass</key>

MSAL/resources/mac/Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<key>CFBundlePackageType</key>
1616
<string>FMWK</string>
1717
<key>CFBundleShortVersionString</key>
18-
<string>1.6.2</string>
18+
<string>1.6.3</string>
1919
<key>CFBundleVersion</key>
2020
<string>$(CURRENT_PROJECT_VERSION)</string>
2121
<key>NSHumanReadableCopyright</key>

MSAL/src/MSAL_Internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
#define MSAL_VER_HIGH 1
2929
#define MSAL_VER_LOW 6
30-
#define MSAL_VER_PATCH 2
30+
#define MSAL_VER_PATCH 3
3131

3232
#define STR_HELPER(x) #x
3333
#define STR(x) STR_HELPER(x)
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
//
2+
// Copyright (c) Microsoft Corporation.
3+
// All rights reserved.
4+
//
5+
// This code is licensed under the MIT License.
6+
//
7+
// Permission is hereby granted, free of charge, to any person obtaining a copy
8+
// of this software and associated documentation files(the "Software"), to deal
9+
// in the Software without restriction, including without limitation the rights
10+
// to use, copy, modify, merge, publish, distribute, sublicense, and / or sell
11+
// copies of the Software, and to permit persons to whom the Software is
12+
// furnished to do so, subject to the following conditions :
13+
//
14+
// The above copyright notice and this permission notice shall be included in
15+
// all copies or substantial portions of the Software.
16+
//
17+
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
// THE SOFTWARE.
24+
25+
26+
import Foundation
27+
28+
enum AuthorityURLFormat {
29+
case tenantSubdomainShortVersion
30+
case tenantSubdomainLongVersion
31+
case tenantSubdomainTenantId
32+
}

MSAL/test/integration/native_auth/end_to_end/MSALNativeAuthEndToEndBaseTestCase.swift

Lines changed: 57 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ class MSALNativeAuthEndToEndBaseTestCase: XCTestCase {
3333
static let clientIdEmailPasswordAttributesKey = "email_password_attributes_client_id"
3434
static let clientIdEmailCodeAttributesKey = "email_code_attributes_client_id"
3535
static let tenantSubdomainKey = "tenant_subdomain"
36+
static let tenantIdKey = "tenant_id"
3637
static let signInEmailPasswordUsernameKey = "sign_in_email_password_username"
3738
static let signInEmailPasswordMFAUsernameKey = "sign_in_email_password_mfa_username"
3839
static let signInEmailPasswordMFANoDefaultAuthMethodUsernameKey = "sign_in_email_password_mfa_no_default_username"
@@ -71,14 +72,55 @@ class MSALNativeAuthEndToEndBaseTestCase: XCTestCase {
7172

7273
func initialisePublicClientApplication(
7374
clientIdType: ClientIdType = .password,
74-
challengeTypes: MSALNativeAuthChallengeTypes = [.OOB, .password]
75+
challengeTypes: MSALNativeAuthChallengeTypes = [.OOB, .password],
76+
customAuthorityURLFormat: AuthorityURLFormat? = nil
7577
) -> MSALNativeAuthPublicClientApplication? {
7678
let clientIdKey = getClientIdKey(type: clientIdType)
77-
guard let clientId = MSALNativeAuthEndToEndBaseTestCase.nativeAuthConfFileContent?[clientIdKey] as? String, let tenantSubdomain = MSALNativeAuthEndToEndBaseTestCase.nativeAuthConfFileContent?[Constants.tenantSubdomainKey] as? String else {
78-
XCTFail("ClientId or tenantSubdomain not found in conf.json")
79+
guard let clientId = MSALNativeAuthEndToEndBaseTestCase.nativeAuthConfFileContent?[clientIdKey] as? String else {
80+
XCTFail("ClientId not found in conf.json")
7981
return nil
8082
}
81-
return try? MSALNativeAuthPublicClientApplication(clientId: clientId, tenantSubdomain: tenantSubdomain, challengeTypes: challengeTypes)
83+
84+
guard let tenantSubdomain = MSALNativeAuthEndToEndBaseTestCase.nativeAuthConfFileContent?[Constants.tenantSubdomainKey] as? String else {
85+
XCTFail("TenantSubdomain not found in conf.json")
86+
return nil
87+
}
88+
89+
guard let tenantId = MSALNativeAuthEndToEndBaseTestCase.nativeAuthConfFileContent?[Constants.tenantIdKey] as? String else {
90+
XCTFail("TenantId not found in conf.json")
91+
return nil
92+
}
93+
94+
95+
if let customAuthorityURLFormat = customAuthorityURLFormat {
96+
let customSubdomain = getAuthorityURLString(
97+
tenantSubdomain: tenantSubdomain,
98+
tenantId: tenantId,
99+
format: customAuthorityURLFormat
100+
)
101+
102+
let authority = try? MSALCIAMAuthority(
103+
url: URL(string: customSubdomain)!,
104+
validateFormat: false
105+
)
106+
107+
let configuration = MSALPublicClientApplicationConfig(
108+
clientId: clientId,
109+
redirectUri: nil,
110+
authority: authority
111+
)
112+
113+
return try? MSALNativeAuthPublicClientApplication(
114+
configuration: configuration,
115+
challengeTypes: challengeTypes
116+
)
117+
} else {
118+
return try? MSALNativeAuthPublicClientApplication(
119+
clientId: clientId,
120+
tenantSubdomain: tenantSubdomain,
121+
challengeTypes: challengeTypes
122+
)
123+
}
82124
}
83125

84126
func generateSignUpRandomEmail() -> String {
@@ -129,4 +171,15 @@ class MSALNativeAuthEndToEndBaseTestCase: XCTestCase {
129171
return Constants.clientIdEmailCodeAttributesKey
130172
}
131173
}
174+
175+
private func getAuthorityURLString(tenantSubdomain: String, tenantId: String, format: AuthorityURLFormat) -> String {
176+
switch format {
177+
case .tenantSubdomainShortVersion:
178+
return String(format: "https://%@.ciamlogin.com/", tenantSubdomain)
179+
case .tenantSubdomainLongVersion:
180+
return String(format: "https://%@.ciamlogin.com/%@.onmicrosoft.com", tenantSubdomain, tenantSubdomain)
181+
case .tenantSubdomainTenantId:
182+
return String(format: "https://%@.ciamlogin.com/%@", tenantSubdomain, tenantId)
183+
}
184+
}
132185
}

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

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

3131
func test_signInUsingPasswordWithMFASubmitWrongChallengeResendChallengeThen_completeSuccessfully() async throws {
32+
throw XCTSkip("Retrieving OTP failure")
33+
#if os(macOS)
34+
throw XCTSkip("For some reason this test now requires Keychain access, reason needs to be investigated")
35+
#endif
3236
guard let username = retrieveUsernameForSignInUsernamePasswordAndMFA(),
3337
let password = await retrievePasswordForSignInUsername(),
3438
let awaitingMFAState = await signInUsernameAndPassword(username: username, password: password)
@@ -85,6 +89,10 @@ final class MSALNativeAuthSignInWithMFAEndToEndTests: MSALNativeAuthEndToEndPass
8589
}
8690

8791
func test_signInUsingPasswordWithMFAGetAuthMethods_thenCompleteSuccessfully() async throws {
92+
throw XCTSkip("Retrieving OTP failure")
93+
#if os(macOS)
94+
throw XCTSkip("For some reason this test now requires Keychain access, reason needs to be investigated")
95+
#endif
8896
guard let username = retrieveUsernameForSignInUsernamePasswordAndMFA(),
8997
let password = await retrievePasswordForSignInUsername(),
9098
let awaitingMFAState = await signInUsernameAndPassword(username: username, password: password)
@@ -140,6 +148,10 @@ final class MSALNativeAuthSignInWithMFAEndToEndTests: MSALNativeAuthEndToEndPass
140148
}
141149

142150
func test_signInUsingPasswordWithMFANoDefaultAuthMethod_completeSuccessfully() async throws {
151+
throw XCTSkip("Retrieving OTP failure")
152+
#if os(macOS)
153+
throw XCTSkip("For some reason this test now requires Keychain access, reason needs to be investigated")
154+
#endif
143155
guard let username = retrieveUsernameForSignInUsernamePasswordAndMFANoDefaultAuthMethod(),
144156
let password = await retrievePasswordForSignInUsername(),
145157
let awaitingMFAState = await signInUsernameAndPassword(username: username, password: password)

0 commit comments

Comments
 (0)