-
Notifications
You must be signed in to change notification settings - Fork 322
/
crd-jwtproviders.yaml
375 lines (339 loc) · 16.7 KB
/
crd-jwtproviders.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
{{- if .Values.connectInject.enabled }}
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
labels:
app: {{ template "consul.name" . }}
chart: {{ template "consul.chart" . }}
heritage: {{ .Release.Service }}
release: {{ .Release.Name }}
component: crd
name: jwtproviders.consul.hashicorp.com
spec:
group: consul.hashicorp.com
names:
kind: JWTProvider
listKind: JWTProviderList
plural: jwtproviders
singular: jwtprovider
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: JWTProvider is the Schema for the jwtproviders API.
properties:
apiVersion:
description: |-
APIVersion defines the versioned schema of this representation of an object.
Servers should convert recognized schemas to the latest internal value, and
may reject unrecognized values.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
type: string
kind:
description: |-
Kind is a string value representing the REST resource this object represents.
Servers may infer this from the endpoint the client submits requests to.
Cannot be updated.
In CamelCase.
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
type: string
metadata:
type: object
spec:
description: JWTProviderSpec defines the desired state of JWTProvider
properties:
audiences:
description: |-
Audiences is the set of audiences the JWT is allowed to access.
If specified, all JWTs verified with this provider must address
at least one of these to be considered valid.
items:
type: string
type: array
cacheConfig:
description: |-
CacheConfig defines configuration for caching the validation
result for previously seen JWTs. Caching results can speed up
verification when individual tokens are expected to be handled
multiple times.
properties:
size:
description: |-
Size specifies the maximum number of JWT verification
results to cache.
Defaults to 0, meaning that JWT caching is disabled.
type: integer
type: object
clockSkewSeconds:
description: |-
ClockSkewSeconds specifies the maximum allowable time difference
from clock skew when validating the "exp" (Expiration) and "nbf"
(Not Before) claims.
Default value is 30 seconds.
type: integer
forwarding:
description: Forwarding defines rules for forwarding verified JWTs
to the backend.
properties:
headerName:
description: |-
HeaderName is a header name to use when forwarding a verified
JWT to the backend. The verified JWT could have been extracted
from any location (query param, header, or cookie).
The header value will be base64-URL-encoded, and will not be
padded unless PadForwardPayloadHeader is true.
type: string
padForwardPayloadHeader:
description: |-
PadForwardPayloadHeader determines whether padding should be added
to the base64 encoded token forwarded with ForwardPayloadHeader.
Default value is false.
type: boolean
type: object
issuer:
description: |-
Issuer is the entity that must have issued the JWT.
This value must match the "iss" claim of the token.
type: string
jsonWebKeySet:
description: |-
JSONWebKeySet defines a JSON Web Key Set, its location on disk, or the
means with which to fetch a key set from a remote server.
properties:
local:
description: Local specifies a local source for the key set.
properties:
filename:
description: |-
Filename configures a location on disk where the JWKS can be
found. If specified, the file must be present on the disk of ALL
proxies with intentions referencing this provider.
type: string
jwks:
description: JWKS contains a base64 encoded JWKS.
type: string
type: object
remote:
description: Remote specifies how to fetch a key set from a remote
server.
properties:
cacheDuration:
description: |-
CacheDuration is the duration after which cached keys
should be expired.
Default value is 5 minutes.
type: string
fetchAsynchronously:
description: |-
FetchAsynchronously indicates that the JWKS should be fetched
when a client request arrives. Client requests will be paused
until the JWKS is fetched.
If false, the proxy listener will wait for the JWKS to be
fetched before being activated.
Default value is false.
type: boolean
jwksCluster:
description: JWKSCluster defines how the specified Remote
JWKS URI is to be fetched.
properties:
connectTimeout:
description: |-
The timeout for new network connections to hosts in the cluster.
If not set, a default value of 5s will be used.
type: string
discoveryType:
description: |-
DiscoveryType refers to the service discovery type to use for resolving the cluster.
This defaults to STRICT_DNS.
Other options include STATIC, LOGICAL_DNS, EDS or ORIGINAL_DST.
type: string
tlsCertificates:
description: |-
TLSCertificates refers to the data containing certificate authority certificates to use
in verifying a presented peer certificate.
If not specified and a peer certificate is presented it will not be verified.
Must be either CaCertificateProviderInstance or TrustedCA.
properties:
caCertificateProviderInstance:
description: CaCertificateProviderInstance Certificate
provider instance for fetching TLS certificates.
properties:
certificateName:
description: |-
CertificateName is used to specify certificate instances or types. For example, "ROOTCA" to specify
a root-certificate (validation context) or "example.com" to specify a certificate for a
particular domain.
The default value is the empty string.
type: string
instanceName:
description: |-
InstanceName refers to the certificate provider instance name.
The default value is "default".
type: string
type: object
trustedCA:
description: |-
TrustedCA defines TLS certificate data containing certificate authority certificates
to use in verifying a presented peer certificate.
Exactly one of Filename, EnvironmentVariable, InlineString or InlineBytes must be specified.
properties:
environmentVariable:
type: string
filename:
type: string
inlineBytes:
format: byte
type: string
inlineString:
type: string
type: object
type: object
type: object
requestTimeoutMs:
description: |-
RequestTimeoutMs is the number of milliseconds to
time out when making a request for the JWKS.
type: integer
retryPolicy:
description: |-
RetryPolicy defines a retry policy for fetching JWKS.
There is no retry by default.
properties:
numRetries:
description: |-
NumRetries is the number of times to retry fetching the JWKS.
The retry strategy uses jittered exponential backoff with
a base interval of 1s and max of 10s.
Default value is 0.
type: integer
retryPolicyBackOff:
description: |-
Retry's backoff policy.
Defaults to Envoy's backoff policy.
properties:
baseInterval:
description: |-
BaseInterval to be used for the next back off computation.
The default value from envoy is 1s.
type: string
maxInterval:
description: |-
MaxInternal to be used to specify the maximum interval between retries.
Optional but should be greater or equal to BaseInterval.
Defaults to 10 times BaseInterval.
type: string
type: object
type: object
uri:
description: URI is the URI of the server to query for the
JWKS.
type: string
type: object
type: object
locations:
description: |-
Locations where the JWT will be present in requests.
Envoy will check all of these locations to extract a JWT.
If no locations are specified Envoy will default to:
1. Authorization header with Bearer schema:
"Authorization: Bearer <token>"
2. accessToken query parameter.
items:
description: |-
JWTLocation is a location where the JWT could be present in requests.
Only one of Header, QueryParam, or Cookie can be specified.
properties:
cookie:
description: Cookie defines how to extract a JWT from an HTTP
request cookie.
properties:
name:
description: Name is the name of the cookie containing the
token.
type: string
type: object
header:
description: Header defines how to extract a JWT from an HTTP
request header.
properties:
forward:
description: |-
Forward defines whether the header with the JWT should be
forwarded after the token has been verified. If false, the
header will not be forwarded to the backend.
Default value is false.
type: boolean
name:
description: Name is the name of the header containing the
token.
type: string
valuePrefix:
description: |-
ValuePrefix is an optional prefix that precedes the token in the
header value.
For example, "Bearer " is a standard value prefix for a header named
"Authorization", but the prefix is not part of the token itself:
"Authorization: Bearer <token>"
type: string
type: object
queryParam:
description: |-
QueryParam defines how to extract a JWT from an HTTP request
query parameter.
properties:
name:
description: Name is the name of the query param containing
the token.
type: string
type: object
type: object
type: array
type: object
status:
properties:
conditions:
description: Conditions indicate the latest available observations
of a resource's current state.
items:
description: |-
Conditions define a readiness condition for a Consul resource.
See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
properties:
lastTransitionTime:
description: LastTransitionTime is the last time the condition
transitioned from one status to another.
format: date-time
type: string
message:
description: A human readable message indicating details about
the transition.
type: string
reason:
description: The reason for the condition's last transition.
type: string
status:
description: Status of the condition, one of True, False, Unknown.
type: string
type:
description: Type of condition.
type: string
required:
- status
- type
type: object
type: array
lastSyncedTime:
description: LastSyncedTime is the last time the resource successfully
synced with Consul.
format: date-time
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
{{- end }}