File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed
msal4j-brokers/src/test/java/labapi Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 24
24
public class KeyVaultSecretsProvider {
25
25
private final SecretClient secretClient ;
26
26
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 " ;
29
29
30
30
private static final String WIN_KEYSTORE = "Windows-MY" ;
31
31
private static final String KEYSTORE_PROVIDER = "SunMSCAPI" ;
@@ -66,7 +66,7 @@ private AccessToken requestAccessTokenForAutomation() {
66
66
ConfidentialClientApplication cca =
67
67
ConfidentialClientApplication
68
68
.builder (CLIENT_ID , getClientCredentialFromKeyStore ())
69
- .authority (LabConstants .MICROSOFT_AUTHORITY )
69
+ .authority (LabConstants .MICROSOFT_AUTHORITY ). sendX5c ( true )
70
70
.build ();
71
71
result = cca .acquireToken (ClientCredentialParameters
72
72
.builder (Collections .singleton (
@@ -85,7 +85,7 @@ private AccessToken requestAccessTokenForAutomation() {
85
85
}
86
86
}
87
87
88
- private IClientCredential getClientCredentialFromKeyStore () {
88
+ public IClientCredential getClientCredentialFromKeyStore () {
89
89
PrivateKey key ;
90
90
X509Certificate publicCertificate ;
91
91
try {
Original file line number Diff line number Diff line change 5
5
6
6
public class LabConstants {
7
7
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" ;
9
9
public final static String MSIDLAB_VAULT_URL = "https://msidlabs.vault.azure.net/" ;
10
10
11
11
public final static String MICROSOFT_AUTHORITY =
Original file line number Diff line number Diff line change @@ -34,11 +34,9 @@ static void initLabApp() throws MalformedURLException {
34
34
KeyVaultSecretsProvider keyVaultSecretsProvider = new KeyVaultSecretsProvider ();
35
35
36
36
String appID = keyVaultSecretsProvider .getSecret (LabConstants .APP_ID_KEY_VAULT_SECRET );
37
- String appSecret =
38
- keyVaultSecretsProvider .getSecret (LabConstants .APP_PASSWORD_KEY_VAULT_SECRET );
39
37
40
38
labApp = ConfidentialClientApplication
41
- .builder (appID , ClientCredentialFactory . createFromSecret ( appSecret ))
39
+ .builder (appID , keyVaultSecretsProvider . getClientCredentialFromKeyStore ( ))
42
40
.authority (LabConstants .MICROSOFT_AUTHORITY )
43
41
.build ();
44
42
}
Original file line number Diff line number Diff line change 304
304
<plugin >
305
305
<groupId >org.apache.maven.plugins</groupId >
306
306
<artifactId >maven-failsafe-plugin</artifactId >
307
- <version >2.22.1 </version >
307
+ <version >3.5.0 </version >
308
308
<executions >
309
309
<execution >
310
310
<goals >
You can’t perform that action at this time.
0 commit comments