Skip to content

Commit 8d007df

Browse files
authored
Merge pull request #870 from AzureAD/akaliugonna/broker-test-changes
broker integration tests fix
2 parents 081341c + 3dba52b commit 8d007df

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

msal4j-brokers/src/test/java/labapi/KeyVaultSecretsProvider.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@
2424
public class KeyVaultSecretsProvider {
2525
private final SecretClient secretClient;
2626

27-
private static final String CLIENT_ID = "2afb0add-2f32-4946-ac90-81a02aa4550e";
28-
public static String CERTIFICATE_ALIAS = "MsalJavaAutomationRunner";
27+
public final static String CLIENT_ID = "f62c5ae3-bf3a-4af5-afa8-a68b800396e9";
28+
public static String CERTIFICATE_ALIAS = "LabAuth.MSIDLab.com";
2929

3030
private static final String WIN_KEYSTORE = "Windows-MY";
3131
private static final String KEYSTORE_PROVIDER = "SunMSCAPI";
@@ -66,7 +66,7 @@ private AccessToken requestAccessTokenForAutomation() {
6666
ConfidentialClientApplication cca =
6767
ConfidentialClientApplication
6868
.builder(CLIENT_ID, getClientCredentialFromKeyStore())
69-
.authority(LabConstants.MICROSOFT_AUTHORITY)
69+
.authority(LabConstants.MICROSOFT_AUTHORITY).sendX5c(true)
7070
.build();
7171
result = cca.acquireToken(ClientCredentialParameters
7272
.builder(Collections.singleton(
@@ -85,7 +85,7 @@ private AccessToken requestAccessTokenForAutomation() {
8585
}
8686
}
8787

88-
private IClientCredential getClientCredentialFromKeyStore() {
88+
public IClientCredential getClientCredentialFromKeyStore() {
8989
PrivateKey key;
9090
X509Certificate publicCertificate;
9191
try {

msal4j-brokers/src/test/java/labapi/LabConstants.java

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

66
public class LabConstants {
77
public final static String KEYVAULT_DEFAULT_SCOPE = "https://vault.azure.net/.default";
8-
public final static String MSIDLAB_DEFAULT_SCOPE = "https://msidlab.com/.default";
8+
public final static String MSIDLAB_DEFAULT_SCOPE = "https://request.msidlab.com/.default";
99
public final static String MSIDLAB_VAULT_URL = "https://msidlabs.vault.azure.net/";
1010

1111
public final static String MICROSOFT_AUTHORITY =

msal4j-brokers/src/test/java/labapi/LabService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,9 @@ static void initLabApp() throws MalformedURLException {
3434
KeyVaultSecretsProvider keyVaultSecretsProvider = new KeyVaultSecretsProvider();
3535

3636
String appID = keyVaultSecretsProvider.getSecret(LabConstants.APP_ID_KEY_VAULT_SECRET);
37-
String appSecret =
38-
keyVaultSecretsProvider.getSecret(LabConstants.APP_PASSWORD_KEY_VAULT_SECRET);
3937

4038
labApp = ConfidentialClientApplication
41-
.builder(appID, ClientCredentialFactory.createFromSecret(appSecret))
39+
.builder(appID, keyVaultSecretsProvider.getClientCredentialFromKeyStore())
4240
.authority(LabConstants.MICROSOFT_AUTHORITY)
4341
.build();
4442
}

msal4j-sdk/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@
304304
<plugin>
305305
<groupId>org.apache.maven.plugins</groupId>
306306
<artifactId>maven-failsafe-plugin</artifactId>
307-
<version>2.22.1</version>
307+
<version>3.5.0</version>
308308
<executions>
309309
<execution>
310310
<goals>

0 commit comments

Comments
 (0)