Skip to content

Commit 2a3a938

Browse files
committed
fix
Signed-off-by: Jeongwoo Kim - jekim <[email protected]>
1 parent 7146807 commit 2a3a938

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

libs/java/instance_provider/src/main/java/com/yahoo/athenz/instance/provider/impl/InstanceGithubActionsProvider.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public void initializeFromFilePath() throws ProviderResourceException {
111111
(String) prop.get(KEY_PROVIDER_DNS_SUFFIX),
112112
(String) prop.get(KEY_AUDIENCE),
113113
(String) prop.get(KEY_ENTERPRISE),
114-
extractGitHubIssuerJwksUri((String) prop.get(KEY_JWKS_URI))
114+
extractGitHubIssuerJwksUri(issuer, (String) prop.get(KEY_JWKS_URI))
115115
);
116116
}
117117

@@ -148,7 +148,7 @@ public void initialize(String provider, String providerEndpoint, SSLContext sslC
148148
System.getProperty(GITHUB_ACTIONS_PROP_PROVIDER_DNS_SUFFIX, "github-actions.athenz.io"), // determine the dns suffix. if this is not specified we'll just default to github-actions.athenz.cloud
149149
System.getProperty(GITHUB_ACTIONS_PROP_AUDIENCE, "athenz.io"), // lookup the zts audience. if not specified we'll default to athenz.io
150150
System.getProperty(GITHUB_ACTIONS_PROP_ENTERPRISE), // determine if we're running in enterprise mode
151-
extractGitHubIssuerJwksUri(githubIssuer)
151+
extractGitHubIssuerJwksUri(githubIssuer, System.getProperty(GITHUB_ACTIONS_PROP_JWKS_URI))
152152
);
153153

154154
try {
@@ -158,12 +158,10 @@ public void initialize(String provider, String providerEndpoint, SSLContext sslC
158158
}
159159
}
160160

161-
// TODO: Accept issuer + jwkUri as parameters:
162-
String extractGitHubIssuerJwksUri(final String issuer) {
161+
String extractGitHubIssuerJwksUri(final String issuer, String jwksUri) {
163162

164163
// if we have the value configured then that's what we're going to use
165164

166-
String jwksUri = System.getProperty(GITHUB_ACTIONS_PROP_JWKS_URI);
167165
if (!StringUtil.isEmpty(jwksUri)) {
168166
return jwksUri;
169167
}

0 commit comments

Comments
 (0)