Skip to content

Commit 7e8874b

Browse files
committed
2 parents 6d69d9e + 52ed200 commit 7e8874b

30 files changed

+227
-182
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Quick links:
1616
The library supports the following Java environments:
1717
- Java 8 (or higher)
1818

19-
Current version - 1.15.0
19+
Current version - 1.15.1
2020

2121
You can find the changes for each version in the [change log](https://github.com/AzureAD/microsoft-authentication-library-for-java/blob/main/msal4j-sdk/changelog.txt).
2222

@@ -28,13 +28,13 @@ Find [the latest package in the Maven repository](https://mvnrepository.com/arti
2828
<dependency>
2929
<groupId>com.microsoft.azure</groupId>
3030
<artifactId>msal4j</artifactId>
31-
<version>1.15.0</version>
31+
<version>1.15.1</version>
3232
</dependency>
3333
```
3434
### Gradle
3535

3636
```gradle
37-
implementation group: 'com.microsoft.azure', name: 'com.microsoft.aad.msal4j', version: '1.15.0'
37+
implementation group: 'com.microsoft.azure', name: 'com.microsoft.aad.msal4j', version: '1.15.1'
3838
```
3939

4040
## Usage

changelog.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
Version 1.15.1
2+
=============
3+
- Fix to correctly use custom SSLSocketFactory (#821)
4+
- Add public API to determine the Managed Identity environment (#823)
5+
16
Version 1.15.0
27
=============
38
- GA support for Azure managed identity scenarios

msal4j-sdk/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Quick links:
1616
The library supports the following Java environments:
1717
- Java 8 (or higher)
1818

19-
Current version - 1.15.0
19+
Current version - 1.15.1
2020

2121
You can find the changes for each version in the [change log](https://github.com/AzureAD/microsoft-authentication-library-for-java/blob/master/changelog.txt).
2222

@@ -28,13 +28,13 @@ Find [the latest package in the Maven repository](https://mvnrepository.com/arti
2828
<dependency>
2929
<groupId>com.microsoft.azure</groupId>
3030
<artifactId>msal4j</artifactId>
31-
<version>1.15.0</version>
31+
<version>1.15.1</version>
3232
</dependency>
3333
```
3434
### Gradle
3535

3636
```gradle
37-
compile group: 'com.microsoft.azure', name: 'msal4j', version: '1.15.0'
37+
compile group: 'com.microsoft.azure', name: 'msal4j', version: '1.15.1'
3838
```
3939

4040
## Usage

msal4j-sdk/bnd.bnd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
Export-Package: com.microsoft.aad.msal4j;version="1.15.0"
1+
Export-Package: com.microsoft.aad.msal4j;version="1.15.1"
22
Automatic-Module-Name: com.microsoft.aad.msal4j

msal4j-sdk/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>com.microsoft.azure</groupId>
55
<artifactId>msal4j</artifactId>
6-
<version>1.15.0</version>
6+
<version>1.15.1</version>
77
<packaging>jar</packaging>
88
<name>msal4j</name>
99
<description>

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/AcquireTokenInteractiveIT.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -80,24 +80,6 @@ void acquireTokenInteractive_ADFSv4_Federated(String environment) {
8080
assertAcquireTokenCommon(user, cfg.organizationsAuthority(), cfg.graphDefaultScope());
8181
}
8282

83-
@ParameterizedTest
84-
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
85-
void acquireTokenInteractive_ADFSv3_Federated(String environment) {
86-
cfg = new Config(environment);
87-
88-
User user = labUserProvider.getFederatedAdfsUser(cfg.azureEnvironment, FederationProvider.ADFS_3);
89-
assertAcquireTokenCommon(user, cfg.organizationsAuthority(), cfg.graphDefaultScope());
90-
}
91-
92-
@ParameterizedTest
93-
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
94-
void acquireTokenInteractive_ADFSv2_Federated(String environment) {
95-
cfg = new Config(environment);
96-
97-
User user = labUserProvider.getFederatedAdfsUser(cfg.azureEnvironment, FederationProvider.ADFS_2);
98-
assertAcquireTokenCommon(user, cfg.organizationsAuthority(), cfg.graphDefaultScope());
99-
}
100-
10183
@ParameterizedTest
10284
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
10385
void acquireTokenWithAuthorizationCode_B2C_Local(String environment) {

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/AuthorizationCodeIT.java

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -81,24 +81,6 @@ public void acquireTokenWithAuthorizationCode_ADFSv4_Federated(String environmen
8181
assertAcquireTokenAAD(user, null);
8282
}
8383

84-
@ParameterizedTest
85-
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
86-
public void acquireTokenWithAuthorizationCode_ADFSv3_Federated(String environment) {
87-
cfg = new Config(environment);
88-
89-
User user = labUserProvider.getFederatedAdfsUser(cfg.azureEnvironment, FederationProvider.ADFS_3);
90-
assertAcquireTokenAAD(user, null);
91-
}
92-
93-
@ParameterizedTest
94-
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
95-
public void acquireTokenWithAuthorizationCode_ADFSv2_Federated(String environment) {
96-
cfg = new Config(environment);
97-
98-
User user = labUserProvider.getFederatedAdfsUser(cfg.azureEnvironment, FederationProvider.ADFS_2);
99-
assertAcquireTokenAAD(user, null);
100-
}
101-
10284
@ParameterizedTest
10385
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
10486
public void acquireTokenWithAuthorizationCode_B2C_Local(String environment) {

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/ClientCredentialsIT.java

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ void init() throws CertificateException, UnrecoverableKeyException, NoSuchAlgori
4040

4141
@Test
4242
void acquireTokenClientCredentials_ClientCertificate() throws Exception {
43-
String clientId = "2afb0add-2f32-4946-ac90-81a02aa4550e";
43+
String clientId = TestConstants.MSIDLAB_CLIENT_ID;
4444
assertAcquireTokenCommon(clientId, certificate, TestConstants.MICROSOFT_AUTHORITY);
4545
}
4646

@@ -49,14 +49,14 @@ void acquireTokenClientCredentials_ClientSecret() throws Exception {
4949
AppCredentialProvider appProvider = new AppCredentialProvider(AzureEnvironment.AZURE);
5050
final String clientId = appProvider.getLabVaultAppId();
5151
final String password = appProvider.getLabVaultPassword();
52-
IClientCredential credential = ClientCredentialFactory.createFromSecret(password);
52+
IClientCredential credential = CertificateHelper.getClientCertificate();
5353

5454
assertAcquireTokenCommon(clientId, credential, TestConstants.MICROSOFT_AUTHORITY);
5555
}
5656

5757
@Test
5858
void acquireTokenClientCredentials_ClientAssertion() throws Exception {
59-
String clientId = "2afb0add-2f32-4946-ac90-81a02aa4550e";
59+
String clientId = TestConstants.MSIDLAB_CLIENT_ID;
6060

6161
ClientAssertion clientAssertion = getClientAssertion(clientId);
6262

@@ -90,7 +90,7 @@ void acquireTokenClientCredentials_ClientSecret_Ciam() throws Exception {
9090

9191
@Test
9292
void acquireTokenClientCredentials_Callback() throws Exception {
93-
String clientId = "2afb0add-2f32-4946-ac90-81a02aa4550e";
93+
String clientId = TestConstants.MSIDLAB_CLIENT_ID;
9494

9595
// Creates a valid client assertion using a callback, and uses it to build the client app and make a request
9696
Callable<String> callable = () -> {
@@ -116,11 +116,9 @@ void acquireTokenClientCredentials_Callback() throws Exception {
116116
void acquireTokenClientCredentials_DefaultCacheLookup() throws Exception {
117117
AppCredentialProvider appProvider = new AppCredentialProvider(AzureEnvironment.AZURE);
118118
final String clientId = appProvider.getLabVaultAppId();
119-
final String password = appProvider.getLabVaultPassword();
120-
IClientCredential credential = ClientCredentialFactory.createFromSecret(password);
121119

122120
ConfidentialClientApplication cca = ConfidentialClientApplication.builder(
123-
clientId, credential).
121+
clientId, CertificateHelper.getClientCertificate()).
124122
authority(TestConstants.MICROSOFT_AUTHORITY).
125123
build();
126124

@@ -152,7 +150,7 @@ void acquireTokenClientCredentials_DefaultCacheLookup() throws Exception {
152150

153151
@Test
154152
void acquireTokenClientCredentials_Regional() throws Exception {
155-
String clientId = "2afb0add-2f32-4946-ac90-81a02aa4550e";
153+
String clientId = TestConstants.MSIDLAB_CLIENT_ID;
156154

157155
assertAcquireTokenCommon_withRegion(clientId, certificate, "westus", TestConstants.REGIONAL_MICROSOFT_AUTHORITY_BASIC_HOST_WESTUS);
158156
}

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/TestConstants.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
public class TestConstants {
1111
public final static String KEYVAULT_DEFAULT_SCOPE = "https://vault.azure.net/.default";
12-
public final static String MSIDLAB_DEFAULT_SCOPE = "https://msidlab.com/.default";
12+
public final static String MSIDLAB_DEFAULT_SCOPE = "https://request.msidlab.com/.default";
1313
public final static String MSIDLAB_VAULT_URL = "https://msidlabs.vault.azure.net/";
14+
public final static String MSIDLAB_CLIENT_ID = "f62c5ae3-bf3a-4af5-afa8-a68b800396e9";
1415
public final static String GRAPH_DEFAULT_SCOPE = "https://graph.windows.net/.default";
1516
public final static String USER_READ_SCOPE = "user.read";
1617
public final static String DEFAULT_SCOPE = ".default";
@@ -54,6 +55,7 @@ public class TestConstants {
5455
public final static String B2C_READ_SCOPE = "https://msidlabb2c.onmicrosoft.com/msidlabb2capi/read";
5556
public final static String B2C_MICROSOFTLOGIN_AUTHORITY = "https://msidlabb2c.b2clogin.com/tfp/msidlabb2c.onmicrosoft.com/";
5657
public final static String B2C_MICROSOFTLOGIN_ROPC = B2C_MICROSOFTLOGIN_AUTHORITY + B2C_ROPC_POLICY;
58+
public final static String B2C_UPN = "[email protected]";
5759

5860
public final static String LOCALHOST = "http://localhost:";
5961

msal4j-sdk/src/integrationtest/java/com.microsoft.aad.msal4j/UsernamePasswordIT.java

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -78,36 +78,6 @@ void acquireTokenWithUsernamePassword_ADFSv4(String environment) throws Exceptio
7878
assertAcquireTokenCommon(user, cfg.organizationsAuthority(), cfg.graphDefaultScope(), user.getAppId());
7979
}
8080

81-
@ParameterizedTest
82-
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
83-
void acquireTokenWithUsernamePassword_ADFSv3(String environment) throws Exception {
84-
cfg = new Config(environment);
85-
86-
UserQueryParameters query = new UserQueryParameters();
87-
query.parameters.put(UserQueryParameters.AZURE_ENVIRONMENT, cfg.azureEnvironment);
88-
query.parameters.put(UserQueryParameters.FEDERATION_PROVIDER, FederationProvider.ADFS_3);
89-
query.parameters.put(UserQueryParameters.USER_TYPE, UserType.FEDERATED);
90-
91-
User user = labUserProvider.getLabUser(query);
92-
93-
assertAcquireTokenCommon(user, cfg.organizationsAuthority(), cfg.graphDefaultScope(), user.getAppId());
94-
}
95-
96-
@ParameterizedTest
97-
@MethodSource("com.microsoft.aad.msal4j.EnvironmentsProvider#createData")
98-
void acquireTokenWithUsernamePassword_ADFSv2(String environment) throws Exception {
99-
cfg = new Config(environment);
100-
101-
UserQueryParameters query = new UserQueryParameters();
102-
query.parameters.put(UserQueryParameters.AZURE_ENVIRONMENT, cfg.azureEnvironment);
103-
query.parameters.put(UserQueryParameters.FEDERATION_PROVIDER, FederationProvider.ADFS_2);
104-
query.parameters.put(UserQueryParameters.USER_TYPE, UserType.FEDERATED);
105-
106-
User user = labUserProvider.getLabUser(query);
107-
108-
assertAcquireTokenCommonAAD(user);
109-
}
110-
11181
@Test
11282
void acquireTokenWithUsernamePassword_AuthorityWithPort() throws Exception {
11383
User user = labUserProvider.getDefaultUser();

0 commit comments

Comments
 (0)