File tree Expand file tree Collapse file tree 4 files changed +24
-10
lines changed
charts/jwt-nginx-ext-auth Expand file tree Collapse file tree 4 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type: application
15
15
# This is the chart version. This version number should be incremented each time you make changes
16
16
# to the chart and its templates, including the app version.
17
17
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18
- version : 0.0.1
18
+ version : 0.0.2
19
19
20
20
# This is the version number of the application being deployed. This version number should be
21
21
# incremented each time you make changes to the application. Versions are not expected to
Original file line number Diff line number Diff line change 32
32
{{- toYaml .Values.podSecurityContext | nindent 8 }}
33
33
containers :
34
34
- name : {{ .Chart.Name }}
35
+ env :
36
+ - name : OIDC_DISCOVERY_URL
37
+ value : {{ .Values.oidcConfig.discoveryUrl }}
38
+ - name : JWKS_URI
39
+ value : {{ .Values.oidcConfig.jwksUri }}
40
+ - name : JWT_ISSUER
41
+ value : {{ .Values.oidcConfig.jwtIssuer }}
42
+ - name : JWT_AUDIENCE
43
+ value : {{ .Values.oidcConfig.jwtAudience }}
44
+ - name : JWT_HEADER
45
+ value : {{ .Values.oidcConfig.jwtHeader }}
46
+ - name : PORT
47
+ value : " {{ .Values.service.port }}"
35
48
securityContext :
36
49
{{- toYaml .Values.securityContext | nindent 12 }}
37
50
image : " {{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
40
53
- name : http
41
54
containerPort : {{ .Values.service.port }}
42
55
protocol : TCP
43
- livenessProbe :
44
- httpGet :
45
- path : /
46
- port : http
47
- readinessProbe :
48
- httpGet :
49
- path : /
50
- port : http
51
56
resources :
52
57
{{- toYaml .Values.resources | nindent 12 }}
53
58
{{- with .Values.volumeMounts }}
Original file line number Diff line number Diff line change @@ -14,6 +14,13 @@ imagePullSecrets: []
14
14
nameOverride : " "
15
15
fullnameOverride : " "
16
16
17
+ oidcConfig :
18
+ discoveryUri : " "
19
+ jwksUri : " "
20
+ jwtIssuer : " "
21
+ jwtAudience : " "
22
+ jwtHeader : " authorization"
23
+
17
24
serviceAccount :
18
25
# Specifies whether a service account should be created
19
26
create : true
Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ if (process.env.OIDC_DISCOVERY_URI) {
12
12
jwks_uri : string ;
13
13
issuer : string ;
14
14
} ;
15
+ console . log ( "Discovered JWKS_URI" , discoveryJson . jwks_uri ) ;
16
+ console . log ( "Discovered issuer" , discoveryJson . issuer ) ;
15
17
process . env . JWKS_URI = discoveryJson . jwks_uri ;
16
18
process . env . JWT_ISSUER = discoveryJson . issuer ;
17
19
}
@@ -31,7 +33,7 @@ fastify.get<{
31
33
authorization : string ;
32
34
} ;
33
35
} > ( "/" , async ( request , reply ) => {
34
- const header = process . env . JWT_HEADER ?? "authorization" ;
36
+ const header = ( process . env . JWT_HEADER ?? "authorization" ) . toLowerCase ( ) ;
35
37
if ( ! request . headers [ header ] ) {
36
38
reply . status ( 401 ) . send ( { error : "Unauthorized" } ) ;
37
39
return ;
You can’t perform that action at this time.
0 commit comments