File tree Expand file tree Collapse file tree 5 files changed +14
-5
lines changed
charts/lfx-v2-query-service Expand file tree Collapse file tree 5 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ permissions:
1212jobs :
1313 license-header-check :
1414 name : License Header Check
15- uses : linuxfoundation/lfx-public-workflows/.github/workflows/license-header-check.yml@main
15+ uses : linuxfoundation/lfx-public-workflows/.github/workflows/license-header-check.yml@c465d6571fa0b8be9d551d902955164ea04a00af
1616 with :
1717 copyright_line : " Copyright The Linux Foundation and each contributor to LFX."
1818 exclude_pattern : " gen/*"
Original file line number Diff line number Diff line change @@ -5,5 +5,5 @@ apiVersion: v2
55name : lfx-v2-query-service
66description : LFX Platform V2 Query Service chart
77type : application
8- version : 0.2.1
8+ version : 0.2.2
99appVersion : " latest"
Original file line number Diff line number Diff line change 3232 key : PAGE_TOKEN_SECRET
3333 - name : JWKS_URL
3434 value : {{ .Values.jwks.url }}
35+ - name : JWT_SIGNATURE_ALGORITHM
36+ value : {{ .Values.jwt.signatureAlgorithm | default "PS256" }}
3537 envFrom :
3638 - secretRef :
3739 name : {{ .Values.secret.name }}
Original file line number Diff line number Diff line change @@ -59,3 +59,5 @@ secret:
5959
6060jwks :
6161 url : http://lfx-platform-heimdall:4457/.well-known/jwks
62+ jwt :
63+ signatureAlgorithm : PS256
Original file line number Diff line number Diff line change @@ -19,9 +19,10 @@ import (
1919
2020const (
2121 // PS256 is the default for Heimdall's JWT finalizer.
22- signatureAlgorithm = validator .PS256
23- defaultIssuer = "heimdall"
24- defaultAudience = "lfx-v2-query-service"
22+ ps256 = validator .PS256
23+ rs256 = validator .RS256
24+ defaultIssuer = "heimdall"
25+ defaultAudience = "lfx-v2-query-service"
2526)
2627
2728var (
@@ -75,6 +76,10 @@ func SetupJWTAuth(ctx context.Context) {
7576 }
7677 provider := jwks .NewCachingProvider (issuer , 5 * time .Minute , jwks .WithCustomJWKSURI (jwksURL ))
7778
79+ signatureAlgorithm := ps256
80+ if os .Getenv ("JWT_SIGNATURE_ALGORITHM" ) == "RS256" {
81+ signatureAlgorithm = rs256
82+ }
7883 // Set up the JWT validator.
7984 audience := os .Getenv ("AUDIENCE" )
8085 if audience == "" {
You can’t perform that action at this time.
0 commit comments