forked from vectordotdev/vector
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcomponents.cue
More file actions
1348 lines (1150 loc) · 36.6 KB
/
components.cue
File metadata and controls
1348 lines (1150 loc) · 36.6 KB
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
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
package metadata
components: {
// `#Classes` represent various `#Components` classifications.
#Classes: {
_args: kind: string
let Args = _args
// `commonly_used` specifies if the component is commonly used or not.
// Setting this to `true` will surface the component from other,
// less commonly used, components.
commonly_used: bool
if Args.kind == "source" || Args.kind == "sink" {
delivery: #DeliveryStatus
}
if Args.kind == "source" {
// `deployment_roles` clarify when the component should be used under
// different deployment contexts.
deployment_roles: [...#DeploymentRole]
}
development: #DevelopmentStatus
// `egress_method` documents how the component outputs events.
egress_method: #EgressMethod
if Args.kind == "sink" {
// `service_providers` specify the service providers that support
// and host this service. This helps users find relevant sinks.
//
// For example, "AWS" is a service provider for many services, and
// a user on AWS can use this to filter for AWS supported
// components.
service_providers: [string, ...string] | *[]
}
stateful: bool
}
#Component: {
// `kind` specified the component kind. This is set automatically.
kind: #ComponentKind
let Kind = kind
installation?: {
platform_name: string | null
}
configuration: #Schema
// `description` describes the components with a single paragraph. It
// should be 1-3 sentences. It is used for SEO purposes and should be
// full of relevant keywords.
description?: =~"[.]$"
env_vars: #EnvVars
// `alias` is used to register a component's former name when it
// undergoes a name change.
alias?: !=""
// `type` is the component type. This is set automatically.
type: string
// `classes` represent the various classifications for this component
classes: #Classes & {_args: kind: Kind}
#Config: {
...
for k, v in configuration {
"\( k )"?: _ | *null
}
}
#ExampleConfig: {
title: string
configuration: #Config
notes?: string
}
#Example: {
title: string
configuration: #Config
notes?: string
if Kind == "source" {
input: string
}
if Kind != "source" {
input: #Event | [#Event, ...#Event]
}
if Kind == "sink" {
output: string
}
if Kind != "sink" {
output: #Event | [#Event, ...#Event] | null
}
}
// `examples` demonstrates various ways to use the component using an
// input, output, and example configuration.
examples?: [#Example, ...#Example]
// `configuration_examples` demonstrates various ways configure the components. This differs
// from `examples` in that the list should be representative examples of how the component
// can be configured.
//
// This will be used to drive the config examples at the top of each component page in the
// future.
configuration_examples?: [#ExampleConfig, ...#ExampleConfig]
// `features` describes the various supported features of the component.
// Setting these helps to reduce boilerplate.
//
// For example, the `tls` feature will automatically add the appropriate
// `tls` options and `how_it_works` sections.
features: #Features & {_args: {egress_method: classes.egress_method, kind: Kind}}
// `how_it_works` contain sections that further describe the component's
// behavior. This is like a mini-manual for the component and should help
// answer any obvious questions the user might have. Options can link
// to these sections for deeper explanations of behavior.
how_it_works: #HowItWorks
if Kind != "source" {
input: #Input
}
if Kind != "sink" {
// `output` documents output of the component. This is very important
// as it communicate which events and fields are emitted.
output: #OutputData
}
if Kind != "sink" {
outputs: #Outputs
}
// `support` communicates the varying levels of support of the component.
support: #Support & {_args: kind: Kind}
// `title` is the human friendly title for the component.
//
// For example, the `http` sink has a `HTTP` title.
title: string
// Platform-specific policies, e.g. AWS IAM policies, that are
// required or recommended when using the component.
permissions?: iam: [#IAM, ...#IAM]
// Telemetry produced by the component
telemetry: metrics: #MetricOutput
}
// `#ComponentKind` represent the kind of component.
#ComponentKind: "sink" | "source" | "transform"
#Components: [Type=string]: #Component & {
type: Type
}
// `#EgressMethod` specified how a component outputs events.
//
// * `batch` - one or more events at a time
// * `dynamic` - can switch between batch and stream based on configuration.
// * `expose` - exposes data, ex: prometheus_exporter sink
// * `stream` - one event at a time
#EgressMethod: "batch" | "dynamic" | "expose" | "stream"
#Features: {
_args: {
egress_method: string
kind: string
}
let Args = _args
auto_generated: bool | *false
has_auth: bool | *false
if Args.kind == "source" {
acknowledgements: bool
collect?: #FeaturesCollect
generate?: #FeaturesGenerate
multiline: #FeaturesMultiline
codecs?: #FeaturesCodecs
encoding?: #FeaturesEncoding
receive?: #FeaturesReceive
}
if Args.kind == "transform" {
aggregate?: #FeaturesAggregate
convert?: #FeaturesConvert
enrich?: #FeaturesEnrich
filter?: #FeaturesFilter
parse?: #FeaturesParse
program?: #FeaturesProgram
proxy?: #FeaturesProxy
reduce?: #FeaturesReduce
route?: #FeaturesRoute
exclusive_route?: #FeaturesExclusiveRoute
sanitize?: #FeaturesSanitize
shape?: #FeaturesShape
window?: #FeaturesWindow
incremental_to_absolute?: #FeaturesIncrementalToAbsolute
}
if Args.kind == "sink" {
acknowledgements: #FeaturesAcknowledgements
// `buffer` describes how the component buffers data.
buffer: {
enabled: true
}
// `healthcheck` notes if a component offers a healthcheck on boot.
healthcheck: {
enabled: bool
uses_uri?: bool
}
exposes?: #FeaturesExpose
send?: #FeaturesSend & {_args: Args}
}
descriptions: [Name=string]: string
}
#FeaturesAcknowledgements: bool
#FeaturesAggregate: {}
#FeaturesCollect: {
checkpoint: {
enabled: bool
}
from?: {
service: #Service
interface?: #Interface
}
proxy?: #FeaturesProxy
tls?: #FeaturesTLS & {_args: {mode: "connect"}}
}
#FeaturesConvert: {}
#FeaturesEnrich: {
from: service: {
name: string
url: string
versions: string | null
}
}
#FeaturesExpose: {
tls: #FeaturesTLS & {_args: {mode: "accept"}}
for: {
service: #Service
interface?: #Interface
}
}
#FeaturesFilter: {}
#FeaturesGenerate: {}
#FeaturesSendBufferBytes: {
enabled: bool
relevant_when?: string
}
#FeaturesReceiveBufferBytes: {
enabled: bool
relevant_when?: string
}
#FeaturesKeepalive: {
enabled: bool
}
#FeaturesMultiline: {
enabled: bool
}
#FeaturesCodecs: {
enabled: bool
default_framing: string
}
#FeaturesEncoding: {
enabled: bool
}
#FeaturesParse: {
format: {
name: string
url: string | null
versions: string | null
}
}
#FeaturesProgram: {
runtime: #Runtime
}
#FeaturesProxy: {
enabled: bool
}
#FeaturesReceive: {
from?: {
service: #Service
interface?: #Interface
}
keepalive?: #FeaturesKeepalive
receive_buffer_bytes?: #FeaturesReceiveBufferBytes
tls: #FeaturesTLS & {_args: {mode: "accept"}}
}
#FeaturesReduce: {}
#FeaturesRoute: {}
#FeaturesExclusiveRoute: {}
#FeaturesSanitize: {}
#FeaturesShape: {}
#FeaturesWindow: {}
#FeaturesIncrementalToAbsolute: {}
#FeaturesSend: {
_args: {
egress_method: string
kind: string
}
let Args = _args
if Args.egress_method == "batch" || Args.egress_method == "dynamic" {
// `batch` describes how the component batches data. This is only
// relevant if a component has an `egress_method` of "batch".
batch: {
enabled: bool
common?: bool
max_bytes?: uint | null
max_events?: uint | null
timeout_secs?: float | null
}
}
// `compression` describes how the component compresses data.
compression: {
enabled: bool
if enabled == true {
default: #CompressionAlgorithm
algorithms: [#CompressionAlgorithm, ...#CompressionAlgorithm]
levels: [#CompressionLevel, ...#CompressionLevel]
}
}
// `encoding` describes how the component encodes data.
encoding: {
enabled: bool
if enabled {
codec: {
enabled: bool
if enabled {
framing: bool | *false
enum: [#EncodingCodec, ...#EncodingCodec] | null
}
}
}
}
send_buffer_bytes?: #FeaturesSendBufferBytes
keepalive?: #FeaturesKeepalive
proxy?: #FeaturesProxy
// `request` describes how the component issues and manages external
// requests.
request: {
enabled: bool
if enabled {
adaptive_concurrency: bool | *true
concurrency: uint64 | *null
rate_limit_duration_secs: uint64 | *1
rate_limit_num: uint64 | *9223372036854775807
retry_initial_backoff_secs: uint64 | *1
retry_max_duration_secs: uint64 | *3600
timeout_secs: uint64 | *60
headers: bool
relevant_when?: string
}
}
// `tls` describes if the component secures network communication
// via TLS.
tls: #FeaturesTLS & {_args: {mode: "connect"}}
to?: {
service: #Service
interface?: #Interface
}
}
#FeaturesTLS: {
_args: {
mode: "accept" | "connect"
}
let Args = _args
enabled: bool
if enabled {
can_verify_certificate: bool
if Args.mode == "connect" {
can_verify_hostname: bool
enabled_by_scheme: bool
}
if Args.mode == "accept" {
can_add_client_metadata: bool | *false
}
enabled_default: bool
}
}
#Input: {
description?: string
logs: bool
metrics: #MetricInput | null
traces: bool
}
#LogOutput: [Name=string]: {
description: string
name?: Name
fields?: #Schema
}
#TraceOutput: [Name=string]: {
description: string
fields?: #Schema
}
#MetricInput: {
counter: *false | bool
distribution: *false | bool
gauge: *false | bool
histogram: *false | bool
set: *false | bool
summary: *false | bool
}
#MetricOutput: [Name=string]: {
description: string
relevant_when?: string
tags?: #MetricTags
name?: Name
type?: #MetricType
default_namespace?: string
}
#OutputData: {
logs?: #LogOutput
metrics?: #MetricOutput
traces?: #TraceOutput
}
#Output: {
name: string
description: string
}
_default_output: #Output & {
name: "<component_id>"
description: "Default output stream of the component. Use this component's ID as an input to downstream transforms and sinks."
}
#Outputs: *[_default_output] | [#Output, ...#Output]
#IAM: {
#Policy: {
#RequiredFor: "operation" | "healthcheck"
// TODO: come up with a less janky URL generation scheme
_action: !=""
required_for: *["operation"] | [#RequiredFor, ...#RequiredFor]
docs_url: !=""
required_when?: !=""
if platform == "aws" {
docs_url: "https://docs.aws.amazon.com/\(_docs_tag)/latest/\(_url_fragment)/API_\(_action).html"
action: "\(_service):\(_action)"
}
if platform == "gcp" {
docs_url: "https://cloud.google.com/iam/docs/permissions-reference"
action: "\(_service).\(_action)"
}
}
platform: "aws" | "gcp"
policies: [#Policy, ...#Policy]
_service: !="" // The slug of the service, e.g. "s3" or "firehose"
// _docs_tag is used to ed to construct URLs, e.g. "AmazonCloudWatchLogs" in
// https://docs.aws.amazon.com/AmazonCloudWatchLogs/latest/APIReference/API_DescribeLogStreams.html
_docs_tag: *_service | !=""
_url_fragment: !="" | *"APIReference"
// For use in the view layer
platform_title: !=""
platform_link: !=""
if platform == "aws" {
platform_title: "Amazon Web Services"
platform_link: "https://aws.amazon.com"
}
if platform == "gcp" {
platform_title: "Google Cloud Platform"
platform_link: "https://cloud.google.com"
}
}
#Runtime: {
name: string
url: string
version: string | null
}
#Support: {
_args: kind: string
// `requirements` describes any external requirements that the component
// needs to function properly.
//
// For example, the `journald` source requires the presence of the
// `journalctl` binary.
requirements: [...string] | null // Allow for empty list
// `targets` describes which targets this component is available on.
targets: #TargetTriples
// `warnings` describes any warnings the user should know about the
// component.
//
// For example, a transform might be known to have performance issues
// or a lack of support for specific features, etc.
warnings: [...string] | null // Allow for empty list
// `notices` communicates useful information to the user that is neither
// a requirement or a warning.
//
// For example, the `lua` transform offers a Lua version notice that
// communicate which version of Lua is embedded.
notices: [...string] | null // Allow for empty list
}
sources: #Components
transforms: #Components
sinks: #Components
{[Kind=string]: [Name=string]: {
kind: string
let Kind = kind
classes: #Classes & {_args: kind: Kind}
configuration: {
_gcp_api_key: {
common: false
description: "A [Google Cloud API key](\(urls.gcp_authentication_api_key)) used to authenticate access the pubsub project and topic. Either this or `credentials_path` must be set."
required: false
type: string: {
default: null
examples: ["${GCP_API_KEY}", "ef8d5de700e7989468166c40fc8a0ccd"]
}
}
_gcp_credentials_path: {
common: true
description: "The filename for a Google Cloud service account credentials JSON file used to authenticate access to the pubsub project and topic. If this is unset, Vector checks the `GOOGLE_APPLICATION_CREDENTIALS` environment variable for a filename.\n\nIf no filename is named, Vector will attempt to fetch an instance service account for the compute instance the program is running on. If Vector is not running on a GCE instance, you must define a credentials file as above."
required: false
type: string: {
default: null
examples: ["/path/to/credentials.json"]
}
}
_source_acknowledgements: {
common: true
description: "Controls how acknowledgements are handled by this source. These settings override the global `acknowledgement` settings. This setting is deprecated in favor of enabling `acknowledgements` in the destination sink."
required: false
type: object: options: {
enabled: {
common: true
description: "Controls if the source will wait for destination sinks to deliver the events before acknowledging receipt."
warnings: ["This setting is deprecated in favor of enabling `acknowledgements` in the destination sink.", "Disabling this option may lead to loss of data, as destination sinks may reject events after the source acknowledges their successful receipt."]
required: false
type: bool: default: false
}
}
}
_tls_accept: {
_args: {
can_verify_certificate: bool | *true
can_add_client_metadata: bool | *false
enabled_default: bool
}
let Args = _args
common: false
description: "Configures the TLS options for incoming/outgoing connections."
required: false
type: object: options: {
enabled: {
common: false
description: """
Whether or not to require TLS for incoming/outgoing connections.
When enabled and used for incoming connections, an identity certificate is also required. See `tls.crt_file` for
more information.
"""
required: false
type: bool: default: Args.enabled_default
}
ca_file: {
common: false
description: """
Absolute path to an additional CA certificate file.
The certificate must be in the DER or PEM (X.509) format. Additionally, the certificate can be provided as an inline string in PEM format.
"""
required: false
type: string: {
default: null
examples: ["/path/to/certificate_authority.crt"]
}
}
if Args.can_add_client_metadata {
client_metadata_key: {
common: false
description: "Event field for client certificate metadata."
required: false
type: string: {
default: null
examples: ["client_cert"]
}
}
}
crt_file: {
common: false
description: """
Absolute path to a certificate file used to identify this server.
The certificate must be in DER, PEM (X.509), or PKCS#12 format. Additionally, the certificate can be provided as
an inline string in PEM format.
If this is set, and is not a PKCS#12 archive, `key_file` must also be set.
"""
required: false
type: string: {
default: null
examples: ["/path/to/host_certificate.crt"]
}
}
key_file: {
common: false
description: """
Absolute path to a private key file used to identify this server.
The key must be in DER or PEM (PKCS#8) format. Additionally, the key can be provided as an inline string in PEM format.
"""
required: false
type: string: {
default: null
examples: ["/path/to/host_certificate.key"]
}
}
key_pass: {
common: false
description: """
Passphrase used to unlock the encrypted key file.
This has no effect unless `key_file` is set.
"""
required: false
type: string: {
default: null
examples: ["${KEY_PASS_ENV_VAR}", "PassWord1"]
}
}
if Args.can_verify_certificate {
verify_certificate: {
common: false
description: """
Enables certificate verification.
If enabled, certificates must be valid in terms of not being expired, as well as being issued by a trusted
issuer. This verification operates in a hierarchical manner, checking that not only the leaf certificate (the
certificate presented by the client/server) is valid, but also that the issuer of that certificate is valid, and
so on until reaching a root certificate.
Relevant for both incoming and outgoing connections.
Do NOT set this to `false` unless you understand the risks of not verifying the validity of certificates.
"""
required: false
type: bool: default: false
}
}
}
}
_tls_connect: {
_args: {
can_verify_certificate: bool | *true
can_verify_hostname: bool | *false
enabled_default: bool
enabled_by_scheme: bool
}
let Args = _args
common: false
description: "Configures the TLS options for incoming/outgoing connections."
required: false
type: object: options: {
if !Args.enabled_by_scheme {
enabled: {
common: true
description: """
Whether or not to require TLS for incoming/outgoing connections.
When enabled and used for incoming connections, an identity certificate is also required. See `tls.crt_file` for
more information.
"""
required: false
type: bool: default: Args.enabled_default
}
}
ca_file: {
common: false
description: """
Absolute path to an additional CA certificate file.
The certificate must be in the DER or PEM (X.509) format. Additionally, the certificate can be provided as an inline string in PEM format.
"""
required: false
type: string: {
default: null
examples: ["/path/to/certificate_authority.crt"]
}
}
crt_file: {
common: true
description: """
Absolute path to a certificate file used to identify this server.
The certificate must be in DER, PEM (X.509), or PKCS#12 format. Additionally, the certificate can be provided as
an inline string in PEM format.
If this is set, and is not a PKCS#12 archive, `key_file` must also be set.
"""
required: false
type: string: {
default: null
examples: ["/path/to/host_certificate.crt"]
}
}
key_file: {
common: true
description: """
Absolute path to a private key file used to identify this server.
The key must be in DER or PEM (PKCS#8) format. Additionally, the key can be provided as an inline string in PEM format.
"""
required: false
type: string: {
default: null
examples: ["/path/to/host_certificate.key"]
}
}
key_pass: {
common: false
description: """
Passphrase used to unlock the encrypted key file.
This has no effect unless `key_file` is set.
"""
required: false
type: string: {
default: null
examples: ["${KEY_PASS_ENV_VAR}", "PassWord1"]
}
}
alpn_protocols: {
common: false
description: """
Sets the list of supported ALPN protocols.
Declare the supported ALPN protocols, which are used during negotiation with peer. Prioritized in the order
they are defined.
"""
required: false
type: array: {
default: null
items: type: string: {
examples: ["h2"]
syntax: "literal"
}
}
}
if Args.can_verify_certificate {
verify_certificate: {
common: false
description: """
Enables certificate verification.
If enabled, certificates must be valid in terms of not being expired, as well as being issued by a trusted
issuer. This verification operates in a hierarchical manner, checking that not only the leaf certificate (the
certificate presented by the client/server) is valid, but also that the issuer of that certificate is valid, and
so on until reaching a root certificate.
Relevant for both incoming and outgoing connections.
Do NOT set this to `false` unless you understand the risks of not verifying the validity of certificates.
"""
required: false
type: bool: default: true
}
}
if Args.can_verify_hostname {
verify_hostname: {
common: false
description: """
Enables hostname verification.
If enabled, the hostname used to connect to the remote host must be present in the TLS certificate presented by
the remote host, either as the Common Name or as an entry in the Subject Alternative Name extension.
Only relevant for outgoing connections.
Do NOT set this to `false` unless you understand the risks of not verifying the remote hostname.
"""
required: false
type: bool: default: true
}
}
}
}
_proxy: {
common: false
description: """
Proxy configuration.
Configure to proxy traffic through an HTTP(S) proxy when making external requests.
Similar to common proxy configuration convention, users can set different proxies
to use based on the type of traffic being proxied, as well as set specific hosts that
should not be proxied.
"""
required: false
type: object: options: {
enabled: {
common: false
description: "Enables proxying support."
required: false
type: bool: default: true
}
http: {
common: false
description: """
Proxy endpoint to use when proxying HTTP traffic.
Must be a valid URI string.
"""
required: false
type: string: examples: ["http://foo.bar:3128"]
}
https: {
common: false
description: """
Proxy endpoint to use when proxying HTTPS traffic.
Must be a valid URI string.
"""
required: false
type: string: examples: ["http://foo.bar:3128"]
}
no_proxy: {
common: false
description: """
A list of hosts to avoid proxying.
Multiple patterns are allowed:
| Pattern | Example match |
| ------------------- | --------------------------------------------------------------------------- |
| Domain names | `example.com` matches requests to `example.com` |
| Wildcard domains | `.example.com` matches requests to `example.com` and its subdomains |
| IP addresses | `127.0.0.1` matches requests to `127.0.0.1` |
| [CIDR][cidr] blocks | `192.168.0.0/16` matches requests to any IP addresses in this range |
| Splat | `*` matches all hosts |
[cidr]: https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing
"""
required: false
type: array: {
default: []
items: type: string: {
examples: ["localhost", ".foo.bar", "*"]
}
}
}
}
}
_http_auth: {
_args: {
password_example: string
username_example: string
}
let Args = _args
common: false
description: "Configures the authentication strategy."
required: false
type: object: options: {
password: {
description: "The basic authentication password."
required: true
type: string: {
examples: [Args.password_example, "password"]
}
}
strategy: {
description: "The authentication strategy to use."
required: true
type: string: {
enum: {
basic: "The [basic authentication strategy](\(urls.basic_auth))."
bearer: "The bearer token authentication strategy."
}
}
}
token: {
description: "The token to use for bearer authentication"
required: true
type: string: {
examples: ["${API_TOKEN}", "xyz123"]
}
}
user: {
description: "The basic authentication user name."
required: true
type: string: {
examples: [Args.username_example, "username"]
}
}
}
}
_http_basic_auth: {
common: false
description: "Options for HTTP Basic Authentication."
required: false
type: object: {
examples: []
options: {
username: {
description: "The basic authentication user name."
required: true
type: string: {
examples: ["${HTTP_USERNAME}", "username"]
}
}
password: {
description: "The basic authentication password."
required: true
type: string: {