Skip to content

Commit 0c732f9

Browse files
Remove jwks from auth storage (#461)
* Remove jwks from auth storage * Remove jwks endpoint from storage
1 parent dcad93e commit 0c732f9

File tree

3 files changed

+0
-14
lines changed

3 files changed

+0
-14
lines changed

internal/pkg/auth/auth_test.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ func TestAuthenticationConfig(t *testing.T) {
7070
saKey string
7171
privateKeySet bool
7272
tokenEndpoint string
73-
jwksEndpoint string
7473
isValid bool
7574
expectedCustomAuthSet bool
7675
expectedTokenSet bool
@@ -102,7 +101,6 @@ func TestAuthenticationConfig(t *testing.T) {
102101
saKey: testServiceAccountKey,
103102
privateKeySet: true,
104103
tokenEndpoint: "token_url",
105-
jwksEndpoint: "jwks_url",
106104
isValid: true,
107105
expectedCustomAuthSet: true,
108106
},
@@ -115,7 +113,6 @@ func TestAuthenticationConfig(t *testing.T) {
115113
saKey: testServiceAccountKey,
116114
privateKeySet: true,
117115
tokenEndpoint: "token_url",
118-
jwksEndpoint: "jwks_url",
119116
isValid: false,
120117
},
121118
{
@@ -180,7 +177,6 @@ func TestAuthenticationConfig(t *testing.T) {
180177
authFields[REFRESH_TOKEN] = tt.refreshToken
181178
authFields[SERVICE_ACCOUNT_KEY] = tt.saKey
182179
authFields[TOKEN_CUSTOM_ENDPOINT] = tt.tokenEndpoint
183-
authFields[JWKS_CUSTOM_ENDPOINT] = tt.jwksEndpoint
184180

185181
err = SetAuthFlow(tt.flow)
186182
if err != nil {
@@ -245,7 +241,6 @@ func TestInitKeyFlow(t *testing.T) {
245241
saKey string
246242
privateKeySet bool
247243
tokenEndpoint string
248-
jwksEndpoint string
249244
isValid bool
250245
}{
251246
{
@@ -255,7 +250,6 @@ func TestInitKeyFlow(t *testing.T) {
255250
saKey: testServiceAccountKey,
256251
privateKeySet: true,
257252
tokenEndpoint: "token_url",
258-
jwksEndpoint: "jwks_url",
259253
isValid: true,
260254
},
261255
{
@@ -265,7 +259,6 @@ func TestInitKeyFlow(t *testing.T) {
265259
saKey: "",
266260
privateKeySet: true,
267261
tokenEndpoint: "token_url",
268-
jwksEndpoint: "jwks_url",
269262
isValid: false,
270263
},
271264
{
@@ -275,7 +268,6 @@ func TestInitKeyFlow(t *testing.T) {
275268
saKey: testServiceAccountKey,
276269
privateKeySet: false,
277270
tokenEndpoint: "token_url",
278-
jwksEndpoint: "jwks_url",
279271
isValid: false,
280272
},
281273
{
@@ -285,7 +277,6 @@ func TestInitKeyFlow(t *testing.T) {
285277
saKey: testServiceAccountKey,
286278
privateKeySet: true,
287279
tokenEndpoint: "token_url",
288-
jwksEndpoint: "jwks_url",
289280
isValid: false,
290281
},
291282
{
@@ -295,7 +286,6 @@ func TestInitKeyFlow(t *testing.T) {
295286
saKey: testServiceAccountKey,
296287
privateKeySet: true,
297288
tokenEndpoint: "token_url",
298-
jwksEndpoint: "jwks_url",
299289
isValid: false,
300290
},
301291
}
@@ -326,7 +316,6 @@ func TestInitKeyFlow(t *testing.T) {
326316
authFields[REFRESH_TOKEN] = tt.refreshToken
327317
authFields[SERVICE_ACCOUNT_KEY] = tt.saKey
328318
authFields[TOKEN_CUSTOM_ENDPOINT] = tt.tokenEndpoint
329-
authFields[JWKS_CUSTOM_ENDPOINT] = tt.jwksEndpoint
330319
err = SetAuthFieldMap(authFields)
331320
if err != nil {
332321
t.Fatalf("Failed to set in auth storage: %v", err)

internal/pkg/auth/service_account.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ func initKeyFlowWithStorage() (*keyFlowWithStorage, error) {
102102
SERVICE_ACCOUNT_KEY: "",
103103
PRIVATE_KEY: "",
104104
TOKEN_CUSTOM_ENDPOINT: "",
105-
JWKS_CUSTOM_ENDPOINT: "",
106105
}
107106
err := GetAuthFieldMap(authFields)
108107
if err != nil {

internal/pkg/auth/storage.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ const (
3737
SERVICE_ACCOUNT_KEY authFieldKey = "service_account_key"
3838
PRIVATE_KEY authFieldKey = "private_key"
3939
TOKEN_CUSTOM_ENDPOINT authFieldKey = "token_custom_endpoint"
40-
JWKS_CUSTOM_ENDPOINT authFieldKey = "jwks_custom_endpoint"
4140
)
4241

4342
const (
@@ -58,7 +57,6 @@ var authFieldKeys = []authFieldKey{
5857
SERVICE_ACCOUNT_KEY,
5958
PRIVATE_KEY,
6059
TOKEN_CUSTOM_ENDPOINT,
61-
JWKS_CUSTOM_ENDPOINT,
6260
authFlowType,
6361
}
6462

0 commit comments

Comments
 (0)