├── .gitignore
├── .travis.yml
├── LICENSE
├── Makefile
├── README.md
├── cgi.go
├── cgi_test.go
├── checklist.txt
├── cov
├── doc.go
├── doc
├── caddy.xml
├── document.md
├── go.awk
└── html.txt
├── go.mod
├── go.sum
├── inspect.go
├── module.go
├── module_test.go
└── test
├── example
├── example.txt
├── example_post
├── fullenv
└── showdir
/.gitignore:
--------------------------------------------------------------------------------
1 | body.html
2 | index.html
3 | doc/mid*txt
4 | *.0
5 | *.1
6 | *.2
7 | *.3
8 | *.4
9 | build
10 | Caddyfile
11 | caddy.log
12 | coverage
13 | coverage.html
14 | errors.log
15 | run
16 | *.swp
17 | #
18 | # Compiled Object files, Static and Dynamic libs (Shared Objects)
19 | *.o
20 | *.a
21 | *.so
22 |
23 | # Folders
24 | _obj
25 | _test
26 |
27 | # Architecture specific extensions/prefixes
28 | *.[568vq]
29 | [568vq].out
30 |
31 | *.cgo1.go
32 | *.cgo2.c
33 | _cgo_defun.c
34 | _cgo_gotypes.go
35 | _cgo_export.*
36 |
37 | _testmain.go
38 |
39 | *.exe
40 | *.test
41 | *.prof
42 |
43 | /.idea/
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
3 | sudo: false
4 |
5 | go:
6 | - master
7 |
8 | os:
9 | - linux
10 | - osx
11 |
12 | install:
13 | # Install all external dependencies, ensuring they are updated.
14 | - go get -u -v $(go list -f '{{join .Imports "\n"}}{{"\n"}}{{join .TestImports "\n"}}' ./... | sort | uniq | grep -v golang-samples)
15 |
16 | script: go test -v ./...
17 |
18 | notifications:
19 | email: false
20 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2017 Kurt Jung (Gmail: kurt.w.jung)
4 | Copyright (c) 2020 Andreas Schneider
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/Makefile:
--------------------------------------------------------------------------------
1 | all : ok documentation lint
2 |
3 | documentation : doc/index.html doc.go README.md
4 |
5 | lint : ok/index.html
6 |
7 | ok :
8 | mkdir ok
9 |
10 | ok/%.html : doc/%.html
11 | tidy -quiet -output /dev/null $<
12 | touch $@
13 |
14 | cov : all
15 | go test -v -coverprofile=coverage && go tool cover -html=coverage -o=coverage.html
16 |
17 | check :
18 | golint .
19 | go vet -all .
20 | gofmt -s -l .
21 | goreportcard-cli -v
22 |
23 | README.md : doc/document.md
24 | pandoc --read=markdown --write=gfm < $< > $@
25 |
26 | doc/index.html : doc/document.md doc/html.txt doc/caddy.xml
27 | pandoc --read=markdown --write=html --template=doc/html.txt \
28 | --metadata pagetitle="CGI for Caddy" --syntax-definition=doc/caddy.xml < $< > $@
29 |
30 | doc.go : doc/document.md doc/go.awk
31 | pandoc --read=markdown --write=plain $< | awk --assign=package_name=cgi --file=doc/go.awk > $@
32 | gofmt -s -w $@
33 |
34 | build :
35 | cd ../caddy-custom
36 | go build -v
37 | sudo setcap cap_net_bind_service=+ep ./caddy
38 | ./caddy -plugins | grep cgi
39 | ./caddy -version
40 |
41 | clean :
42 | rm -f coverage.html coverage ok/* doc/index.html doc.go README.md
43 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # CGI for Caddy
2 |
3 | [](https://raw.githubusercontent.com/aksdb/caddy-cgi/master/LICENSE)
5 | [](https://goreportcard.com/report/github.com/aksdb/caddy-cgi)
6 |
7 | Package cgi implements the common gateway interface
8 | ([CGI](https://en.wikipedia.org/wiki/Common_Gateway_Interface)) for
9 | [Caddy 2](https://caddyserver.com/), a modern, full-featured,
10 | easy-to-use web server.
11 |
12 | It has been forked from the fantastic work of [Kurt
13 | Jung](https://github.com/jung-kurt/caddy-cgi) who wrote that plugin for
14 | Caddy 1.
15 |
16 | ## Documentation
17 |
18 | This plugin lets you generate dynamic content on your website by means
19 | of command line scripts. To collect information about the inbound HTTP
20 | request, your script examines certain environment variables such as
21 | `PATH_INFO` and `QUERY_STRING`. Then, to return a dynamically generated
22 | web page to the client, your script simply writes content to standard
23 | output. In the case of POST requests, your script reads additional
24 | inbound content from standard input.
25 |
26 | The advantage of CGI is that you do not need to fuss with server startup
27 | and persistence, long term memory management, sockets, and crash
28 | recovery. Your script is called when a request matches one of the
29 | patterns that you specify in your Caddyfile. As soon as your script
30 | completes its response, it terminates. This simplicity makes CGI a
31 | perfect complement to the straightforward operation and configuration of
32 | Caddy. The benefits of Caddy, including HTTPS by default, basic access
33 | authentication, and lots of middleware options extend easily to your CGI
34 | scripts.
35 |
36 | CGI has some disadvantages. For one, Caddy needs to start a new process
37 | for each request. This can adversely impact performance and, if
38 | resources are shared between CGI applications, may require the use of
39 | some interprocess synchronization mechanism such as a file lock. Your
40 | server's responsiveness could in some circumstances be affected, such as
41 | when your web server is hit with very high demand, when your script's
42 | dependencies require a long startup, or when concurrently running
43 | scripts take a long time to respond. However, in many cases, such as
44 | using a pre-compiled CGI application like fossil or a Lua script, the
45 | impact will generally be insignificant. Another restriction of CGI is
46 | that scripts will be run with the same permissions as Caddy itself. This
47 | can sometimes be less than ideal, for example when your script needs to
48 | read or write files associated with a different owner.
49 |
50 | ### Security Considerations
51 |
52 | Serving dynamic content exposes your server to more potential threats
53 | than serving static pages. There are a number of considerations of which
54 | you should be aware when using CGI applications.
55 |
56 |
57 |
58 | **CGI scripts should be located outside of Caddy's document root.**
59 | Otherwise, an inadvertent misconfiguration could result in Caddy
60 | delivering the script as an ordinary static resource. At best, this
61 | could merely confuse the site visitor. At worst, it could expose
62 | sensitive internal information that should not leave the server.
63 |
64 |
65 |
66 |
67 |
68 | **Mistrust the contents of `PATH_INFO`, `QUERY_STRING` and standard
69 | input.** Most of the environment variables available to your CGI program
70 | are inherently safe because they originate with Caddy and cannot be
71 | modified by external users. This is not the case with `PATH_INFO`,
72 | `QUERY_STRING` and, in the case of POST actions, the contents of
73 | standard input. Be sure to validate and sanitize all inbound content. If
74 | you use a CGI library or framework to process your scripts, make sure
75 | you understand its limitations.
76 |
77 |
78 |
79 | ### Errors
80 |
81 | An error in a CGI application is generally handled within the
82 | application itself and reported in the headers it returns.
83 |
84 | ### Application Modes
85 |
86 | Your CGI application can be executed directly or indirectly. In the
87 | direct case, the application can be a compiled native executable or it
88 | can be a shell script that contains as its first line a shebang that
89 | identifies the interpreter to which the file's name should be passed.
90 | Caddy must have permission to execute the application. On Posix systems
91 | this will mean making sure the application's ownership and permission
92 | bits are set appropriately; on Windows, this may involve properly
93 | setting up the filename extension association.
94 |
95 | In the indirect case, the name of the CGI script is passed to an
96 | interpreter such as lua, perl or python.
97 |
98 | ### Requirements
99 |
100 | This module needs to be installed (obviously).
101 |
102 | Refer to the Caddy documentation on how to build Caddy with
103 | plugins/modules.
104 |
105 | > **Note**: If you build manually, beware to include the major version
106 | > in the module path. For example
107 | > `xcaddy build --with=github.com/aksdb/caddy-cgi/v2`.
108 |
109 | ### Basic Syntax
110 |
111 | The basic cgi directive lets you add a handler in the current caddy
112 | router location with a given script and optional arguments. The matcher
113 | is a default caddy matcher that is used to restrict the scope of this
114 | directive. The directive can be repeated any reasonable number of times.
115 | Here is the basic syntax:
116 |
117 | ``` caddy
118 | cgi [matcher] exec [args...]
119 | ```
120 |
121 | For example:
122 |
123 | ``` caddy
124 | cgi /report /usr/local/cgi-bin/report
125 | ```
126 |
127 | When a request such as or
128 | arrives, the cgi middleware will
129 | detect the match and invoke the script named /usr/local/cgi-bin/report.
130 | The current working directory will be the same as Caddy itself. Here, it
131 | is assumed that the script is self-contained, for example a pre-compiled
132 | CGI application or a shell script. Here is an example of a standalone
133 | script, similar to one used in the cgi plugin's test suite:
134 |
135 | ``` shell
136 | #!/bin/bash
137 |
138 | printf "Content-type: text/plain\n\n"
139 |
140 | printf "PATH_INFO [%s]\n" $PATH_INFO
141 | printf "QUERY_STRING [%s]\n" $QUERY_STRING
142 |
143 | exit 0
144 | ```
145 |
146 | The environment variables `PATH_INFO` and `QUERY_STRING` are populated
147 | and passed to the script automatically. There are a number of other
148 | standard CGI variables included that are described below. If you need to
149 | pass any special environment variables or allow any environment
150 | variables that are part of Caddy's process to pass to your script, you
151 | will need to use the advanced directive syntax described below.
152 |
153 | Beware that in Caddy v2 it is (currently) not possible to separate the
154 | path left of the matcher from the full URL. Therefore if you require
155 | your CGI program to know the `SCRIPT_NAME`, make sure to pass that
156 | explicitly:
157 |
158 | ``` caddy
159 | cgi /script.cgi* /path/to/my/script someargument {
160 | script_name /script.cgi
161 | }
162 | ```
163 |
164 | ### Advanced Syntax
165 |
166 | In order to specify custom environment variables, pass along one or more
167 | environment variables known to Caddy, or specify more than one match
168 | pattern for a given rule, you will need to use the advanced directive
169 | syntax. That looks like this:
170 |
171 | ``` caddy
172 | cgi [matcher] exec [args...] {
173 | script_name subpath
174 | dir working_directory
175 | env key1=val1 [key2=val2...]
176 | pass_env key1 [key2...]
177 | pass_all_env
178 | buffer_limit
179 | unbuffered_output
180 | inspect
181 | }
182 | ```
183 |
184 | For example,
185 |
186 | ``` caddy
187 | cgi /sample/report* /usr/local/bin/reportscript.sh {
188 | script_name /sample/report
189 | env DB=/usr/local/share/app/app.db SECRET=/usr/local/share/app/secret CGI_LOCAL=
190 | pass_env HOME UID
191 | }
192 | ```
193 |
194 | The `script_name` subdirective helps the cgi module to separate the path
195 | to the script from the (virtual) path afterwards (which shall be passed
196 | to the script).
197 |
198 | `env` can be used to define a list of `key=value` environment variable
199 | pairs that shall be passed to the script. `pass_env` can be used to
200 | define a list of environment variables of the Caddy process that shall
201 | be passed to the script.
202 |
203 | If your CGI application runs properly at the command line but fails to
204 | run from Caddy it is possible that certain environment variables may be
205 | missing. For example, the ruby gem loader evidently requires the `HOME`
206 | environment variable to be set; you can do this with the subdirective
207 | `pass_env HOME`. Another class of problematic applications require the
208 | `COMPUTERNAME` variable.
209 |
210 | The `pass_all_env` subdirective instructs Caddy to pass each environment
211 | variable it knows about to the CGI excutable. This addresses a common
212 | frustration that is caused when an executable requires an environment
213 | variable and fails without a descriptive error message when the variable
214 | cannot be found. These applications often run fine from the command
215 | prompt but fail when invoked with CGI. The risk with this subdirective
216 | is that a lot of server information is shared with the CGI executable.
217 | Use this subdirective only with CGI applications that you trust not to
218 | leak this information.
219 |
220 | `buffer_limit` is used when a http request has
221 | `Transfer-Endcoding: chunked`. The Go CGI Handler refused to handle
222 | these kinds of requests, see .
223 | In order to work around this the chunked request is buffered by caddy
224 | and sent to the CGI application as a whole with the correct
225 | `CONTENT_LENGTH` set. The `buffer_limit` setting marks a threshold
226 | between buffering in memory and using a temporary file. Every request
227 | body smaller than the `buffer_limit` is buffered in-memory. It accepts
228 | all formats supported by
229 | [go-humanize](https://github.com/dustin/go-humanize/blob/master/bytes.go).
230 | Default: `4MiB`.
231 | (An example of this is `git push` if the objects to push are larger than
232 | the
233 | [`http.postBuffer`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httppostBuffer))
234 |
235 | With the `unbuffered_output` subdirective it is possible to instruct the
236 | CGI handler to flush output from the CGI script as soon as possible. By
237 | default, the output is buffered into chunks before it is being written
238 | to optimize the network usage and allow to determine the Content-Length.
239 | When unbuffered, bytes will be written as soon as possible. This will
240 | also force the response to be written in chunked encoding.
241 |
242 | ### Troubleshooting
243 |
244 | If you run into unexpected results with the CGI plugin, you are able to
245 | examine the environment in which your CGI application runs. To enter
246 | inspection mode, add the subdirective `inspect` to your CGI
247 | configuration block. This is a development option that should not be
248 | used in production. When in inspection mode, the plugin will respond to
249 | matching requests with a page that displays variables of interest. In
250 | particular, it will show the replacement value of `{match}` and the
251 | environment variables to which your CGI application has access.
252 |
253 | For example, consider this example CGI block:
254 |
255 | ``` caddy
256 | cgi /wapp/*.tcl /usr/local/bin/wapptclsh /home/quixote/projects{path} {
257 | script_name /wapp
258 | pass_env HOME LANG
259 | env DB=/usr/local/share/app/app.db SECRET=/usr/local/share/app/secret
260 | inspect
261 | }
262 | ```
263 |
264 | When you request a matching URL, for example,
265 |
266 | ``` plain
267 | https://example.com/wapp/hello.tcl
268 | ```
269 |
270 | the Caddy server will deliver a text page similar to the following. The
271 | CGI application (in this case, wapptclsh) will not be called.
272 |
273 | ``` plain
274 | CGI for Caddy inspection page
275 |
276 | Executable .................... /usr/local/bin/wapptclsh
277 | Arg 1 ....................... /home/quixote/projects/hello.tcl
278 | Root .......................... /
279 | Dir ........................... /home/quixote/www
280 | Environment
281 | DB .......................... /usr/local/share/app/app.db
282 | PATH_INFO ...................
283 | REMOTE_USER .................
284 | SCRIPT_EXEC ................. /usr/local/bin/wapptclsh /home/quixote/projects/hello.tcl
285 | SCRIPT_FILENAME ............. /usr/local/bin/wapptclsh
286 | SCRIPT_NAME ................. /wapp/hello
287 | SECRET ...................... /usr/local/share/app/secret
288 | Inherited environment
289 | HOME ........................ /home/quixote
290 | LANG ........................ en_US.UTF-8
291 | Placeholders
292 | {path} ...................... /hello
293 | {root} ...................... /
294 | {http.request.host} ......... example.com
295 | {http.request.host} ......... GET
296 | {http.request.host} ......... /wapp/hello.tcl
297 | ```
298 |
299 | This information can be used to diagnose problems with how a CGI
300 | application is called.
301 |
302 | To return to operation mode, remove or comment out the `inspect`
303 | subdirective.
304 |
305 | ### Environment Variable Example
306 |
307 | In this example, the Caddyfile looks like this:
308 |
309 | ``` caddy
310 | {
311 | http_port 8080
312 | order cgi before respond
313 | }
314 |
315 | 192.168.1.2:8080
316 | cgi /show* /usr/local/cgi-bin/report/gen {
317 | script_name /show
318 | }
319 | ```
320 |
321 | Note that a request for /show gets mapped to a script named
322 | /usr/local/cgi-bin/report/gen. There is no need for any element of the
323 | script name to match any element of the match pattern.
324 |
325 | The contents of /usr/local/cgi-bin/report/gen are:
326 |
327 | ``` shell
328 | #!/bin/bash
329 |
330 | printf "Content-type: text/plain\n\n"
331 |
332 | printf "example error message\n" > /dev/stderr
333 |
334 | if [ "POST" = "$REQUEST_METHOD" -a -n "$CONTENT_LENGTH" ]; then
335 | read -n "$CONTENT_LENGTH" POST_DATA
336 | fi
337 |
338 | printf "AUTH_TYPE [%s]\n" $AUTH_TYPE
339 | printf "CONTENT_LENGTH [%s]\n" $CONTENT_LENGTH
340 | printf "CONTENT_TYPE [%s]\n" $CONTENT_TYPE
341 | printf "GATEWAY_INTERFACE [%s]\n" $GATEWAY_INTERFACE
342 | printf "PATH_INFO [%s]\n" $PATH_INFO
343 | printf "PATH_TRANSLATED [%s]\n" $PATH_TRANSLATED
344 | printf "POST_DATA [%s]\n" $POST_DATA
345 | printf "QUERY_STRING [%s]\n" $QUERY_STRING
346 | printf "REMOTE_ADDR [%s]\n" $REMOTE_ADDR
347 | printf "REMOTE_HOST [%s]\n" $REMOTE_HOST
348 | printf "REMOTE_IDENT [%s]\n" $REMOTE_IDENT
349 | printf "REMOTE_USER [%s]\n" $REMOTE_USER
350 | printf "REQUEST_METHOD [%s]\n" $REQUEST_METHOD
351 | printf "SCRIPT_EXEC [%s]\n" $SCRIPT_EXEC
352 | printf "SCRIPT_NAME [%s]\n" $SCRIPT_NAME
353 | printf "SERVER_NAME [%s]\n" $SERVER_NAME
354 | printf "SERVER_PORT [%s]\n" $SERVER_PORT
355 | printf "SERVER_PROTOCOL [%s]\n" $SERVER_PROTOCOL
356 | printf "SERVER_SOFTWARE [%s]\n" $SERVER_SOFTWARE
357 |
358 | exit 0
359 | ```
360 |
361 | The purpose of this script is to show how request information gets
362 | communicated to a CGI script. Note that POST data must be read from
363 | standard input. In this particular case, posted data gets stored in the
364 | variable `POST_DATA`. Your script may use a different method to read
365 | POST content. Secondly, the `SCRIPT_EXEC` variable is not a CGI
366 | standard. It is provided by this middleware and contains the entire
367 | command line, including all arguments, with which the CGI script was
368 | executed.
369 |
370 | When a browser requests
371 |
372 | ``` plain
373 | http://192.168.1.2:8080/show/weekly?mode=summary
374 | ```
375 |
376 | the response looks like
377 |
378 | ``` plain
379 | AUTH_TYPE []
380 | CONTENT_LENGTH []
381 | CONTENT_TYPE []
382 | GATEWAY_INTERFACE [CGI/1.1]
383 | PATH_INFO [/weekly]
384 | PATH_TRANSLATED []
385 | POST_DATA []
386 | QUERY_STRING [mode=summary]
387 | REMOTE_ADDR [192.168.1.35]
388 | REMOTE_HOST [192.168.1.35]
389 | REMOTE_IDENT []
390 | REMOTE_USER []
391 | REQUEST_METHOD [GET]
392 | SCRIPT_EXEC [/usr/local/cgi-bin/report/gen]
393 | SCRIPT_NAME [/show]
394 | SERVER_NAME [192.168.1.2:8080]
395 | SERVER_PORT [8080]
396 | SERVER_PROTOCOL [HTTP/1.1]
397 | SERVER_SOFTWARE [go]
398 | ```
399 |
400 | When a client makes a POST request, such as with the following command
401 |
402 | ``` shell
403 | wget -O - -q --post-data="city=San%20Francisco" http://192.168.1.2:8080/show/weekly?mode=summary
404 | ```
405 |
406 | the response looks the same except for the following lines:
407 |
408 | ``` plain
409 | CONTENT_LENGTH [20]
410 | CONTENT_TYPE [application/x-www-form-urlencoded]
411 | POST_DATA [city=San%20Francisco]
412 | REQUEST_METHOD [POST]
413 | ```
414 |
415 | ### Go Source Example
416 |
417 | This small example demonstrates how to write a CGI program in Go. The
418 | use of a bytes.Buffer makes it easy to report the content length in the
419 | CGI header.
420 |
421 | ``` go
422 | package main
423 |
424 | import (
425 | "bytes"
426 | "fmt"
427 | "os"
428 | "time"
429 | )
430 |
431 | func main() {
432 | var buf bytes.Buffer
433 |
434 | fmt.Fprintf(&buf, "Server time at %s is %s\n",
435 | os.Getenv("SERVER_NAME"), time.Now().Format(time.RFC1123))
436 | fmt.Println("Content-type: text/plain")
437 | fmt.Printf("Content-Length: %d\n\n", buf.Len())
438 | buf.WriteTo(os.Stdout)
439 | }
440 | ```
441 |
442 | When this program is compiled and installed as
443 | /usr/local/bin/servertime, the following directive in your Caddy file
444 | will make it available:
445 |
446 | ``` caddy
447 | cgi /servertime /usr/local/bin/servertime
448 | ```
449 |
450 | ### Execute dynamic script
451 |
452 | The module is written in a way that it expects the scripts you want it
453 | to execute to actually exist. A non-existing or non-executable file is
454 | considered a setup error and will yield a HTTP 500.
455 |
456 | If you want to make sure, only existing scripts are executed, use a more
457 | specific matcher, as explained in the Caddy docs.
458 |
459 | Example:
460 |
461 | ``` caddy
462 | @iscgi {
463 | path /cgi/*
464 | file {
465 | root ./app/
466 | }
467 | }
468 | cgi @iscgi ./app{path}
469 | ```
470 |
471 | When calling a url like `/cgi/foo/bar.pl` it will check if the local
472 | file `./app/foo/bar.pl` exists and only then it will proceed with
473 | calling the CGI.
474 |
--------------------------------------------------------------------------------
/cgi.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2017 Kurt Jung (Gmail: kurt.w.jung)
3 | * Copyright (c) 2020 Andreas Schneider
4 | *
5 | * Permission to use, copy, modify, and distribute this software for any
6 | * purpose with or without fee is hereby granted, provided that the above
7 | * copyright notice and this permission notice appear in all copies.
8 | *
9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 | */
17 |
18 | package cgi
19 |
20 | import (
21 | "bytes"
22 | "fmt"
23 | "io"
24 | "net/http"
25 | "net/http/cgi"
26 | "os"
27 | "strconv"
28 | "strings"
29 | "sync"
30 |
31 | "github.com/caddyserver/caddy/v2"
32 | "github.com/caddyserver/caddy/v2/modules/caddyhttp"
33 | "go.uber.org/zap"
34 | )
35 |
36 | var bufPool = sync.Pool{New: func() interface{} { return &bytes.Buffer{} }}
37 |
38 | // passAll returns a slice of strings made up of each environment key
39 | func passAll() (list []string) {
40 | envList := os.Environ() // ["HOME=/home/foo", "LVL=2", ...]
41 | for _, str := range envList {
42 | pos := strings.Index(str, "=")
43 | if pos > 0 {
44 | list = append(list, str[:pos])
45 | }
46 | }
47 | return
48 | }
49 |
50 | func (c *CGI) ServeHTTP(w http.ResponseWriter, r *http.Request, next caddyhttp.Handler) error {
51 | // For convenience: get the currently authenticated user; if some other middleware has set that.
52 | repl := r.Context().Value(caddy.ReplacerCtxKey).(*caddy.Replacer)
53 | var username string
54 | if usernameVal, exists := repl.Get("http.auth.user.id"); exists {
55 | if usernameVal, ok := usernameVal.(string); ok {
56 | username = usernameVal
57 | }
58 | }
59 |
60 | scriptName := repl.ReplaceAll(c.ScriptName, "")
61 | scriptPath := strings.TrimPrefix(r.URL.Path, scriptName)
62 |
63 | var cgiHandler cgi.Handler
64 |
65 | cgiHandler.Root = "/"
66 |
67 | repl.Set("root", cgiHandler.Root)
68 | repl.Set("path", scriptPath)
69 |
70 | errorBuffer := bufPool.Get().(*bytes.Buffer)
71 | errorBuffer.Reset()
72 | defer bufPool.Put(errorBuffer)
73 |
74 | cgiHandler.Dir = c.WorkingDirectory
75 | cgiHandler.Path = repl.ReplaceAll(c.Executable, "")
76 | cgiHandler.Stderr = errorBuffer
77 | for _, str := range c.Args {
78 | cgiHandler.Args = append(cgiHandler.Args, repl.ReplaceAll(str, ""))
79 | }
80 |
81 | envAdd := func(key, val string) {
82 | cgiHandler.Env = append(cgiHandler.Env, key+"="+val)
83 | }
84 | envAdd("PATH_INFO", scriptPath)
85 | envAdd("SCRIPT_FILENAME", cgiHandler.Path)
86 | envAdd("SCRIPT_NAME", scriptName)
87 | envAdd("SCRIPT_EXEC", fmt.Sprintf("%s %s", cgiHandler.Path, strings.Join(cgiHandler.Args, " ")))
88 | envAdd("REMOTE_USER", username)
89 |
90 | // work around Go's CGI not handling chunked transfer encodings
91 | // https://github.com/golang/go/issues/5613
92 | if len(r.TransferEncoding) > 0 && r.TransferEncoding[0] == "chunked" {
93 | // buffer request in memory or temporary file if too large
94 | // to make it possible to calculate the CONTENT_LENGTH of the body
95 | defer r.Body.Close()
96 |
97 | buf := bufPool.Get().(*bytes.Buffer)
98 | buf.Reset()
99 | defer bufPool.Put(buf)
100 | if buf.Cap() < int(c.BufferLimit) {
101 | buf.Grow(int(c.BufferLimit) + bytes.MinRead)
102 | }
103 |
104 | size, err := io.CopyN(buf, r.Body, c.BufferLimit)
105 | if err != nil && err != io.EOF {
106 | return err
107 | }
108 |
109 | // if the buffer is full there is probably more,
110 | // so use a tempfile to read the rest and use that as request body
111 | if size == c.BufferLimit {
112 | tempfile, err := os.CreateTemp("", "cgi_body_*")
113 | if err != nil {
114 | return err
115 | }
116 | defer os.Remove(tempfile.Name())
117 | defer tempfile.Close()
118 |
119 | // write the already read bytes
120 | _, err = tempfile.Write(buf.Bytes())
121 | if err != nil {
122 | return err
123 | }
124 |
125 | // reuse the bytes slice of the buffer to copy the rest of the body to the tempfile
126 | remainingSize, err := io.CopyBuffer(tempfile, r.Body, buf.Bytes())
127 | if err != nil {
128 | return err
129 | }
130 | size += remainingSize
131 |
132 | // seek to start, so it can be read from the beginning
133 | _, err = tempfile.Seek(0, io.SeekStart)
134 | if err != nil {
135 | return err
136 | }
137 | r.Body = tempfile
138 | } else {
139 | r.Body = io.NopCloser(buf)
140 | }
141 |
142 | // all the request body is read, so it isn't chunked anymore
143 | r.TransferEncoding = nil
144 | r.Header.Del("Transfer-Encoding")
145 |
146 | // we can set the size of the request body now that we read everything
147 | sizeStr := strconv.FormatInt(size, 10)
148 | r.Header.Add("Content-Length", sizeStr)
149 | r.ContentLength = size
150 | }
151 |
152 | for _, e := range c.Envs {
153 | cgiHandler.Env = append(cgiHandler.Env, repl.ReplaceAll(e, ""))
154 | }
155 |
156 | if c.PassAll {
157 | cgiHandler.InheritEnv = passAll()
158 | } else {
159 | cgiHandler.InheritEnv = append(cgiHandler.InheritEnv, c.PassEnvs...)
160 | }
161 |
162 | if c.Inspect {
163 | inspect(cgiHandler, w, r, repl)
164 | } else {
165 | cgiWriter := w
166 |
167 | if c.UnbufferedOutput {
168 | if _, isFlusher := w.(http.Flusher); isFlusher {
169 | cgiWriter = instantWriter{w}
170 | } else {
171 | c.logger.Warn("Cannot write response without buffer.")
172 | }
173 | }
174 | cgiHandler.ServeHTTP(cgiWriter, r)
175 | }
176 |
177 | if c.logger != nil && errorBuffer.Len() > 0 {
178 | c.logger.Error("Error from CGI Application", zap.Stringer("Stderr", errorBuffer))
179 | }
180 |
181 | return nil
182 | }
183 |
184 | type instantWriter struct {
185 | http.ResponseWriter
186 | }
187 |
188 | func (iw instantWriter) Write(b []byte) (int, error) {
189 | n, err := iw.ResponseWriter.Write(b)
190 | iw.ResponseWriter.(http.Flusher).Flush()
191 | return n, err
192 | }
193 |
--------------------------------------------------------------------------------
/cgi_test.go:
--------------------------------------------------------------------------------
1 | package cgi
2 |
3 | import (
4 | "context"
5 | "io"
6 | "net/http"
7 | "net/http/httptest"
8 | "reflect"
9 | "strconv"
10 | "strings"
11 | "testing"
12 |
13 | "github.com/caddyserver/caddy/v2"
14 | "github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
15 | "go.uber.org/zap"
16 | "go.uber.org/zap/zaptest"
17 | )
18 |
19 | func TestCGI_ServeHTTP(t *testing.T) {
20 | testSetup := []struct {
21 | name string
22 | cgi CGI
23 | uri string
24 | statusCode int
25 | responseBody string
26 | }{
27 | {
28 | name: "Successful CGI request",
29 | cgi: CGI{
30 | Executable: "test/example",
31 | ScriptName: "/foo.cgi",
32 | Args: []string{"arg1", "arg2"},
33 | Envs: []string{"CGI_GLOBAL=whatever"},
34 | logger: zaptest.NewLogger(t, zaptest.Level(zap.ErrorLevel)),
35 | },
36 | uri: "/foo.cgi/some/path?x=y",
37 | statusCode: 200,
38 | responseBody: `PATH_INFO [/some/path]
39 | CGI_GLOBAL [whatever]
40 | Arg 1 [arg1]
41 | QUERY_STRING [x=y]
42 | REMOTE_USER []
43 | HTTP_TOKEN_CLAIM_USER []
44 | CGI_LOCAL is unset`,
45 | },
46 | {
47 | name: "Invalid script",
48 | cgi: CGI{
49 | Executable: "test/example2",
50 | logger: zaptest.NewLogger(t, zaptest.Level(zap.ErrorLevel)),
51 | },
52 | uri: "/whatever",
53 | statusCode: 500,
54 | responseBody: "",
55 | },
56 | {
57 | name: "Inspect",
58 | cgi: CGI{
59 | Executable: "test/example{path}",
60 | ScriptName: "/foo.cgi",
61 | Args: []string{"arg1", "arg2"},
62 | Envs: []string{"some=thing"},
63 | Inspect: true,
64 | logger: zaptest.NewLogger(t, zaptest.Level(zap.ErrorLevel)),
65 | },
66 | uri: "/foo.cgi/some/path?x=y",
67 | statusCode: 200,
68 | responseBody: `CGI for Caddy inspection page
69 |
70 | Executable .................... test/example/some/path
71 | Arg 1 ....................... arg1
72 | Arg 2 ....................... arg2
73 | Root .......................... /
74 | Dir ...........................
75 | Environment
76 | PATH_INFO ................... /some/path
77 | REMOTE_USER .................
78 | SCRIPT_EXEC ................. test/example/some/path arg1 arg2
79 | SCRIPT_FILENAME ............. test/example/some/path
80 | SCRIPT_NAME ................. /foo.cgi
81 | some ........................ thing
82 | Inherited environment
83 | Placeholders
84 | {path} ...................... /some/path
85 | {root} ...................... /
86 | {http.request.host} .........
87 | {http.request.method} .......
88 | {http.request.uri.path} .....`,
89 | },
90 | }
91 |
92 | for _, testCase := range testSetup {
93 | t.Run(testCase.name, func(t *testing.T) {
94 | res := httptest.NewRecorder()
95 | req := httptest.NewRequest(http.MethodGet, "/foo.cgi/some/path?x=y", nil)
96 | repl := caddy.NewReplacer()
97 | req = req.WithContext(context.WithValue(req.Context(), caddy.ReplacerCtxKey, repl))
98 |
99 | if err := testCase.cgi.ServeHTTP(res, req, NoOpNextHandler{}); err != nil {
100 | t.Fatalf("Cannot serve http: %v", err)
101 | }
102 |
103 | if res.Code != testCase.statusCode {
104 | t.Errorf("Unexpected statusCode %d. Expected %d.", res.Code, testCase.statusCode)
105 | }
106 |
107 | bodyString := strings.TrimSpace(res.Body.String())
108 | if bodyString != testCase.responseBody {
109 | t.Errorf("Unexpected body\n========== Got ==========\n%s\n========== Wanted ==========\n%s", bodyString, testCase.responseBody)
110 | }
111 | })
112 | }
113 | }
114 |
115 | func TestCGI_UnmarshalCaddyfile(t *testing.T) {
116 | content := `cgi /some/file a b c d 1 {
117 | dir /somewhere
118 | script_name /my.cgi
119 | env foo=bar what=ever
120 | pass_env some_env other_env
121 | pass_all_env
122 | inspect
123 | }`
124 | d := caddyfile.NewTestDispenser(content)
125 | var c CGI
126 | if err := c.UnmarshalCaddyfile(d); err != nil {
127 | t.Fatalf("Cannot parse caddyfile: %v", err)
128 | }
129 |
130 | expected := CGI{
131 | Executable: "/some/file",
132 | WorkingDirectory: "/somewhere",
133 | ScriptName: "/my.cgi",
134 | Args: []string{"a", "b", "c", "d", "1"},
135 | Envs: []string{"foo=bar", "what=ever"},
136 | PassEnvs: []string{"some_env", "other_env"},
137 | PassAll: true,
138 | Inspect: true,
139 | }
140 |
141 | if !reflect.DeepEqual(c, expected) {
142 | t.Fatal("Parsing yielded invalid result.")
143 | }
144 | }
145 |
146 | type NoOpNextHandler struct{}
147 |
148 | func (n NoOpNextHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) error {
149 | // Do Nothing
150 | return nil
151 | }
152 |
153 | func TestCGI_ServeHTTPPost(t *testing.T) {
154 | testSetup := []struct {
155 | name string
156 | uri string
157 | method string
158 | requestBody string
159 | responseBody string
160 | cgi CGI
161 | statusCode int
162 | chunked bool
163 | }{
164 | {
165 | name: "POST Request",
166 | cgi: CGI{
167 | Executable: "test/example_post",
168 | ScriptName: "/foo.cgi",
169 | Args: []string{"arg1", "arg2"},
170 | Envs: []string{"CGI_GLOBAL=whatever"},
171 | logger: zaptest.NewLogger(t, zaptest.Level(zap.ErrorLevel)),
172 | },
173 | uri: "foo.cgi/some/path?x=y",
174 | method: http.MethodPost,
175 | requestBody: `Chunked HTTP Request Body
176 | With some awesome stuff in there like
177 | this and that and also
178 | this and that and also
179 | this and that and also
180 | this and that and also
181 | this and that and also`,
182 | statusCode: 200,
183 | responseBody: `PATH_INFO [/some/path]
184 | CGI_GLOBAL [whatever]
185 | Arg 1 [arg1]
186 | QUERY_STRING [x=y]
187 | REMOTE_USER []
188 | HTTP_TOKEN_CLAIM_USER []
189 | CGI_LOCAL is unset
190 | Chunked HTTP Request Body
191 | With some awesome stuff in there like
192 | this and that and also
193 | this and that and also
194 | this and that and also
195 | this and that and also
196 | this and that and also`,
197 | },
198 | {
199 | name: "POST Request with chunked Transfer-Encoding In-Memory",
200 | cgi: CGI{
201 | Executable: "test/example_post",
202 | ScriptName: "/foo.cgi",
203 | Args: []string{"arg1", "arg2"},
204 | Envs: []string{"CGI_GLOBAL=whatever"},
205 | logger: zaptest.NewLogger(t, zaptest.Level(zap.ErrorLevel)),
206 | BufferLimit: 200,
207 | },
208 | uri: "foo.cgi/some/path?x=y",
209 | method: http.MethodPost,
210 | requestBody: `Chunked HTTP Request Body
211 | With some awesome stuff in there like
212 | this and that and also
213 | this and that and also
214 | this and that and also
215 | this and that and also
216 | this and that and also`,
217 | statusCode: 200,
218 | responseBody: `PATH_INFO [/some/path]
219 | CGI_GLOBAL [whatever]
220 | Arg 1 [arg1]
221 | QUERY_STRING [x=y]
222 | REMOTE_USER []
223 | HTTP_TOKEN_CLAIM_USER []
224 | CGI_LOCAL is unset
225 | Chunked HTTP Request Body
226 | With some awesome stuff in there like
227 | this and that and also
228 | this and that and also
229 | this and that and also
230 | this and that and also
231 | this and that and also`,
232 | chunked: true,
233 | },
234 | {
235 | name: "POST Request with chunked Transfer-Encoding tempfile",
236 | cgi: CGI{
237 | Executable: "test/example_post",
238 | ScriptName: "/foo.cgi",
239 | Args: []string{"arg1", "arg2"},
240 | Envs: []string{"CGI_GLOBAL=whatever"},
241 | logger: zaptest.NewLogger(t, zaptest.Level(zap.ErrorLevel)),
242 | BufferLimit: 100,
243 | },
244 | uri: "foo.cgi/some/path?x=y",
245 | method: http.MethodPost,
246 | requestBody: `Chunked HTTP Request Body
247 | With some awesome stuff in there like
248 | this and that and also
249 | this and that and also
250 | this and that and also
251 | this and that and also
252 | this and that and also`,
253 | statusCode: 200,
254 | responseBody: `PATH_INFO [/some/path]
255 | CGI_GLOBAL [whatever]
256 | Arg 1 [arg1]
257 | QUERY_STRING [x=y]
258 | REMOTE_USER []
259 | HTTP_TOKEN_CLAIM_USER []
260 | CGI_LOCAL is unset
261 | Chunked HTTP Request Body
262 | With some awesome stuff in there like
263 | this and that and also
264 | this and that and also
265 | this and that and also
266 | this and that and also
267 | this and that and also`,
268 | chunked: true,
269 | },
270 | }
271 |
272 | for _, testCase := range testSetup {
273 | t.Run(testCase.name, func(t *testing.T) {
274 | res := httptest.NewRecorder()
275 | req := httptest.NewRequest(http.MethodPost, "/foo.cgi/some/path?x=y", nil)
276 |
277 | if testCase.chunked {
278 | req.Header.Set("Transfer-Encoding", "chunked")
279 | req.TransferEncoding = []string{"chunked"}
280 | } else {
281 | cl := len(testCase.requestBody)
282 | req.Header.Set("Content-Length", strconv.Itoa(cl))
283 | req.ContentLength = int64(cl)
284 | }
285 | req.Body = io.NopCloser(strings.NewReader(testCase.requestBody))
286 |
287 | repl := caddy.NewReplacer()
288 | req = req.WithContext(context.WithValue(req.Context(), caddy.ReplacerCtxKey, repl))
289 |
290 | if err := testCase.cgi.ServeHTTP(res, req, NoOpNextHandler{}); err != nil {
291 | t.Fatalf("Cannot serve http: %v", err)
292 | }
293 |
294 | if res.Code != testCase.statusCode {
295 | t.Errorf("Unexpected statusCode %d. Expected %d.", res.Code, testCase.statusCode)
296 | }
297 |
298 | bodyString := strings.TrimSpace(res.Body.String())
299 | if bodyString != testCase.responseBody {
300 | t.Errorf("Unexpected body\n========== Got ==========\n%s\n========== Wanted ==========\n%s", bodyString, testCase.responseBody)
301 | }
302 | })
303 | }
304 | }
305 |
--------------------------------------------------------------------------------
/checklist.txt:
--------------------------------------------------------------------------------
1 | Prior to module release
2 | -----------------------
3 | ./cov
4 | ./check
5 | git commit -am "Commit message here"
6 | git tag
7 | git tag v2.x.y
8 | git push --tags -u origin master
9 |
--------------------------------------------------------------------------------
/cov:
--------------------------------------------------------------------------------
1 | go test -v -coverprofile=coverage && go tool cover -html=coverage -o=coverage.html
2 |
--------------------------------------------------------------------------------
/doc.go:
--------------------------------------------------------------------------------
1 | /*
2 | Package cgi implements the common gateway interface (CGI) for Caddy 2, a
3 | modern, full-featured, easy-to-use web server.
4 |
5 | It has been forked from the fantastic work of Kurt Jung who wrote that
6 | plugin for Caddy 1.
7 |
8 | # Documentation
9 |
10 | This plugin lets you generate dynamic content on your website by means
11 | of command line scripts. To collect information about the inbound HTTP
12 | request, your script examines certain environment variables such as
13 | PATH_INFO and QUERY_STRING. Then, to return a dynamically generated web
14 | page to the client, your script simply writes content to standard
15 | output. In the case of POST requests, your script reads additional
16 | inbound content from standard input.
17 |
18 | The advantage of CGI is that you do not need to fuss with server startup
19 | and persistence, long term memory management, sockets, and crash
20 | recovery. Your script is called when a request matches one of the
21 | patterns that you specify in your Caddyfile. As soon as your script
22 | completes its response, it terminates. This simplicity makes CGI a
23 | perfect complement to the straightforward operation and configuration of
24 | Caddy. The benefits of Caddy, including HTTPS by default, basic access
25 | authentication, and lots of middleware options extend easily to your CGI
26 | scripts.
27 |
28 | CGI has some disadvantages. For one, Caddy needs to start a new process
29 | for each request. This can adversely impact performance and, if
30 | resources are shared between CGI applications, may require the use of
31 | some interprocess synchronization mechanism such as a file lock. Your
32 | server's responsiveness could in some circumstances be affected, such as
33 | when your web server is hit with very high demand, when your script's
34 | dependencies require a long startup, or when concurrently running
35 | scripts take a long time to respond. However, in many cases, such as
36 | using a pre-compiled CGI application like fossil or a Lua script, the
37 | impact will generally be insignificant. Another restriction of CGI is
38 | that scripts will be run with the same permissions as Caddy itself. This
39 | can sometimes be less than ideal, for example when your script needs to
40 | read or write files associated with a different owner.
41 |
42 | # Security Considerations
43 |
44 | Serving dynamic content exposes your server to more potential threats
45 | than serving static pages. There are a number of considerations of which
46 | you should be aware when using CGI applications.
47 |
48 | CGI scripts should be located outside of Caddy's document root.
49 | Otherwise, an inadvertent misconfiguration could result in Caddy
50 | delivering the script as an ordinary static resource. At best, this
51 | could merely confuse the site visitor. At worst, it could expose
52 | sensitive internal information that should not leave the server.
53 |
54 | Mistrust the contents of PATH_INFO, QUERY_STRING and standard input.
55 | Most of the environment variables available to your CGI program are
56 | inherently safe because they originate with Caddy and cannot be modified
57 | by external users. This is not the case with PATH_INFO, QUERY_STRING
58 | and, in the case of POST actions, the contents of standard input. Be
59 | sure to validate and sanitize all inbound content. If you use a CGI
60 | library or framework to process your scripts, make sure you understand
61 | its limitations.
62 |
63 | # Errors
64 |
65 | An error in a CGI application is generally handled within the
66 | application itself and reported in the headers it returns.
67 |
68 | # Application Modes
69 |
70 | Your CGI application can be executed directly or indirectly. In the
71 | direct case, the application can be a compiled native executable or it
72 | can be a shell script that contains as its first line a shebang that
73 | identifies the interpreter to which the file's name should be passed.
74 | Caddy must have permission to execute the application. On Posix systems
75 | this will mean making sure the application's ownership and permission
76 | bits are set appropriately; on Windows, this may involve properly
77 | setting up the filename extension association.
78 |
79 | In the indirect case, the name of the CGI script is passed to an
80 | interpreter such as lua, perl or python.
81 |
82 | # Requirements
83 |
84 | This module needs to be installed (obviously).
85 |
86 | Refer to the Caddy documentation on how to build Caddy with
87 | plugins/modules.
88 |
89 | Note: If you build manually, beware to include the major version in
90 | the module path. For example
91 | xcaddy build --with=github.com/aksdb/caddy-cgi/v2.
92 |
93 | # Basic Syntax
94 |
95 | The basic cgi directive lets you add a handler in the current caddy
96 | router location with a given script and optional arguments. The matcher
97 | is a default caddy matcher that is used to restrict the scope of this
98 | directive. The directive can be repeated any reasonable number of times.
99 | Here is the basic syntax:
100 |
101 | cgi [matcher] exec [args...]
102 |
103 | For example:
104 |
105 | cgi /report /usr/local/cgi-bin/report
106 |
107 | When a request such as https://example.com/report or
108 | https://example.com/report/weekly arrives, the cgi middleware will
109 | detect the match and invoke the script named /usr/local/cgi-bin/report.
110 | The current working directory will be the same as Caddy itself. Here, it
111 | is assumed that the script is self-contained, for example a pre-compiled
112 | CGI application or a shell script. Here is an example of a standalone
113 | script, similar to one used in the cgi plugin's test suite:
114 |
115 | #!/bin/bash
116 |
117 | printf "Content-type: text/plain\n\n"
118 |
119 | printf "PATH_INFO [%s]\n" $PATH_INFO
120 | printf "QUERY_STRING [%s]\n" $QUERY_STRING
121 |
122 | exit 0
123 |
124 | The environment variables PATH_INFO and QUERY_STRING are populated and
125 | passed to the script automatically. There are a number of other standard
126 | CGI variables included that are described below. If you need to pass any
127 | special environment variables or allow any environment variables that
128 | are part of Caddy's process to pass to your script, you will need to use
129 | the advanced directive syntax described below.
130 |
131 | Beware that in Caddy v2 it is (currently) not possible to separate the
132 | path left of the matcher from the full URL. Therefore if you require
133 | your CGI program to know the SCRIPT_NAME, make sure to pass that
134 | explicitly:
135 |
136 | cgi /script.cgi* /path/to/my/script someargument {
137 | script_name /script.cgi
138 | }
139 |
140 | # Advanced Syntax
141 |
142 | In order to specify custom environment variables, pass along one or more
143 | environment variables known to Caddy, or specify more than one match
144 | pattern for a given rule, you will need to use the advanced directive
145 | syntax. That looks like this:
146 |
147 | cgi [matcher] exec [args...] {
148 | script_name subpath
149 | dir working_directory
150 | env key1=val1 [key2=val2...]
151 | pass_env key1 [key2...]
152 | pass_all_env
153 | buffer_limit
154 | unbuffered_output
155 | inspect
156 | }
157 |
158 | For example,
159 |
160 | cgi /sample/report* /usr/local/bin/reportscript.sh {
161 | script_name /sample/report
162 | env DB=/usr/local/share/app/app.db SECRET=/usr/local/share/app/secret CGI_LOCAL=
163 | pass_env HOME UID
164 | }
165 |
166 | The script_name subdirective helps the cgi module to separate the path
167 | to the script from the (virtual) path afterwards (which shall be passed
168 | to the script).
169 |
170 | env can be used to define a list of key=value environment variable pairs
171 | that shall be passed to the script. pass_env can be used to define a
172 | list of environment variables of the Caddy process that shall be passed
173 | to the script.
174 |
175 | If your CGI application runs properly at the command line but fails to
176 | run from Caddy it is possible that certain environment variables may be
177 | missing. For example, the ruby gem loader evidently requires the HOME
178 | environment variable to be set; you can do this with the subdirective
179 | pass_env HOME. Another class of problematic applications require the
180 | COMPUTERNAME variable.
181 |
182 | The pass_all_env subdirective instructs Caddy to pass each environment
183 | variable it knows about to the CGI excutable. This addresses a common
184 | frustration that is caused when an executable requires an environment
185 | variable and fails without a descriptive error message when the variable
186 | cannot be found. These applications often run fine from the command
187 | prompt but fail when invoked with CGI. The risk with this subdirective
188 | is that a lot of server information is shared with the CGI executable.
189 | Use this subdirective only with CGI applications that you trust not to
190 | leak this information.
191 |
192 | buffer_limit is used when a http request has
193 | Transfer-Endcoding: chunked. The Go CGI Handler refused to handle these
194 | kinds of requests, see https://github.com/golang/go/issues/5613. In
195 | order to work around this the chunked request is buffered by caddy and
196 | sent to the CGI application as a whole with the correct CONTENT_LENGTH
197 | set. The buffer_limit setting marks a threshold between buffering in
198 | memory and using a temporary file. Every request body smaller than the
199 | buffer_limit is buffered in-memory. It accepts all formats supported by
200 | go-humanize. Default: 4MiB.
201 | (An example of this is git push if the objects to push are larger than
202 | the http.postBuffer)
203 |
204 | With the unbuffered_output subdirective it is possible to instruct the
205 | CGI handler to flush output from the CGI script as soon as possible. By
206 | default, the output is buffered into chunks before it is being written
207 | to optimize the network usage and allow to determine the Content-Length.
208 | When unbuffered, bytes will be written as soon as possible. This will
209 | also force the response to be written in chunked encoding.
210 |
211 | # Troubleshooting
212 |
213 | If you run into unexpected results with the CGI plugin, you are able to
214 | examine the environment in which your CGI application runs. To enter
215 | inspection mode, add the subdirective inspect to your CGI configuration
216 | block. This is a development option that should not be used in
217 | production. When in inspection mode, the plugin will respond to matching
218 | requests with a page that displays variables of interest. In particular,
219 | it will show the replacement value of {match} and the environment
220 | variables to which your CGI application has access.
221 |
222 | For example, consider this example CGI block:
223 |
224 | cgi /wapp/*.tcl /usr/local/bin/wapptclsh /home/quixote/projects{path} {
225 | script_name /wapp
226 | pass_env HOME LANG
227 | env DB=/usr/local/share/app/app.db SECRET=/usr/local/share/app/secret
228 | inspect
229 | }
230 |
231 | When you request a matching URL, for example,
232 |
233 | https://example.com/wapp/hello.tcl
234 |
235 | the Caddy server will deliver a text page similar to the following. The
236 | CGI application (in this case, wapptclsh) will not be called.
237 |
238 | CGI for Caddy inspection page
239 |
240 | Executable .................... /usr/local/bin/wapptclsh
241 | Arg 1 ....................... /home/quixote/projects/hello.tcl
242 | Root .......................... /
243 | Dir ........................... /home/quixote/www
244 | Environment
245 | DB .......................... /usr/local/share/app/app.db
246 | PATH_INFO ...................
247 | REMOTE_USER .................
248 | SCRIPT_EXEC ................. /usr/local/bin/wapptclsh /home/quixote/projects/hello.tcl
249 | SCRIPT_FILENAME ............. /usr/local/bin/wapptclsh
250 | SCRIPT_NAME ................. /wapp/hello
251 | SECRET ...................... /usr/local/share/app/secret
252 | Inherited environment
253 | HOME ........................ /home/quixote
254 | LANG ........................ en_US.UTF-8
255 | Placeholders
256 | {path} ...................... /hello
257 | {root} ...................... /
258 | {http.request.host} ......... example.com
259 | {http.request.host} ......... GET
260 | {http.request.host} ......... /wapp/hello.tcl
261 |
262 | This information can be used to diagnose problems with how a CGI
263 | application is called.
264 |
265 | To return to operation mode, remove or comment out the inspect
266 | subdirective.
267 |
268 | # Environment Variable Example
269 |
270 | In this example, the Caddyfile looks like this:
271 |
272 | {
273 | http_port 8080
274 | order cgi before respond
275 | }
276 |
277 | 192.168.1.2:8080
278 | cgi /show* /usr/local/cgi-bin/report/gen {
279 | script_name /show
280 | }
281 |
282 | Note that a request for /show gets mapped to a script named
283 | /usr/local/cgi-bin/report/gen. There is no need for any element of the
284 | script name to match any element of the match pattern.
285 |
286 | The contents of /usr/local/cgi-bin/report/gen are:
287 |
288 | #!/bin/bash
289 |
290 | printf "Content-type: text/plain\n\n"
291 |
292 | printf "example error message\n" > /dev/stderr
293 |
294 | if [ "POST" = "$REQUEST_METHOD" -a -n "$CONTENT_LENGTH" ]; then
295 | read -n "$CONTENT_LENGTH" POST_DATA
296 | fi
297 |
298 | printf "AUTH_TYPE [%s]\n" $AUTH_TYPE
299 | printf "CONTENT_LENGTH [%s]\n" $CONTENT_LENGTH
300 | printf "CONTENT_TYPE [%s]\n" $CONTENT_TYPE
301 | printf "GATEWAY_INTERFACE [%s]\n" $GATEWAY_INTERFACE
302 | printf "PATH_INFO [%s]\n" $PATH_INFO
303 | printf "PATH_TRANSLATED [%s]\n" $PATH_TRANSLATED
304 | printf "POST_DATA [%s]\n" $POST_DATA
305 | printf "QUERY_STRING [%s]\n" $QUERY_STRING
306 | printf "REMOTE_ADDR [%s]\n" $REMOTE_ADDR
307 | printf "REMOTE_HOST [%s]\n" $REMOTE_HOST
308 | printf "REMOTE_IDENT [%s]\n" $REMOTE_IDENT
309 | printf "REMOTE_USER [%s]\n" $REMOTE_USER
310 | printf "REQUEST_METHOD [%s]\n" $REQUEST_METHOD
311 | printf "SCRIPT_EXEC [%s]\n" $SCRIPT_EXEC
312 | printf "SCRIPT_NAME [%s]\n" $SCRIPT_NAME
313 | printf "SERVER_NAME [%s]\n" $SERVER_NAME
314 | printf "SERVER_PORT [%s]\n" $SERVER_PORT
315 | printf "SERVER_PROTOCOL [%s]\n" $SERVER_PROTOCOL
316 | printf "SERVER_SOFTWARE [%s]\n" $SERVER_SOFTWARE
317 |
318 | exit 0
319 |
320 | The purpose of this script is to show how request information gets
321 | communicated to a CGI script. Note that POST data must be read from
322 | standard input. In this particular case, posted data gets stored in the
323 | variable POST_DATA. Your script may use a different method to read POST
324 | content. Secondly, the SCRIPT_EXEC variable is not a CGI standard. It is
325 | provided by this middleware and contains the entire command line,
326 | including all arguments, with which the CGI script was executed.
327 |
328 | When a browser requests
329 |
330 | http://192.168.1.2:8080/show/weekly?mode=summary
331 |
332 | the response looks like
333 |
334 | AUTH_TYPE []
335 | CONTENT_LENGTH []
336 | CONTENT_TYPE []
337 | GATEWAY_INTERFACE [CGI/1.1]
338 | PATH_INFO [/weekly]
339 | PATH_TRANSLATED []
340 | POST_DATA []
341 | QUERY_STRING [mode=summary]
342 | REMOTE_ADDR [192.168.1.35]
343 | REMOTE_HOST [192.168.1.35]
344 | REMOTE_IDENT []
345 | REMOTE_USER []
346 | REQUEST_METHOD [GET]
347 | SCRIPT_EXEC [/usr/local/cgi-bin/report/gen]
348 | SCRIPT_NAME [/show]
349 | SERVER_NAME [192.168.1.2:8080]
350 | SERVER_PORT [8080]
351 | SERVER_PROTOCOL [HTTP/1.1]
352 | SERVER_SOFTWARE [go]
353 |
354 | When a client makes a POST request, such as with the following command
355 |
356 | wget -O - -q --post-data="city=San%20Francisco" http://192.168.1.2:8080/show/weekly?mode=summary
357 |
358 | the response looks the same except for the following lines:
359 |
360 | CONTENT_LENGTH [20]
361 | CONTENT_TYPE [application/x-www-form-urlencoded]
362 | POST_DATA [city=San%20Francisco]
363 | REQUEST_METHOD [POST]
364 |
365 | # Go Source Example
366 |
367 | This small example demonstrates how to write a CGI program in Go. The
368 | use of a bytes.Buffer makes it easy to report the content length in the
369 | CGI header.
370 |
371 | package main
372 |
373 | import (
374 | "bytes"
375 | "fmt"
376 | "os"
377 | "time"
378 | )
379 |
380 | func main() {
381 | var buf bytes.Buffer
382 |
383 | fmt.Fprintf(&buf, "Server time at %s is %s\n",
384 | os.Getenv("SERVER_NAME"), time.Now().Format(time.RFC1123))
385 | fmt.Println("Content-type: text/plain")
386 | fmt.Printf("Content-Length: %d\n\n", buf.Len())
387 | buf.WriteTo(os.Stdout)
388 | }
389 |
390 | When this program is compiled and installed as
391 | /usr/local/bin/servertime, the following directive in your Caddy file
392 | will make it available:
393 |
394 | cgi /servertime /usr/local/bin/servertime
395 |
396 | # Execute dynamic script
397 |
398 | The module is written in a way that it expects the scripts you want it
399 | to execute to actually exist. A non-existing or non-executable file is
400 | considered a setup error and will yield a HTTP 500.
401 |
402 | If you want to make sure, only existing scripts are executed, use a more
403 | specific matcher, as explained in the Caddy docs.
404 |
405 | Example:
406 |
407 | @iscgi {
408 | path /cgi/*
409 | file {
410 | root ./app/
411 | }
412 | }
413 | cgi @iscgi ./app{path}
414 |
415 | When calling a url like /cgi/foo/bar.pl it will check if the local file
416 | ./app/foo/bar.pl exists and only then it will proceed with calling the
417 | CGI.
418 | */
419 | package cgi
420 |
--------------------------------------------------------------------------------
/doc/caddy.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | - cgi
7 | - dir
8 | - empty_env
9 | - env
10 | - except
11 | - exec
12 | - inspect
13 | - match
14 | - pass_all_env
15 | - pass_env
16 | - root
17 | - script_name
18 | - buffer_limit
19 | - unbuffered_output
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
--------------------------------------------------------------------------------
/doc/document.md:
--------------------------------------------------------------------------------
1 | # CGI for Caddy
2 |
3 | [![MIT licensed][badge-mit]][license]
4 | [![Report][badge-report]][report]
5 |
6 | Package cgi implements the common gateway interface ([CGI][cgi-wiki]) for
7 | [Caddy 2][caddy], a modern, full-featured, easy-to-use web server.
8 |
9 | It has been forked from the fantastic work of [Kurt Jung][fork-root]
10 | who wrote that plugin for Caddy 1.
11 |
12 | ## Documentation
13 |
14 | This plugin lets you generate dynamic content on your website by means of
15 | command line scripts. To collect information about the inbound HTTP request,
16 | your script examines certain environment variables such as
17 | `PATH_INFO` and `QUERY_STRING`. Then, to return a dynamically
18 | generated web page to the client, your script simply writes content to standard
19 | output. In the case of POST requests, your script reads additional inbound
20 | content from standard input.
21 |
22 | The advantage of CGI is that you do not need to fuss with server startup and
23 | persistence, long term memory management, sockets, and crash recovery. Your
24 | script is called when a request matches one of the patterns that you specify in
25 | your Caddyfile. As soon as your script completes its response, it terminates.
26 | This simplicity makes CGI a perfect complement to the straightforward operation
27 | and configuration of Caddy. The benefits of Caddy, including HTTPS by default,
28 | basic access authentication, and lots of middleware options extend easily to
29 | your CGI scripts.
30 |
31 | CGI has some disadvantages. For one, Caddy needs to start a new process for
32 | each request. This can adversely impact performance and, if resources are
33 | shared between CGI applications, may require the use of some interprocess
34 | synchronization mechanism such as a file lock. Your server\'s responsiveness
35 | could in some circumstances be affected, such as when your web server is hit
36 | with very high demand, when your script\'s dependencies require a long startup,
37 | or when concurrently running scripts take a long time to respond. However, in
38 | many cases, such as using a pre-compiled CGI application like fossil or a Lua
39 | script, the impact will generally be insignificant. Another restriction of CGI
40 | is that scripts will be run with the same permissions as Caddy itself. This can
41 | sometimes be less than ideal, for example when your script needs to read or
42 | write files associated with a different owner.
43 |
44 | ### Security Considerations
45 |
46 | Serving dynamic content exposes your server to more potential threats than
47 | serving static pages. There are a number of considerations of which you should
48 | be aware when using CGI applications.
49 |
50 | ::: warning
51 | **CGI scripts should be located outside of Caddy\'s document root.**
52 | Otherwise, an inadvertent misconfiguration could result in Caddy delivering
53 | the script as an ordinary static resource. At best, this could merely
54 | confuse the site visitor. At worst, it could expose sensitive internal
55 | information that should not leave the server.
56 | :::
57 |
58 | ::: warning
59 | **Mistrust the contents of `PATH_INFO`, `QUERY_STRING` and standard input.**
60 | Most of the environment variables available to your CGI program are
61 | inherently safe because they originate with Caddy and cannot be modified by
62 | external users. This is not the case with `PATH_INFO`, `QUERY_STRING` and,
63 | in the case of POST actions, the contents of standard input. Be sure to
64 | validate and sanitize all inbound content. If you use a CGI library or
65 | framework to process your scripts, make sure you understand its
66 | limitations.
67 | :::
68 |
69 | ### Errors
70 |
71 | An error in a CGI application is generally handled within the application
72 | itself and reported in the headers it returns.
73 |
74 | ### Application Modes
75 |
76 | Your CGI application can be executed directly or indirectly. In the direct
77 | case, the application can be a compiled native executable or it can be a shell
78 | script that contains as its first line a shebang that identifies the
79 | interpreter to which the file\'s name should be passed. Caddy must have
80 | permission to execute the application. On Posix systems this will mean making
81 | sure the application\'s ownership and permission bits are set appropriately; on
82 | Windows, this may involve properly setting up the filename extension
83 | association.
84 |
85 | In the indirect case, the name of the CGI script is passed to an interpreter
86 | such as lua, perl or python.
87 |
88 | ### Requirements
89 |
90 | This module needs to be installed (obviously).
91 |
92 | Refer to the Caddy documentation on how to build Caddy with plugins/modules.
93 |
94 | > **Note**: If you build manually, beware to include the major version in the
95 | > module path. For example `xcaddy build --with=github.com/aksdb/caddy-cgi/v2`.
96 |
97 | ### Basic Syntax
98 |
99 | The basic cgi directive lets you add a handler in the current caddy router location
100 | with a given script and optional arguments. The matcher is a default caddy matcher
101 | that is used to restrict the scope of this directive. The directive can be repeated
102 | any reasonable number of times. Here is the basic syntax:
103 |
104 | ``` caddy
105 | cgi [matcher] exec [args...]
106 | ```
107 |
108 | For example:
109 |
110 | ``` caddy
111 | cgi /report /usr/local/cgi-bin/report
112 | ```
113 |
114 | When a request such as or
115 | arrives, the cgi middleware will detect the
116 | match and invoke the script named /usr/local/cgi-bin/report. The current
117 | working directory will be the same as Caddy itself. Here, it is assumed that
118 | the script is self-contained, for example a pre-compiled CGI application or a
119 | shell script. Here is an example of a standalone script, similar to one used in
120 | the cgi plugin\'s test suite:
121 |
122 | ``` shell
123 | #!/bin/bash
124 |
125 | printf "Content-type: text/plain\n\n"
126 |
127 | printf "PATH_INFO [%s]\n" $PATH_INFO
128 | printf "QUERY_STRING [%s]\n" $QUERY_STRING
129 |
130 | exit 0
131 | ```
132 |
133 | The environment variables `PATH_INFO` and `QUERY_STRING` are populated and
134 | passed to the script automatically. There are a number of other standard CGI
135 | variables included that are described below. If you need to pass any special
136 | environment variables or allow any environment variables that are part of
137 | Caddy\'s process to pass to your script, you will need to use the advanced
138 | directive syntax described below.
139 |
140 | Beware that in Caddy v2 it is (currently) not possible to separate the path
141 | left of the matcher from the full URL. Therefore if you require your CGI
142 | program to know the `SCRIPT_NAME`, make sure to pass that explicitly:
143 |
144 | ```caddy
145 | cgi /script.cgi* /path/to/my/script someargument {
146 | script_name /script.cgi
147 | }
148 | ```
149 |
150 | ### Advanced Syntax
151 |
152 | In order to specify custom environment variables, pass along one or more
153 | environment variables known to Caddy, or specify more than one match pattern
154 | for a given rule, you will need to use the advanced directive syntax. That
155 | looks like this:
156 |
157 | ``` caddy
158 | cgi [matcher] exec [args...] {
159 | script_name subpath
160 | dir working_directory
161 | env key1=val1 [key2=val2...]
162 | pass_env key1 [key2...]
163 | pass_all_env
164 | buffer_limit
165 | unbuffered_output
166 | inspect
167 | }
168 | ```
169 |
170 | For example,
171 |
172 | ``` caddy
173 | cgi /sample/report* /usr/local/bin/reportscript.sh {
174 | script_name /sample/report
175 | env DB=/usr/local/share/app/app.db SECRET=/usr/local/share/app/secret CGI_LOCAL=
176 | pass_env HOME UID
177 | }
178 | ```
179 |
180 | The `script_name` subdirective helps the cgi module to separate the path to
181 | the script from the (virtual) path afterwards (which shall be passed to the
182 | script).
183 |
184 | `env` can be used to define a list of `key=value` environment variable pairs
185 | that shall be passed to the script. `pass_env` can be used to define a list
186 | of environment variables of the Caddy process that shall be passed to the
187 | script.
188 |
189 | If your CGI application runs properly at the command line but fails to run from
190 | Caddy it is possible that certain environment variables may be missing. For
191 | example, the ruby gem loader evidently requires the `HOME` environment variable
192 | to be set; you can do this with the subdirective `pass_env HOME`. Another class
193 | of problematic applications require the `COMPUTERNAME` variable.
194 |
195 | The `pass_all_env` subdirective instructs Caddy to pass each environment
196 | variable it knows about to the CGI excutable. This addresses a common
197 | frustration that is caused when an executable requires an environment variable
198 | and fails without a descriptive error message when the variable cannot be
199 | found. These applications often run fine from the command prompt but fail when
200 | invoked with CGI. The risk with this subdirective is that a lot of server
201 | information is shared with the CGI executable. Use this subdirective only with
202 | CGI applications that you trust not to leak this information.
203 |
204 | `buffer_limit` is used when a http request has `Transfer-Endcoding: chunked`.
205 | The Go CGI Handler refused to handle these kinds of requests, see
206 | . In order to work around this the
207 | chunked request is buffered by caddy and sent to the CGI application as a whole
208 | with the correct `CONTENT_LENGTH` set. The `buffer_limit` setting marks a
209 | threshold between buffering in memory and using a temporary file. Every request
210 | body smaller than the `buffer_limit` is buffered in-memory. It accepts all
211 | formats supported by
212 | [go-humanize](https://github.com/dustin/go-humanize/blob/master/bytes.go).
213 | Default: `4MiB`.
214 | (An example of this is `git push` if the objects to push are larger than the
215 | [`http.postBuffer`](https://git-scm.com/docs/git-config#Documentation/git-config.txt-httppostBuffer))
216 |
217 | With the `unbuffered_output` subdirective it is possible to instruct the CGI
218 | handler to flush output from the CGI script as soon as possible. By default, the
219 | output is buffered into chunks before it is being written to optimize the
220 | network usage and allow to determine the Content-Length. When unbuffered, bytes
221 | will be written as soon as possible. This will also force the response to be
222 | written in chunked encoding.
223 |
224 | ### Troubleshooting
225 |
226 | If you run into unexpected results with the CGI plugin, you are able to examine
227 | the environment in which your CGI application runs. To enter inspection mode,
228 | add the subdirective `inspect` to your CGI configuration block. This is a
229 | development option that should not be used in production. When in inspection
230 | mode, the plugin will respond to matching requests with a page that displays
231 | variables of interest. In particular, it will show the replacement value of
232 | `{match}` and the environment variables to which your CGI application has
233 | access.
234 |
235 | For example, consider this example CGI block:
236 |
237 | ``` caddy
238 | cgi /wapp/*.tcl /usr/local/bin/wapptclsh /home/quixote/projects{path} {
239 | script_name /wapp
240 | pass_env HOME LANG
241 | env DB=/usr/local/share/app/app.db SECRET=/usr/local/share/app/secret
242 | inspect
243 | }
244 | ```
245 |
246 | When you request a matching URL, for example,
247 |
248 | ``` plain
249 | https://example.com/wapp/hello.tcl
250 | ```
251 |
252 | the Caddy server will deliver a text page similar to the following. The CGI
253 | application (in this case, wapptclsh) will not be called.
254 |
255 | ``` plain
256 | CGI for Caddy inspection page
257 |
258 | Executable .................... /usr/local/bin/wapptclsh
259 | Arg 1 ....................... /home/quixote/projects/hello.tcl
260 | Root .......................... /
261 | Dir ........................... /home/quixote/www
262 | Environment
263 | DB .......................... /usr/local/share/app/app.db
264 | PATH_INFO ...................
265 | REMOTE_USER .................
266 | SCRIPT_EXEC ................. /usr/local/bin/wapptclsh /home/quixote/projects/hello.tcl
267 | SCRIPT_FILENAME ............. /usr/local/bin/wapptclsh
268 | SCRIPT_NAME ................. /wapp/hello
269 | SECRET ...................... /usr/local/share/app/secret
270 | Inherited environment
271 | HOME ........................ /home/quixote
272 | LANG ........................ en_US.UTF-8
273 | Placeholders
274 | {path} ...................... /hello
275 | {root} ...................... /
276 | {http.request.host} ......... example.com
277 | {http.request.host} ......... GET
278 | {http.request.host} ......... /wapp/hello.tcl
279 | ```
280 |
281 | This information can be used to diagnose problems with how a CGI application is
282 | called.
283 |
284 | To return to operation mode, remove or comment out the `inspect` subdirective.
285 |
286 | ### Environment Variable Example
287 |
288 | In this example, the Caddyfile looks like this:
289 |
290 | ``` caddy
291 | {
292 | http_port 8080
293 | order cgi before respond
294 | }
295 |
296 | 192.168.1.2:8080
297 | cgi /show* /usr/local/cgi-bin/report/gen {
298 | script_name /show
299 | }
300 | ```
301 |
302 | Note that a request for /show gets mapped to a script named
303 | /usr/local/cgi-bin/report/gen. There is no need for any element of the script
304 | name to match any element of the match pattern.
305 |
306 | The contents of /usr/local/cgi-bin/report/gen are:
307 |
308 | ``` shell
309 | #!/bin/bash
310 |
311 | printf "Content-type: text/plain\n\n"
312 |
313 | printf "example error message\n" > /dev/stderr
314 |
315 | if [ "POST" = "$REQUEST_METHOD" -a -n "$CONTENT_LENGTH" ]; then
316 | read -n "$CONTENT_LENGTH" POST_DATA
317 | fi
318 |
319 | printf "AUTH_TYPE [%s]\n" $AUTH_TYPE
320 | printf "CONTENT_LENGTH [%s]\n" $CONTENT_LENGTH
321 | printf "CONTENT_TYPE [%s]\n" $CONTENT_TYPE
322 | printf "GATEWAY_INTERFACE [%s]\n" $GATEWAY_INTERFACE
323 | printf "PATH_INFO [%s]\n" $PATH_INFO
324 | printf "PATH_TRANSLATED [%s]\n" $PATH_TRANSLATED
325 | printf "POST_DATA [%s]\n" $POST_DATA
326 | printf "QUERY_STRING [%s]\n" $QUERY_STRING
327 | printf "REMOTE_ADDR [%s]\n" $REMOTE_ADDR
328 | printf "REMOTE_HOST [%s]\n" $REMOTE_HOST
329 | printf "REMOTE_IDENT [%s]\n" $REMOTE_IDENT
330 | printf "REMOTE_USER [%s]\n" $REMOTE_USER
331 | printf "REQUEST_METHOD [%s]\n" $REQUEST_METHOD
332 | printf "SCRIPT_EXEC [%s]\n" $SCRIPT_EXEC
333 | printf "SCRIPT_NAME [%s]\n" $SCRIPT_NAME
334 | printf "SERVER_NAME [%s]\n" $SERVER_NAME
335 | printf "SERVER_PORT [%s]\n" $SERVER_PORT
336 | printf "SERVER_PROTOCOL [%s]\n" $SERVER_PROTOCOL
337 | printf "SERVER_SOFTWARE [%s]\n" $SERVER_SOFTWARE
338 |
339 | exit 0
340 | ```
341 |
342 | The purpose of this script is to show how request information gets communicated
343 | to a CGI script. Note that POST data must be read from standard input. In this
344 | particular case, posted data gets stored in the variable `POST_DATA`. Your
345 | script may use a different method to read POST content. Secondly, the
346 | `SCRIPT_EXEC` variable is not a CGI standard. It is provided by this middleware
347 | and contains the entire command line, including all arguments, with which the
348 | CGI script was executed.
349 |
350 | When a browser requests
351 |
352 | ``` plain
353 | http://192.168.1.2:8080/show/weekly?mode=summary
354 | ```
355 |
356 | the response looks like
357 |
358 | ``` plain
359 | AUTH_TYPE []
360 | CONTENT_LENGTH []
361 | CONTENT_TYPE []
362 | GATEWAY_INTERFACE [CGI/1.1]
363 | PATH_INFO [/weekly]
364 | PATH_TRANSLATED []
365 | POST_DATA []
366 | QUERY_STRING [mode=summary]
367 | REMOTE_ADDR [192.168.1.35]
368 | REMOTE_HOST [192.168.1.35]
369 | REMOTE_IDENT []
370 | REMOTE_USER []
371 | REQUEST_METHOD [GET]
372 | SCRIPT_EXEC [/usr/local/cgi-bin/report/gen]
373 | SCRIPT_NAME [/show]
374 | SERVER_NAME [192.168.1.2:8080]
375 | SERVER_PORT [8080]
376 | SERVER_PROTOCOL [HTTP/1.1]
377 | SERVER_SOFTWARE [go]
378 | ```
379 |
380 | When a client makes a POST request, such as with the following command
381 |
382 | ``` shell
383 | wget -O - -q --post-data="city=San%20Francisco" http://192.168.1.2:8080/show/weekly?mode=summary
384 | ```
385 |
386 | the response looks the same except for the following lines:
387 |
388 | ``` plain
389 | CONTENT_LENGTH [20]
390 | CONTENT_TYPE [application/x-www-form-urlencoded]
391 | POST_DATA [city=San%20Francisco]
392 | REQUEST_METHOD [POST]
393 | ```
394 |
395 | ### Go Source Example
396 |
397 | This small example demonstrates how to write a CGI program in Go. The use of a
398 | bytes.Buffer makes it easy to report the content length in the CGI header.
399 |
400 | ``` go
401 | package main
402 |
403 | import (
404 | "bytes"
405 | "fmt"
406 | "os"
407 | "time"
408 | )
409 |
410 | func main() {
411 | var buf bytes.Buffer
412 |
413 | fmt.Fprintf(&buf, "Server time at %s is %s\n",
414 | os.Getenv("SERVER_NAME"), time.Now().Format(time.RFC1123))
415 | fmt.Println("Content-type: text/plain")
416 | fmt.Printf("Content-Length: %d\n\n", buf.Len())
417 | buf.WriteTo(os.Stdout)
418 | }
419 | ```
420 |
421 | When this program is compiled and installed as /usr/local/bin/servertime, the
422 | following directive in your Caddy file will make it available:
423 |
424 | ``` caddy
425 | cgi /servertime /usr/local/bin/servertime
426 | ```
427 |
428 | ### Execute dynamic script
429 |
430 | The module is written in a way that it expects the scripts you want it to
431 | execute to actually exist. A non-existing or non-executable file is considered
432 | a setup error and will yield a HTTP 500.
433 |
434 | If you want to make sure, only existing scripts are executed, use a more
435 | specific matcher, as explained in the Caddy docs.
436 |
437 | Example:
438 |
439 | ```caddy
440 | @iscgi {
441 | path /cgi/*
442 | file {
443 | root ./app/
444 | }
445 | }
446 | cgi @iscgi ./app{path}
447 | ```
448 |
449 | When calling a url like `/cgi/foo/bar.pl` it will check if the local file
450 | `./app/foo/bar.pl` exists and only then it will proceed with calling the CGI.
451 |
452 | [agedu]: http://www.chiark.greenend.org.uk/~sgtatham/agedu/
453 | [auth]: https://caddyserver.com/docs/basicauth
454 | [badge-mit]: https://img.shields.io/badge/license-MIT-blue.svg
455 | [badge-report]: https://goreportcard.com/badge/github.com/aksdb/caddy-cgi
456 | [caddy]: https://caddyserver.com/
457 | [cgit]: https://git.zx2c4.com/cgit/about/
458 | [cgi-wiki]: https://en.wikipedia.org/wiki/Common_Gateway_Interface
459 | [fastcgi]: https://caddyserver.com/docs/fastcgi
460 | [fork-root]: https://github.com/jung-kurt/caddy-cgi
461 | [fossil]: https://www.fossil-scm.org/
462 | [github]: https://github.com/jung-kurt/caddy-cgi
463 | [jwt]: https://github.com/BTBurke/caddy-jwt
464 | [key]: class:key
465 | [license]: https://raw.githubusercontent.com/aksdb/caddy-cgi/master/LICENSE
466 | [match]: https://golang.org/pkg/path/#Match
467 | [php]: http://php.net/
468 | [report]: https://goreportcard.com/report/github.com/aksdb/caddy-cgi
469 | [subkey]: class:subkey
470 |
--------------------------------------------------------------------------------
/doc/go.awk:
--------------------------------------------------------------------------------
1 | BEGIN { show = 0 ; print "/*" }
2 |
3 | /^\-/ { trim = 1 ; print "" }
4 |
5 | /^Package/ { show = 1 }
6 |
7 | !NF { trim = 0 }
8 |
9 | trim { sub("^ +", "", $0) }
10 |
11 | show { print $0 }
12 |
13 | END { print "*/\npackage " package_name }
14 |
--------------------------------------------------------------------------------
/doc/html.txt:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 | CGI for Caddy
9 |
58 |
59 |
60 |
61 | $body$
62 |
63 |
64 |
65 |
--------------------------------------------------------------------------------
/go.mod:
--------------------------------------------------------------------------------
1 | module github.com/aksdb/caddy-cgi/v2
2 |
3 | go 1.24.0
4 |
5 | require (
6 | github.com/caddyserver/caddy/v2 v2.9.1
7 | github.com/dustin/go-humanize v1.0.1
8 | github.com/stretchr/testify v1.10.0
9 | go.uber.org/zap v1.27.0
10 | )
11 |
12 | require (
13 | dario.cat/mergo v1.0.1 // indirect
14 | filippo.io/edwards25519 v1.1.0 // indirect
15 | github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 // indirect
16 | github.com/BurntSushi/toml v1.4.0 // indirect
17 | github.com/Masterminds/goutils v1.1.1 // indirect
18 | github.com/Masterminds/semver/v3 v3.3.0 // indirect
19 | github.com/Masterminds/sprig/v3 v3.3.0 // indirect
20 | github.com/Microsoft/go-winio v0.6.0 // indirect
21 | github.com/alecthomas/chroma/v2 v2.14.0 // indirect
22 | github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
23 | github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b // indirect
24 | github.com/beorn7/perks v1.0.1 // indirect
25 | github.com/caddyserver/certmagic v0.21.7 // indirect
26 | github.com/caddyserver/zerossl v0.1.3 // indirect
27 | github.com/cenkalti/backoff/v4 v4.3.0 // indirect
28 | github.com/cespare/xxhash v1.1.0 // indirect
29 | github.com/cespare/xxhash/v2 v2.3.0 // indirect
30 | github.com/chzyer/readline v1.5.1 // indirect
31 | github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect
32 | github.com/davecgh/go-spew v1.1.1 // indirect
33 | github.com/dgraph-io/badger v1.6.2 // indirect
34 | github.com/dgraph-io/badger/v2 v2.2007.4 // indirect
35 | github.com/dgraph-io/ristretto v0.1.1 // indirect
36 | github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect
37 | github.com/dlclark/regexp2 v1.11.0 // indirect
38 | github.com/felixge/httpsnoop v1.0.4 // indirect
39 | github.com/francoispqt/gojay v1.2.13 // indirect
40 | github.com/fxamacker/cbor/v2 v2.6.0 // indirect
41 | github.com/go-chi/chi/v5 v5.0.12 // indirect
42 | github.com/go-jose/go-jose/v3 v3.0.3 // indirect
43 | github.com/go-kit/kit v0.13.0 // indirect
44 | github.com/go-kit/log v0.2.1 // indirect
45 | github.com/go-logfmt/logfmt v0.6.0 // indirect
46 | github.com/go-logr/logr v1.4.2 // indirect
47 | github.com/go-logr/stdr v1.2.2 // indirect
48 | github.com/go-sql-driver/mysql v1.7.1 // indirect
49 | github.com/go-task/slim-sprig/v3 v3.0.0 // indirect
50 | github.com/golang/glog v1.2.2 // indirect
51 | github.com/golang/protobuf v1.5.4 // indirect
52 | github.com/golang/snappy v0.0.4 // indirect
53 | github.com/google/cel-go v0.21.0 // indirect
54 | github.com/google/certificate-transparency-go v1.1.8-0.20240110162603-74a5dd331745 // indirect
55 | github.com/google/go-tpm v0.9.0 // indirect
56 | github.com/google/go-tspi v0.3.0 // indirect
57 | github.com/google/pprof v0.0.0-20250208200701-d0013a598941 // indirect
58 | github.com/google/uuid v1.6.0 // indirect
59 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect
60 | github.com/huandu/xstrings v1.5.0 // indirect
61 | github.com/inconshreveable/mousetrap v1.1.0 // indirect
62 | github.com/jackc/chunkreader/v2 v2.0.1 // indirect
63 | github.com/jackc/pgconn v1.14.3 // indirect
64 | github.com/jackc/pgio v1.0.0 // indirect
65 | github.com/jackc/pgpassfile v1.0.0 // indirect
66 | github.com/jackc/pgproto3/v2 v2.3.3 // indirect
67 | github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a // indirect
68 | github.com/jackc/pgtype v1.14.0 // indirect
69 | github.com/jackc/pgx/v4 v4.18.3 // indirect
70 | github.com/klauspost/compress v1.17.11 // indirect
71 | github.com/klauspost/cpuid/v2 v2.2.9 // indirect
72 | github.com/libdns/libdns v0.2.3 // indirect
73 | github.com/manifoldco/promptui v0.9.0 // indirect
74 | github.com/mattn/go-colorable v0.1.13 // indirect
75 | github.com/mattn/go-isatty v0.0.20 // indirect
76 | github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
77 | github.com/mholt/acmez/v3 v3.0.1 // indirect
78 | github.com/miekg/dns v1.1.63 // indirect
79 | github.com/mitchellh/copystructure v1.2.0 // indirect
80 | github.com/mitchellh/go-ps v1.0.0 // indirect
81 | github.com/mitchellh/reflectwalk v1.0.2 // indirect
82 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
83 | github.com/onsi/ginkgo/v2 v2.22.2 // indirect
84 | github.com/pires/go-proxyproto v0.7.1-0.20240628150027-b718e7ce4964 // indirect
85 | github.com/pkg/errors v0.9.1 // indirect
86 | github.com/pmezard/go-difflib v1.0.0 // indirect
87 | github.com/prometheus/client_golang v1.21.0 // indirect
88 | github.com/prometheus/client_model v0.6.1 // indirect
89 | github.com/prometheus/common v0.62.0 // indirect
90 | github.com/prometheus/procfs v0.15.1 // indirect
91 | github.com/quic-go/qpack v0.5.1 // indirect
92 | github.com/quic-go/quic-go v0.50.0 // indirect
93 | github.com/rs/xid v1.5.0 // indirect
94 | github.com/russross/blackfriday/v2 v2.1.0 // indirect
95 | github.com/shopspring/decimal v1.4.0 // indirect
96 | github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
97 | github.com/sirupsen/logrus v1.9.3 // indirect
98 | github.com/slackhq/nebula v1.6.1 // indirect
99 | github.com/smallstep/certificates v0.26.1 // indirect
100 | github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935 // indirect
101 | github.com/smallstep/nosql v0.6.1 // indirect
102 | github.com/smallstep/pkcs7 v0.0.0-20231024181729-3b98ecc1ca81 // indirect
103 | github.com/smallstep/scep v0.0.0-20231024192529-aee96d7ad34d // indirect
104 | github.com/smallstep/truststore v0.13.0 // indirect
105 | github.com/spf13/cast v1.7.0 // indirect
106 | github.com/spf13/cobra v1.8.1 // indirect
107 | github.com/spf13/pflag v1.0.5 // indirect
108 | github.com/stoewer/go-strcase v1.2.0 // indirect
109 | github.com/tailscale/tscert v0.0.0-20240608151842-d3f834017e53 // indirect
110 | github.com/urfave/cli v1.22.14 // indirect
111 | github.com/x448/float16 v0.8.4 // indirect
112 | github.com/yuin/goldmark v1.7.8 // indirect
113 | github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc // indirect
114 | github.com/zeebo/blake3 v0.2.4 // indirect
115 | go.etcd.io/bbolt v1.3.9 // indirect
116 | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 // indirect
117 | go.opentelemetry.io/contrib/propagators/autoprop v0.42.0 // indirect
118 | go.opentelemetry.io/contrib/propagators/aws v1.17.0 // indirect
119 | go.opentelemetry.io/contrib/propagators/b3 v1.17.0 // indirect
120 | go.opentelemetry.io/contrib/propagators/jaeger v1.17.0 // indirect
121 | go.opentelemetry.io/contrib/propagators/ot v1.17.0 // indirect
122 | go.opentelemetry.io/otel v1.31.0 // indirect
123 | go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 // indirect
124 | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 // indirect
125 | go.opentelemetry.io/otel/metric v1.31.0 // indirect
126 | go.opentelemetry.io/otel/sdk v1.31.0 // indirect
127 | go.opentelemetry.io/otel/trace v1.31.0 // indirect
128 | go.opentelemetry.io/proto/otlp v1.3.1 // indirect
129 | go.step.sm/cli-utils v0.9.0 // indirect
130 | go.step.sm/crypto v0.45.0 // indirect
131 | go.step.sm/linkedca v0.20.1 // indirect
132 | go.uber.org/automaxprocs v1.6.0 // indirect
133 | go.uber.org/mock v0.5.0 // indirect
134 | go.uber.org/multierr v1.11.0 // indirect
135 | go.uber.org/zap/exp v0.3.0 // indirect
136 | golang.org/x/crypto v0.34.0 // indirect
137 | golang.org/x/crypto/x509roots/fallback v0.0.0-20241104001025-71ed71b4faf9 // indirect
138 | golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa // indirect
139 | golang.org/x/mod v0.23.0 // indirect
140 | golang.org/x/net v0.35.0 // indirect
141 | golang.org/x/sync v0.11.0 // indirect
142 | golang.org/x/sys v0.30.0 // indirect
143 | golang.org/x/term v0.29.0 // indirect
144 | golang.org/x/text v0.22.0 // indirect
145 | golang.org/x/time v0.10.0 // indirect
146 | golang.org/x/tools v0.30.0 // indirect
147 | google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 // indirect
148 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 // indirect
149 | google.golang.org/grpc v1.67.1 // indirect
150 | google.golang.org/protobuf v1.36.5 // indirect
151 | gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect
152 | gopkg.in/yaml.v3 v3.0.1 // indirect
153 | howett.net/plist v1.0.0 // indirect
154 | )
155 |
--------------------------------------------------------------------------------
/go.sum:
--------------------------------------------------------------------------------
1 | cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
2 | cloud.google.com/go v0.31.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
3 | cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
4 | cloud.google.com/go v0.37.0/go.mod h1:TS1dMSSfndXH133OKGwekG838Om/cQT0BUHV3HcBgoo=
5 | cloud.google.com/go v0.112.1 h1:uJSeirPke5UNZHIb4SxfZklVSiWWVqW4oXlETwZziwM=
6 | cloud.google.com/go/auth v0.4.1 h1:Z7YNIhlWRtrnKlZke7z3GMqzvuYzdc2z98F9D1NV5Hg=
7 | cloud.google.com/go/auth v0.4.1/go.mod h1:QVBuVEKpCn4Zp58hzRGvL0tjRGU0YqdRTdCHM1IHnro=
8 | cloud.google.com/go/auth/oauth2adapt v0.2.2 h1:+TTV8aXpjeChS9M+aTtN/TjdQnzJvmzKFt//oWu7HX4=
9 | cloud.google.com/go/auth/oauth2adapt v0.2.2/go.mod h1:wcYjgpZI9+Yu7LyYBg4pqSiaRkfEK3GQcpb7C/uyF1Q=
10 | cloud.google.com/go/compute v1.23.3 h1:6sVlXXBmbd7jNX0Ipq0trII3e4n1/MsADLK6a+aiVlk=
11 | cloud.google.com/go/compute/metadata v0.5.0 h1:Zr0eK8JbFv6+Wi4ilXAR8FJ3wyNdpxHKJNPos6LTZOY=
12 | cloud.google.com/go/compute/metadata v0.5.0/go.mod h1:aHnloV2TPI38yx4s9+wAZhHykWvVCfu7hQbF+9CWoiY=
13 | cloud.google.com/go/iam v1.1.8 h1:r7umDwhj+BQyz0ScZMp4QrGXjSTI3ZINnpgU2nlB/K0=
14 | cloud.google.com/go/iam v1.1.8/go.mod h1:GvE6lyMmfxXauzNq8NbgJbeVQNspG+tcdL/W8QO1+zE=
15 | cloud.google.com/go/kms v1.16.0 h1:1yZsRPhmargZOmY+fVAh8IKiR9HzCb0U1zsxb5g2nRY=
16 | cloud.google.com/go/kms v1.16.0/go.mod h1:olQUXy2Xud+1GzYfiBO9N0RhjsJk5IJLU6n/ethLXVc=
17 | cloud.google.com/go/longrunning v0.5.7 h1:WLbHekDbjK1fVFD3ibpFFVoyizlLRl73I7YKuAKilhU=
18 | cloud.google.com/go/longrunning v0.5.7/go.mod h1:8GClkudohy1Fxm3owmBGid8W0pSgodEMwEAztp38Xng=
19 | dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
20 | dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
21 | dmitri.shuralyov.com/app/changes v0.0.0-20180602232624-0a106ad413e3/go.mod h1:Yl+fi1br7+Rr3LqpNJf1/uxUdtRUV+Tnj0o93V2B9MU=
22 | dmitri.shuralyov.com/html/belt v0.0.0-20180602232347-f7d459c86be0/go.mod h1:JLBrvjyP0v+ecvNYvCpyZgu5/xkfAUhi6wJj28eUfSU=
23 | dmitri.shuralyov.com/service/change v0.0.0-20181023043359-a85b471d5412/go.mod h1:a1inKt/atXimZ4Mv927x+r7UpyzRUf4emIoiiSC2TN4=
24 | dmitri.shuralyov.com/state v0.0.0-20180228185332-28bcc343414c/go.mod h1:0PRwlb0D6DFvNNtx+9ybjezNCa8XF0xaYcETyp6rHWU=
25 | filippo.io/edwards25519 v1.1.0 h1:FNf4tywRC1HmFuKW5xopWpigGjJKiJSV0Cqo0cJWDaA=
26 | filippo.io/edwards25519 v1.1.0/go.mod h1:BxyFTGdWcka3PhytdK4V28tE5sGfRvvvRV7EaN4VDT4=
27 | git.apache.org/thrift.git v0.0.0-20180902110319-2566ecd5d999/go.mod h1:fPE2ZNJGynbRyZ4dJvy6G277gSllfV2HJqblrnkyeyg=
28 | github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96 h1:cTp8I5+VIoKjsnZuH8vjyaysT/ses3EvZeaV/1UkF2M=
29 | github.com/AndreasBriese/bbloom v0.0.0-20190825152654-46b345b51c96/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
30 | github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
31 | github.com/BurntSushi/toml v1.3.2/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbicEuybxQ=
32 | github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0=
33 | github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho=
34 | github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
35 | github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
36 | github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
37 | github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0=
38 | github.com/Masterminds/semver/v3 v3.3.0/go.mod h1:4V+yj/TJE1HU9XfppCwVMZq3I84lprf4nC11bSS5beM=
39 | github.com/Masterminds/sprig/v3 v3.3.0 h1:mQh0Yrg1XPo6vjYXgtf5OtijNAKJRNcTdOOGZe3tPhs=
40 | github.com/Masterminds/sprig/v3 v3.3.0/go.mod h1:Zy1iXRYNqNLUolqCpL4uhk6SHUMAOSCzdgBfDb35Lz0=
41 | github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
42 | github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
43 | github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE=
44 | github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
45 | github.com/alecthomas/assert/v2 v2.7.0 h1:QtqSACNS3tF7oasA8CU6A6sXZSBDqnm7RfpLl9bZqbE=
46 | github.com/alecthomas/assert/v2 v2.7.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
47 | github.com/alecthomas/chroma/v2 v2.2.0/go.mod h1:vf4zrexSH54oEjJ7EdB65tGNHmH3pGZmVkgTP5RHvAs=
48 | github.com/alecthomas/chroma/v2 v2.14.0 h1:R3+wzpnUArGcQz7fCETQBzO5n9IMNi13iIs46aU4V9E=
49 | github.com/alecthomas/chroma/v2 v2.14.0/go.mod h1:QolEbTfmUHIMVpBqxeDnNBj2uoeI4EbYP4i6n68SG4I=
50 | github.com/alecthomas/repr v0.0.0-20220113201626-b1b626ac65ae/go.mod h1:2kn6fqh/zIyPLmm3ugklbEi5hg5wS435eygvNfaDQL8=
51 | github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
52 | github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
53 | github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
54 | github.com/antlr4-go/antlr/v4 v4.13.0 h1:lxCg3LAv+EUK6t1i0y1V6/SLeUi0eKEKdhQAlS8TVTI=
55 | github.com/antlr4-go/antlr/v4 v4.13.0/go.mod h1:pfChB/xh/Unjila75QW7+VU4TSnWnnk9UTnmpPaOR2g=
56 | github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
57 | github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b h1:uUXgbcPDK3KpW29o4iy7GtuappbWT0l5NaMo9H9pJDw=
58 | github.com/aryann/difflib v0.0.0-20210328193216-ff5ff6dc229b/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A=
59 | github.com/aws/aws-sdk-go-v2 v1.26.1 h1:5554eUqIYVWpU0YmeeYZ0wU64H2VLBs8TlhRB2L+EkA=
60 | github.com/aws/aws-sdk-go-v2 v1.26.1/go.mod h1:ffIFB97e2yNsv4aTSGkqtHnppsIJzw7G7BReUZ3jCXM=
61 | github.com/aws/aws-sdk-go-v2/config v1.27.13 h1:WbKW8hOzrWoOA/+35S5okqO/2Ap8hkkFUzoW8Hzq24A=
62 | github.com/aws/aws-sdk-go-v2/config v1.27.13/go.mod h1:XLiyiTMnguytjRER7u5RIkhIqS8Nyz41SwAWb4xEjxs=
63 | github.com/aws/aws-sdk-go-v2/credentials v1.17.13 h1:XDCJDzk/u5cN7Aple7D/MiAhx1Rjo/0nueJ0La8mRuE=
64 | github.com/aws/aws-sdk-go-v2/credentials v1.17.13/go.mod h1:FMNcjQrmuBYvOTZDtOLCIu0esmxjF7RuA/89iSXWzQI=
65 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1 h1:FVJ0r5XTHSmIHJV6KuDmdYhEpvlHpiSd38RQWhut5J4=
66 | github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1/go.mod h1:zusuAeqezXzAB24LGuzuekqMAEgWkVYukBec3kr3jUg=
67 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 h1:aw39xVGeRWlWx9EzGVnhOR4yOjQDHPQ6o6NmBlscyQg=
68 | github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5/go.mod h1:FSaRudD0dXiMPK2UjknVwwTYyZMRsHv3TtkabsZih5I=
69 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 h1:PG1F3OD1szkuQPzDw3CIQsRIrtTlUC3lP84taWzHlq0=
70 | github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5/go.mod h1:jU1li6RFryMz+so64PpKtudI+QzbKoIEivqdf6LNpOc=
71 | github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 h1:hT8rVHwugYE2lEfdFE0QWVo81lF7jMrYJVDWI+f+VxU=
72 | github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0/go.mod h1:8tu/lYfQfFe6IGnaOdrpVgEL2IrrDOf6/m9RQum4NkY=
73 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 h1:Ji0DY1xUsUr3I8cHps0G+XM3WWU16lP6yG8qu1GAZAs=
74 | github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2/go.mod h1:5CsjAbs3NlGQyZNFACh+zztPDI7fU6eW9QsxjfnuBKg=
75 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 h1:ogRAwT1/gxJBcSWDMZlgyFUM962F51A5CRhDLbxLdmo=
76 | github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7/go.mod h1:YCsIZhXfRPLFFCl5xxY+1T9RKzOKjCut+28JSX2DnAk=
77 | github.com/aws/aws-sdk-go-v2/service/kms v1.31.1 h1:5wtyAwuUiJiM3DHYeGZmP5iMonM7DFBWAEaaVPHYZA0=
78 | github.com/aws/aws-sdk-go-v2/service/kms v1.31.1/go.mod h1:2snWQJQUKsbN66vAawJuOGX7dr37pfOq9hb0tZDGIqQ=
79 | github.com/aws/aws-sdk-go-v2/service/sso v1.20.6 h1:o5cTaeunSpfXiLTIBx5xo2enQmiChtu1IBbzXnfU9Hs=
80 | github.com/aws/aws-sdk-go-v2/service/sso v1.20.6/go.mod h1:qGzynb/msuZIE8I75DVRCUXw3o3ZyBmUvMwQ2t/BrGM=
81 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.0 h1:Qe0r0lVURDDeBQJ4yP+BOrJkvkiCo/3FH/t+wY11dmw=
82 | github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.0/go.mod h1:mUYPBhaF2lGiukDEjJX2BLRRKTmoUSitGDUgM4tRxak=
83 | github.com/aws/aws-sdk-go-v2/service/sts v1.28.7 h1:et3Ta53gotFR4ERLXXHIHl/Uuk1qYpP5uU7cvNql8ns=
84 | github.com/aws/aws-sdk-go-v2/service/sts v1.28.7/go.mod h1:FZf1/nKNEkHdGGJP/cI2MoIMquumuRK6ol3QQJNDxmw=
85 | github.com/aws/smithy-go v1.20.2 h1:tbp628ireGtzcHDDmLT/6ADHidqnwgF57XOXZe6tp4Q=
86 | github.com/aws/smithy-go v1.20.2/go.mod h1:krry+ya/rV9RDcV/Q16kpu6ypI4K2czasz0NC3qS14E=
87 | github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
88 | github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
89 | github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
90 | github.com/bradfitz/go-smtpd v0.0.0-20170404230938-deb6d6237625/go.mod h1:HYsPBTaaSFSlLx/70C2HPIMNZpVV8+vt/A+FMnYP11g=
91 | github.com/buger/jsonparser v0.0.0-20181115193947-bf1c66bbce23/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
92 | github.com/caddyserver/caddy/v2 v2.9.1 h1:OEYiZ7DbCzAWVb6TNEkjRcSCRGHVoZsJinoDR/n9oaY=
93 | github.com/caddyserver/caddy/v2 v2.9.1/go.mod h1:ImUELya2el1FDVp3ahnSO2iH1or1aHxlQEQxd/spP68=
94 | github.com/caddyserver/certmagic v0.21.7 h1:66KJioPFJwttL43KYSWk7ErSmE6LfaJgCQuhm8Sg6fg=
95 | github.com/caddyserver/certmagic v0.21.7/go.mod h1:LCPG3WLxcnjVKl/xpjzM0gqh0knrKKKiO5WVttX2eEI=
96 | github.com/caddyserver/zerossl v0.1.3 h1:onS+pxp3M8HnHpN5MMbOMyNjmTheJyWRaZYwn+YTAyA=
97 | github.com/caddyserver/zerossl v0.1.3/go.mod h1:CxA0acn7oEGO6//4rtrRjYgEoa4MFw/XofZnrYwGqG4=
98 | github.com/cenkalti/backoff/v4 v4.3.0 h1:MyRJ/UdXutAwSAT+s3wNd7MfTIcy71VQueUuFK343L8=
99 | github.com/cenkalti/backoff/v4 v4.3.0/go.mod h1:Y3VNntkOUPxTVeUxJ/G5vcM//AlwfmyYozVcomhLiZE=
100 | github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
101 | github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
102 | github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
103 | github.com/cespare/xxhash/v2 v2.3.0 h1:UL815xU9SqsFlibzuggzjXhog7bL6oX9BbNZnL2UFvs=
104 | github.com/cespare/xxhash/v2 v2.3.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
105 | github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
106 | github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM=
107 | github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=
108 | github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
109 | github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI=
110 | github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk=
111 | github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
112 | github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04=
113 | github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=
114 | github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
115 | github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
116 | github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
117 | github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
118 | github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
119 | github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
120 | github.com/coreos/go-systemd v0.0.0-20181012123002-c6f51f82210d/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
121 | github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
122 | github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
123 | github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
124 | github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
125 | github.com/cpuguy83/go-md2man/v2 v2.0.4 h1:wfIWP927BUkWJb2NmU/kNDYIBTh/ziUX91+lVfRxZq4=
126 | github.com/cpuguy83/go-md2man/v2 v2.0.4/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
127 | github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
128 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
129 | github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
130 | github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
131 | github.com/dgraph-io/badger v1.6.2 h1:mNw0qs90GVgGGWylh0umH5iag1j6n/PeJtNvL6KY/x8=
132 | github.com/dgraph-io/badger v1.6.2/go.mod h1:JW2yswe3V058sS0kZ2h/AXeDSqFjxnZcRrVH//y2UQE=
133 | github.com/dgraph-io/badger/v2 v2.2007.4 h1:TRWBQg8UrlUhaFdco01nO2uXwzKS7zd+HVdwV/GHc4o=
134 | github.com/dgraph-io/badger/v2 v2.2007.4/go.mod h1:vSw/ax2qojzbN6eXHIx6KPKtCSHJN/Uz0X0VPruTIhk=
135 | github.com/dgraph-io/ristretto v0.0.2/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
136 | github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de/go.mod h1:KPxhHT9ZxKefz+PCeOGsrHpl1qZ7i70dGTu2u+Ahh6E=
137 | github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWajOK8=
138 | github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA=
139 | github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
140 | github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 h1:fAjc9m62+UWV/WAFKLNi6ZS0675eEUC9y3AlwSbQu1Y=
141 | github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
142 | github.com/dlclark/regexp2 v1.4.0/go.mod h1:2pZnwuY/m+8K6iRw6wQdMtk+rH5tNGR1i55kozfMjCc=
143 | github.com/dlclark/regexp2 v1.7.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
144 | github.com/dlclark/regexp2 v1.11.0 h1:G/nrcoOa7ZXlpoa/91N3X7mM3r8eIlMBBJZvsz/mxKI=
145 | github.com/dlclark/regexp2 v1.11.0/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8=
146 | github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
147 | github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
148 | github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
149 | github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
150 | github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
151 | github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
152 | github.com/francoispqt/gojay v1.2.13 h1:d2m3sFjloqoIUQU3TsHBgj6qg/BVGlTBeHDUmyJnXKk=
153 | github.com/francoispqt/gojay v1.2.13/go.mod h1:ehT5mTG4ua4581f1++1WLG0vPdaA9HaiDsoyrBGkyDY=
154 | github.com/frankban/quicktest v1.14.6 h1:7Xjx+VpznH+oBnejlPUj8oUpdxnVs4f8XU8WnHkI4W8=
155 | github.com/frankban/quicktest v1.14.6/go.mod h1:4ptaffx2x8+WTWXmUCuVU6aPUX1/Mz7zb5vbUoiM6w0=
156 | github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
157 | github.com/fxamacker/cbor/v2 v2.6.0 h1:sU6J2usfADwWlYDAFhZBQ6TnLFBHxgesMrQfQgk1tWA=
158 | github.com/fxamacker/cbor/v2 v2.6.0/go.mod h1:pxXPTn3joSm21Gbwsv0w9OSA2y1HFR9qXEeXQVeNoDQ=
159 | github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
160 | github.com/gliderlabs/ssh v0.1.1/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
161 | github.com/go-chi/chi/v5 v5.0.12 h1:9euLV5sTrTNTRUU9POmDUvfxyj6LAABLUcEWO+JJb4s=
162 | github.com/go-chi/chi/v5 v5.0.12/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
163 | github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
164 | github.com/go-jose/go-jose/v3 v3.0.3 h1:fFKWeig/irsp7XD2zBxvnmA/XaRWp5V3CBsZXJF7G7k=
165 | github.com/go-jose/go-jose/v3 v3.0.3/go.mod h1:5b+7YgP7ZICgJDBdfjZaIt+H/9L9T/YQrVfLAMboGkQ=
166 | github.com/go-kit/kit v0.4.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
167 | github.com/go-kit/kit v0.13.0 h1:OoneCcHKHQ03LfBpoQCUfCluwd2Vt3ohz+kvbJneZAU=
168 | github.com/go-kit/kit v0.13.0/go.mod h1:phqEHMMUbyrCFCTgH48JueqrM3md2HcAZ8N3XE4FKDg=
169 | github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
170 | github.com/go-kit/log v0.2.1 h1:MRVx0/zhvdseW+Gza6N9rVzU/IVzaeE1SFI4raAhmBU=
171 | github.com/go-kit/log v0.2.1/go.mod h1:NwTd00d/i8cPZ3xOwwiv2PO5MOcx78fFErGNcVmBjv0=
172 | github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
173 | github.com/go-logfmt/logfmt v0.5.1/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
174 | github.com/go-logfmt/logfmt v0.6.0 h1:wGYYu3uicYdqXVgoYbvnkrPVXkuLM1p1ifugDMEdRi4=
175 | github.com/go-logfmt/logfmt v0.6.0/go.mod h1:WYhtIu8zTZfxdn5+rREduYbwxfcBr/Vr6KEVveWlfTs=
176 | github.com/go-logr/logr v1.2.2/go.mod h1:jdQByPbusPIv2/zmleS9BjJVeZ6kBagPoEUsqbVz/1A=
177 | github.com/go-logr/logr v1.4.2 h1:6pFjapn8bFcIbiKo3XT4j/BhANplGihG6tvd+8rYgrY=
178 | github.com/go-logr/logr v1.4.2/go.mod h1:9T104GzyrTigFIr8wt5mBrctHMim0Nb2HLGrmQ40KvY=
179 | github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
180 | github.com/go-logr/stdr v1.2.2/go.mod h1:mMo/vtBO5dYbehREoey6XUKy/eSumjCCveDpRre4VKE=
181 | github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
182 | github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
183 | github.com/go-stack/stack v1.6.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
184 | github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
185 | github.com/go-task/slim-sprig/v3 v3.0.0 h1:sUs3vkvUymDpBKi3qH1YSqBQk9+9D/8M2mN1vB6EwHI=
186 | github.com/go-task/slim-sprig/v3 v3.0.0/go.mod h1:W848ghGpv3Qj3dhTPRyJypKRiqCdHZiAzKg9hl15HA8=
187 | github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
188 | github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
189 | github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
190 | github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q=
191 | github.com/golang/glog v1.2.2 h1:1+mZ9upx1Dh6FmUTFR1naJ77miKiXgALjWOZ3NVFPmY=
192 | github.com/golang/glog v1.2.2/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w=
193 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
194 | github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
195 | github.com/golang/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:tluoj9z5200jBnyusfRPU2LqT6J+DAorxEvtC7LHB+E=
196 | github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
197 | github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
198 | github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
199 | github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
200 | github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek=
201 | github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps=
202 | github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
203 | github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM=
204 | github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
205 | github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ=
206 | github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU=
207 | github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4=
208 | github.com/google/cel-go v0.21.0 h1:cl6uW/gxN+Hy50tNYvI691+sXxioCnstFzLp2WO4GCI=
209 | github.com/google/cel-go v0.21.0/go.mod h1:rHUlWCcBKgyEk+eV03RPdZUekPp6YcJwV0FxuUksYxc=
210 | github.com/google/certificate-transparency-go v1.0.21/go.mod h1:QeJfpSbVSfYc7RgB3gJFj9cbuQMMchQxrWXz8Ruopmg=
211 | github.com/google/certificate-transparency-go v1.1.8-0.20240110162603-74a5dd331745 h1:heyoXNxkRT155x4jTAiSv5BVSVkueifPUm+Q8LUXMRo=
212 | github.com/google/certificate-transparency-go v1.1.8-0.20240110162603-74a5dd331745/go.mod h1:zN0wUQgV9LjwLZeFHnrAbQi8hzMVvEWePyk+MhPOk7k=
213 | github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M=
214 | github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
215 | github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=
216 | github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
217 | github.com/google/go-github v17.0.0+incompatible/go.mod h1:zLgOLi98H3fifZn+44m+umXrS52loVEgC2AApnigrVQ=
218 | github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
219 | github.com/google/go-tpm v0.9.0 h1:sQF6YqWMi+SCXpsmS3fd21oPy/vSddwZry4JnmltHVk=
220 | github.com/google/go-tpm v0.9.0/go.mod h1:FkNVkc6C+IsvDI9Jw1OveJmxGZUUaKxtrpOS47QWKfU=
221 | github.com/google/go-tpm-tools v0.4.4 h1:oiQfAIkc6xTy9Fl5NKTeTJkBTlXdHsxAofmQyxBKY98=
222 | github.com/google/go-tpm-tools v0.4.4/go.mod h1:T8jXkp2s+eltnCDIsXR84/MTcVU9Ja7bh3Mit0pa4AY=
223 | github.com/google/go-tspi v0.3.0 h1:ADtq8RKfP+jrTyIWIZDIYcKOMecRqNJFOew2IT0Inus=
224 | github.com/google/go-tspi v0.3.0/go.mod h1:xfMGI3G0PhxCdNVcYr1C4C+EizojDg/TXuX5by8CiHI=
225 | github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
226 | github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc=
227 | github.com/google/pprof v0.0.0-20250208200701-d0013a598941 h1:43XjGa6toxLpeksjcxs1jIoIyr+vUfOqY2c6HB4bpoc=
228 | github.com/google/pprof v0.0.0-20250208200701-d0013a598941/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144=
229 | github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
230 | github.com/google/s2a-go v0.1.7 h1:60BLSyTrOV4/haCDW4zb1guZItoSq8foHCXrAnjBo/o=
231 | github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8F0Qdw=
232 | github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
233 | github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
234 | github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs=
235 | github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0=
236 | github.com/googleapis/gax-go v2.0.0+incompatible h1:j0GKcs05QVmm7yesiZq2+9cxHkNK9YM6zKx4D2qucQU=
237 | github.com/googleapis/gax-go v2.0.0+incompatible/go.mod h1:SFVmujtThgffbyetf+mdk2eWhX2bMyUtNHzFKcPA9HY=
238 | github.com/googleapis/gax-go/v2 v2.0.3/go.mod h1:LLvjysVCY1JZeum8Z6l8qUty8fiNwE08qbEPm1M08qg=
239 | github.com/googleapis/gax-go/v2 v2.12.4 h1:9gWcmF85Wvq4ryPFvGFaOgPIs1AQX0d0bcbGw4Z96qg=
240 | github.com/googleapis/gax-go/v2 v2.12.4/go.mod h1:KYEYLorsnIGDi/rPC8b5TdlB9kbKoFubselGIoBMCwI=
241 | github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
242 | github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7/go.mod h1:FecbI9+v66THATjSRHfNgh1IVFe/9kFxbXtjV0ctIMA=
243 | github.com/grpc-ecosystem/grpc-gateway v1.5.0/go.mod h1:RSKVYQBd5MCa4OVpNdGskqpgL2+G+NZTnrVHpWWfpdw=
244 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 h1:asbCHRVmodnJTuQ3qamDwqVOIjwqUPTYmYuemVOx+Ys=
245 | github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I=
246 | github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
247 | github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
248 | github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
249 | github.com/huandu/xstrings v1.5.0 h1:2ag3IFq9ZDANvthTwTiqSSZLjDc+BedvHPAp5tJy2TI=
250 | github.com/huandu/xstrings v1.5.0/go.mod h1:y5/lhBue+AyNmUVz9RLU9xbLR0o4KIIExikq4ovT0aE=
251 | github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
252 | github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
253 | github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
254 | github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
255 | github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
256 | github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
257 | github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
258 | github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=
259 | github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=
260 | github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=
261 | github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
262 | github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
263 | github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
264 | github.com/jackc/pgconn v1.14.3 h1:bVoTr12EGANZz66nZPkMInAV/KHD2TxH9npjXXgiB3w=
265 | github.com/jackc/pgconn v1.14.3/go.mod h1:RZbme4uasqzybK2RK5c65VsHxoyaml09lx3tXOcO/VM=
266 | github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
267 | github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
268 | github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
269 | github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=
270 | github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=
271 | github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=
272 | github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
273 | github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
274 | github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
275 | github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
276 | github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
277 | github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
278 | github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
279 | github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
280 | github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
281 | github.com/jackc/pgproto3/v2 v2.3.3 h1:1HLSx5H+tXR9pW3in3zaztoEwQYRC9SQaYUHjTSUOag=
282 | github.com/jackc/pgproto3/v2 v2.3.3/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
283 | github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
284 | github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a h1:bbPeKD0xmW/Y25WS6cokEszi5g+S0QxI/d45PkRi7Nk=
285 | github.com/jackc/pgservicefile v0.0.0-20221227161230-091c0ba34f0a/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
286 | github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
287 | github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
288 | github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
289 | github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
290 | github.com/jackc/pgtype v1.14.0 h1:y+xUdabmyMkJLyApYuPj38mW+aAIqCe5uuBB51rH3Vw=
291 | github.com/jackc/pgtype v1.14.0/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
292 | github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
293 | github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
294 | github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
295 | github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
296 | github.com/jackc/pgx/v4 v4.18.3 h1:dE2/TrEsGX3RBprb3qryqSV9Y60iZN1C6i8IrmW9/BA=
297 | github.com/jackc/pgx/v4 v4.18.3/go.mod h1:Ey4Oru5tH5sB6tV7hDmfWFahwF15Eb7DNXlRKx2CkVw=
298 | github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
299 | github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
300 | github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
301 | github.com/jellevandenhooff/dkim v0.0.0-20150330215556-f50fe3d243e1/go.mod h1:E0B/fFc00Y+Rasa88328GlI/XbtyysCtTHZS8h7IrBU=
302 | github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI=
303 | github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
304 | github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
305 | github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
306 | github.com/klauspost/compress v1.12.3/go.mod h1:8dP1Hq4DHOhN9w426knH3Rhby4rFm6D8eO+e+Dq5Gzg=
307 | github.com/klauspost/compress v1.17.11 h1:In6xLpyWOi1+C7tXUUWv2ot1QvBjxevKAaI6IXrJmUc=
308 | github.com/klauspost/compress v1.17.11/go.mod h1:pMDklpSncoRMuLFrf1W9Ss9KT+0rH90U12bZKk7uwG0=
309 | github.com/klauspost/cpuid/v2 v2.2.9 h1:66ze0taIn2H33fBvCkXuv9BmCwDfafmiIVpKV9kKGuY=
310 | github.com/klauspost/cpuid/v2 v2.2.9/go.mod h1:rqkxqrZ1EhYM9G+hXH7YdowN5R5RGN6NK4QwQ3WMXF8=
311 | github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
312 | github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
313 | github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
314 | github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
315 | github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
316 | github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
317 | github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
318 | github.com/kr/pty v1.1.3/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
319 | github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
320 | github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
321 | github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
322 | github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
323 | github.com/kylelemons/godebug v1.1.0 h1:RPNrshWIDI6G2gRW9EHilWtl7Z6Sb1BR0xunSBf0SNc=
324 | github.com/kylelemons/godebug v1.1.0/go.mod h1:9/0rRGxNHcop5bhtWyNeEfOS8JIWk580+fNqagV/RAw=
325 | github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
326 | github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
327 | github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
328 | github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
329 | github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
330 | github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
331 | github.com/libdns/libdns v0.2.3 h1:ba30K4ObwMGB/QTmqUxf3H4/GmUrCAIkMWejeGl12v8=
332 | github.com/libdns/libdns v0.2.3/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
333 | github.com/lunixbochs/vtclean v1.0.0/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
334 | github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
335 | github.com/mailru/easyjson v0.0.0-20190312143242-1de009706dbe/go.mod h1:C1wdFJiN94OJF2b5HbByQZoLdCWB1Yqtg26g4irojpc=
336 | github.com/manifoldco/promptui v0.9.0 h1:3V4HzJk1TtXW1MTZMP7mdlwbBpIinw3HztaIlYthEiA=
337 | github.com/manifoldco/promptui v0.9.0/go.mod h1:ka04sppxSGFAtxX0qhlYQjISsg9mR4GWtQEhdbn6Pgg=
338 | github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
339 | github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
340 | github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
341 | github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
342 | github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
343 | github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
344 | github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
345 | github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
346 | github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
347 | github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
348 | github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
349 | github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
350 | github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
351 | github.com/mholt/acmez/v3 v3.0.1 h1:4PcjKjaySlgXK857aTfDuRbmnM5gb3Ruz3tvoSJAUp8=
352 | github.com/mholt/acmez/v3 v3.0.1/go.mod h1:L1wOU06KKvq7tswuMDwKdcHeKpFFgkppZy/y0DFxagQ=
353 | github.com/microcosm-cc/bluemonday v1.0.1/go.mod h1:hsXNsILzKxV+sX77C5b8FSuKF00vh2OMYv+xgHpAMF4=
354 | github.com/miekg/dns v1.1.63 h1:8M5aAw6OMZfFXTT7K5V0Eu5YiiL8l7nUAkyN6C9YwaY=
355 | github.com/miekg/dns v1.1.63/go.mod h1:6NGHfjhpmr5lt3XPLuyfDJi5AXbNIPM9PY6H6sF1Nfs=
356 | github.com/mitchellh/copystructure v1.2.0 h1:vpKXTN4ewci03Vljg/q9QvCGUDttBOGBIa15WveJJGw=
357 | github.com/mitchellh/copystructure v1.2.0/go.mod h1:qLl+cE2AmVv+CoeAwDPye/v+N2HKCj9FbZEVFJRxO9s=
358 | github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
359 | github.com/mitchellh/go-ps v1.0.0 h1:i6ampVEEF4wQFF+bkYfwYgY+F/uYJDktmvLPf7qIgjc=
360 | github.com/mitchellh/go-ps v1.0.0/go.mod h1:J4lOc8z8yJs6vUwklHw2XEIiT4z4C40KtWVN3nvg8Pg=
361 | github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
362 | github.com/mitchellh/reflectwalk v1.0.2 h1:G2LzWKi524PWgd3mLHV8Y5k7s6XUvT0Gef6zxSIeXaQ=
363 | github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx0jmZXqmk4esnw=
364 | github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
365 | github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
366 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
367 | github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
368 | github.com/neelance/astrewrite v0.0.0-20160511093645-99348263ae86/go.mod h1:kHJEU3ofeGjhHklVoIGuVj85JJwZ6kWPaJwCIxgnFmo=
369 | github.com/neelance/sourcemap v0.0.0-20151028013722-8c68805598ab/go.mod h1:Qr6/a/Q4r9LP1IltGz7tA7iOK1WonHEYhu1HRBA7ZiM=
370 | github.com/onsi/ginkgo/v2 v2.22.2 h1:/3X8Panh8/WwhU/3Ssa6rCKqPLuAkVY2I0RoyDLySlU=
371 | github.com/onsi/ginkgo/v2 v2.22.2/go.mod h1:oeMosUL+8LtarXBHu/c0bx2D/K9zyQ6uX3cTyztHwsk=
372 | github.com/onsi/gomega v1.36.2 h1:koNYke6TVk6ZmnyHrCXba/T/MoLBXFjeC1PtvYgw0A8=
373 | github.com/onsi/gomega v1.36.2/go.mod h1:DdwyADRjrc825LhMEkD76cHR5+pUnjhUN8GlHlRPHzY=
374 | github.com/openzipkin/zipkin-go v0.1.1/go.mod h1:NtoC/o8u3JlF1lSlyPNswIbeQH9bJTmOf0Erfk+hxe8=
375 | github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
376 | github.com/peterbourgon/diskv/v3 v3.0.1 h1:x06SQA46+PKIUftmEujdwSEpIx8kR+M9eLYsUxeYveU=
377 | github.com/peterbourgon/diskv/v3 v3.0.1/go.mod h1:kJ5Ny7vLdARGU3WUuy6uzO6T0nb/2gWcT1JiBvRmb5o=
378 | github.com/pires/go-proxyproto v0.7.1-0.20240628150027-b718e7ce4964 h1:ct/vxNBgHpASQ4sT8NaBX9LtsEtluZqaUJydLG50U3E=
379 | github.com/pires/go-proxyproto v0.7.1-0.20240628150027-b718e7ce4964/go.mod h1:iknsfgnH8EkjrMeMyvfKByp9TiBZCKZM0jx2xmKqnVY=
380 | github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
381 | github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
382 | github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
383 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
384 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
385 | github.com/prashantv/gostub v1.1.0 h1:BTyx3RfQjRHnUWaGF9oQos79AlQ5k8WNktv7VGvVH4g=
386 | github.com/prashantv/gostub v1.1.0/go.mod h1:A5zLQHz7ieHGG7is6LLXLz7I8+3LZzsrV0P1IAHhP5U=
387 | github.com/prometheus/client_golang v0.8.0/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw=
388 | github.com/prometheus/client_golang v1.21.0 h1:DIsaGmiaBkSangBgMtWdNfxbMNdku5IK6iNhrEqWvdA=
389 | github.com/prometheus/client_golang v1.21.0/go.mod h1:U9NM32ykUErtVBxdvD3zfi+EuFkkaBvMb09mIfe0Zgg=
390 | github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
391 | github.com/prometheus/client_model v0.6.1 h1:ZKSh/rekM+n3CeS952MLRAdFwIKqeY8b62p8ais2e9E=
392 | github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQyHDk9E3jmP2AmGiY=
393 | github.com/prometheus/common v0.0.0-20180801064454-c7de2306084e/go.mod h1:daVV7qP5qjZbuso7PdcryaAu0sAZbrN9i7WWcTMWvro=
394 | github.com/prometheus/common v0.62.0 h1:xasJaQlnWAeyHdUBeGjXmutelfJHWMRr+Fg4QszZ2Io=
395 | github.com/prometheus/common v0.62.0/go.mod h1:vyBcEuLSvWos9B1+CyL7JZ2up+uFzXhkqml0W5zIY1I=
396 | github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
397 | github.com/prometheus/procfs v0.15.1 h1:YagwOFzUgYfKKHX6Dr+sHT7km/hxC76UB0learggepc=
398 | github.com/prometheus/procfs v0.15.1/go.mod h1:fB45yRUv8NstnjriLhBQLuOUt+WW4BsoGhij/e3PBqk=
399 | github.com/quic-go/qpack v0.5.1 h1:giqksBPnT/HDtZ6VhtFKgoLOWmlyo9Ei6u9PqzIMbhI=
400 | github.com/quic-go/qpack v0.5.1/go.mod h1:+PC4XFrEskIVkcLzpEkbLqq1uCoxPhQuvK5rH1ZgaEg=
401 | github.com/quic-go/quic-go v0.50.0 h1:3H/ld1pa3CYhkcc20TPIyG1bNsdhn9qZBGN3b9/UyUo=
402 | github.com/quic-go/quic-go v0.50.0/go.mod h1:Vim6OmUvlYdwBhXP9ZVrtGmCMWa3wEqhq3NgYrI8b4E=
403 | github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
404 | github.com/rogpeppe/go-internal v1.13.1 h1:KvO1DLK/DRN07sQ1LQKScxyZJuNnedQ5/wKSR38lUII=
405 | github.com/rogpeppe/go-internal v1.13.1/go.mod h1:uMEvuHeurkdAXX61udpOXGD/AzZDWNMNyH2VO9fmH0o=
406 | github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
407 | github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=
408 | github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
409 | github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
410 | github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
411 | github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
412 | github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
413 | github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
414 | github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
415 | github.com/schollz/jsonstore v1.1.0 h1:WZBDjgezFS34CHI+myb4s8GGpir3UMpy7vWoCeO0n6E=
416 | github.com/schollz/jsonstore v1.1.0/go.mod h1:15c6+9guw8vDRyozGjN3FoILt0wpruJk9Pi66vjaZfg=
417 | github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
418 | github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
419 | github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
420 | github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k=
421 | github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME=
422 | github.com/shurcooL/component v0.0.0-20170202220835-f88ec8f54cc4/go.mod h1:XhFIlyj5a1fBNx5aJTbKoIq0mNaPvOagO+HjB3EtxrY=
423 | github.com/shurcooL/events v0.0.0-20181021180414-410e4ca65f48/go.mod h1:5u70Mqkb5O5cxEA8nxTsgrgLehJeAw6Oc4Ab1c/P1HM=
424 | github.com/shurcooL/github_flavored_markdown v0.0.0-20181002035957-2122de532470/go.mod h1:2dOwnU2uBioM+SGy2aZoq1f/Sd1l9OkAeAUvjSyvgU0=
425 | github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk=
426 | github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ=
427 | github.com/shurcooL/gofontwoff v0.0.0-20180329035133-29b52fc0a18d/go.mod h1:05UtEgK5zq39gLST6uB0cf3NEHjETfB4Fgr3Gx5R9Vw=
428 | github.com/shurcooL/gopherjslib v0.0.0-20160914041154-feb6d3990c2c/go.mod h1:8d3azKNyqcHP1GaQE/c6dDgjkgSx2BZ4IoEi4F1reUI=
429 | github.com/shurcooL/highlight_diff v0.0.0-20170515013008-09bb4053de1b/go.mod h1:ZpfEhSmds4ytuByIcDnOLkTHGUI6KNqRNPDLHDk+mUU=
430 | github.com/shurcooL/highlight_go v0.0.0-20181028180052-98c3abbbae20/go.mod h1:UDKB5a1T23gOMUJrI+uSuH0VRDStOiUVSjBTRDVBVag=
431 | github.com/shurcooL/home v0.0.0-20181020052607-80b7ffcb30f9/go.mod h1:+rgNQw2P9ARFAs37qieuu7ohDNQ3gds9msbT2yn85sg=
432 | github.com/shurcooL/htmlg v0.0.0-20170918183704-d01228ac9e50/go.mod h1:zPn1wHpTIePGnXSHpsVPWEktKXHr6+SS6x/IKRb7cpw=
433 | github.com/shurcooL/httperror v0.0.0-20170206035902-86b7830d14cc/go.mod h1:aYMfkZ6DWSJPJ6c4Wwz3QtW22G7mf/PEgaB9k/ik5+Y=
434 | github.com/shurcooL/httpfs v0.0.0-20171119174359-809beceb2371/go.mod h1:ZY1cvUeJuFPAdZ/B6v7RHavJWZn2YPVFQ1OSXhCGOkg=
435 | github.com/shurcooL/httpgzip v0.0.0-20180522190206-b1c53ac65af9/go.mod h1:919LwcH0M7/W4fcZ0/jy0qGght1GIhqyS/EgWGH2j5Q=
436 | github.com/shurcooL/issues v0.0.0-20181008053335-6292fdc1e191/go.mod h1:e2qWDig5bLteJ4fwvDAc2NHzqFEthkqn7aOZAOpj+PQ=
437 | github.com/shurcooL/issuesapp v0.0.0-20180602232740-048589ce2241/go.mod h1:NPpHK2TI7iSaM0buivtFUc9offApnI0Alt/K8hcHy0I=
438 | github.com/shurcooL/notifications v0.0.0-20181007000457-627ab5aea122/go.mod h1:b5uSkrEVM1jQUspwbixRBhaIjIzL2xazXp6kntxYle0=
439 | github.com/shurcooL/octicon v0.0.0-20181028054416-fa4f57f9efb2/go.mod h1:eWdoE5JD4R5UVWDucdOPg1g2fqQRq78IQa9zlOV1vpQ=
440 | github.com/shurcooL/reactions v0.0.0-20181006231557-f2e0b4ca5b82/go.mod h1:TCR1lToEk4d2s07G3XGfz2QrgHXg4RJBvjrOozvoWfk=
441 | github.com/shurcooL/sanitized_anchor_name v0.0.0-20170918181015-86672fcb3f95/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
442 | github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
443 | github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
444 | github.com/shurcooL/users v0.0.0-20180125191416-49c67e49c537/go.mod h1:QJTqeLYEDaXHZDBsXlPCDqdhQuJkuw4NOtaxYe3xii4=
445 | github.com/shurcooL/webdavfs v0.0.0-20170829043945-18c3829fa133/go.mod h1:hKmq5kWdCj2z2KEozexVbfEZIWiTjhE0+UjmZgPqehw=
446 | github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
447 | github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
448 | github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
449 | github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
450 | github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
451 | github.com/slackhq/nebula v1.6.1 h1:/OCTR3abj0Sbf2nGoLUrdDXImrCv0ZVFpVPP5qa0DsM=
452 | github.com/slackhq/nebula v1.6.1/go.mod h1:UmkqnXe4O53QwToSl/gG7sM4BroQwAB7dd4hUaT6MlI=
453 | github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262 h1:unQFBIznI+VYD1/1fApl1A+9VcBk+9dcqGfnePY87LY=
454 | github.com/smallstep/assert v0.0.0-20200723003110-82e2b9b3b262/go.mod h1:MyOHs9Po2fbM1LHej6sBUT8ozbxmMOFG+E+rx/GSGuc=
455 | github.com/smallstep/certificates v0.26.1 h1:FIUliEBcExSfJJDhRFA/s8aZgMIFuorexnRSKQd884o=
456 | github.com/smallstep/certificates v0.26.1/go.mod h1:OQMrW39IrGKDViKSHrKcgSQArMZ8c7EcjhYKK7mYqis=
457 | github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935 h1:kjYvkvS/Wdy0PVRDUAA0gGJIVSEZYhiAJtfwYgOYoGA=
458 | github.com/smallstep/go-attestation v0.4.4-0.20240109183208-413678f90935/go.mod h1:vNAduivU014fubg6ewygkAvQC0IQVXqdc8vaGl/0er4=
459 | github.com/smallstep/nosql v0.6.1 h1:X8IBZFTRIp1gmuf23ne/jlD/BWKJtDQbtatxEn7Et1Y=
460 | github.com/smallstep/nosql v0.6.1/go.mod h1:vrN+CftYYNnDM+DQqd863ATynvYFm/6FuY9D4TeAm2Y=
461 | github.com/smallstep/pkcs7 v0.0.0-20231024181729-3b98ecc1ca81 h1:B6cED3iLJTgxpdh4tuqByDjRRKan2EvtnOfHr2zHJVg=
462 | github.com/smallstep/pkcs7 v0.0.0-20231024181729-3b98ecc1ca81/go.mod h1:SoUAr/4M46rZ3WaLstHxGhLEgoYIDRqxQEXLOmOEB0Y=
463 | github.com/smallstep/scep v0.0.0-20231024192529-aee96d7ad34d h1:06LUHn4Ia2X6syjIaCMNaXXDNdU+1N/oOHynJbWgpXw=
464 | github.com/smallstep/scep v0.0.0-20231024192529-aee96d7ad34d/go.mod h1:4d0ub42ut1mMtvGyMensjuHYEUpRrASvkzLEJvoRQcU=
465 | github.com/smallstep/truststore v0.13.0 h1:90if9htAOblavbMeWlqNLnO9bsjjgVv2hQeQJCi/py4=
466 | github.com/smallstep/truststore v0.13.0/go.mod h1:3tmMp2aLKZ/OA/jnFUB0cYPcho402UG2knuJoPh4j7A=
467 | github.com/sourcegraph/annotate v0.0.0-20160123013949-f4cad6c6324d/go.mod h1:UdhH50NIW0fCiwBSr0co2m7BnFLdv4fQTgdqdJTHFeE=
468 | github.com/sourcegraph/syntaxhighlight v0.0.0-20170531221838-bd320f5d308e/go.mod h1:HuIsMU8RRBOtsCgI77wP899iHVBQpCmg4ErYMZB+2IA=
469 | github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
470 | github.com/spaolacci/murmur3 v1.1.0 h1:7c1g84S4BPRrfL5Xrdp6fOJ206sU9y293DDHaoy0bLI=
471 | github.com/spaolacci/murmur3 v1.1.0/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
472 | github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
473 | github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
474 | github.com/spf13/cast v1.7.0 h1:ntdiHjuueXFgm5nzDRdOS4yfT43P5Fnud6DH50rz/7w=
475 | github.com/spf13/cast v1.7.0/go.mod h1:ancEpBxwJDODSW/UG4rDrAqiKolqNNh2DX3mk86cAdo=
476 | github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
477 | github.com/spf13/cobra v1.8.1 h1:e5/vxKd/rZsfSJMUX1agtjeTDf+qv1/JdBF8gg5k9ZM=
478 | github.com/spf13/cobra v1.8.1/go.mod h1:wHxEcudfqmLYa8iTfL+OuZPbBZkmvliBWKIezN3kD9Y=
479 | github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
480 | github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
481 | github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
482 | github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
483 | github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
484 | github.com/stoewer/go-strcase v1.2.0 h1:Z2iHWqGXH00XYgqDmNgQbIBxf3wrNq0F3feEy0ainaU=
485 | github.com/stoewer/go-strcase v1.2.0/go.mod h1:IBiWB2sKIp3wVVQ3Y035++gc+knqhUQag1KpM8ahLw8=
486 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
487 | github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
488 | github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
489 | github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
490 | github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
491 | github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
492 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
493 | github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
494 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
495 | github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
496 | github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
497 | github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
498 | github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo=
499 | github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
500 | github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
501 | github.com/tailscale/tscert v0.0.0-20240608151842-d3f834017e53 h1:uxMgm0C+EjytfAqyfBG55ZONKQ7mvd7x4YYCWsf8QHQ=
502 | github.com/tailscale/tscert v0.0.0-20240608151842-d3f834017e53/go.mod h1:kNGUQ3VESx3VZwRwA9MSCUegIl6+saPL8Noq82ozCaU=
503 | github.com/tarm/serial v0.0.0-20180830185346-98f6abe2eb07/go.mod h1:kDXzergiv9cbyO7IOYJZWg1U88JhDg3PB6klq9Hg2pA=
504 | github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
505 | github.com/urfave/cli v1.22.14 h1:ebbhrRiGK2i4naQJr+1Xj92HXZCrK7MsyTS/ob3HnAk=
506 | github.com/urfave/cli v1.22.14/go.mod h1:X0eDS6pD6Exaclxm99NJ3FiCDRED7vIHpx2mDOHLvkA=
507 | github.com/viant/assertly v0.4.8/go.mod h1:aGifi++jvCrUaklKEKT0BU95igDNaqkvz+49uaYMPRU=
508 | github.com/viant/toolbox v0.24.0/go.mod h1:OxMCG57V0PXuIP2HNQrtJf2CjqdmbrOx5EkMILuUhzM=
509 | github.com/x448/float16 v0.8.4 h1:qLwI1I70+NjRFUR3zs1JPUCgaCXSh3SW62uAKT1mSBM=
510 | github.com/x448/float16 v0.8.4/go.mod h1:14CWIYCyZA/cWjXOioeEpHeN/83MdbZDRQHoFcYsOfg=
511 | github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
512 | github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
513 | github.com/yuin/goldmark v1.4.15/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
514 | github.com/yuin/goldmark v1.7.8 h1:iERMLn0/QJeHFhxSt3p6PeN9mGnvIKSpG9YYorDMnic=
515 | github.com/yuin/goldmark v1.7.8/go.mod h1:uzxRWxtg69N339t3louHJ7+O03ezfj6PlliRlaOzY1E=
516 | github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc h1:+IAOyRda+RLrxa1WC7umKOZRsGq4QrFFMYApOeHzQwQ=
517 | github.com/yuin/goldmark-highlighting/v2 v2.0.0-20230729083705-37449abec8cc/go.mod h1:ovIvrum6DQJA4QsJSovrkC4saKHQVs7TvcaeO8AIl5I=
518 | github.com/zeebo/assert v1.1.0 h1:hU1L1vLTHsnO8x8c9KAR5GmM5QscxHg5RNU5z5qbUWY=
519 | github.com/zeebo/assert v1.1.0/go.mod h1:Pq9JiuJQpG8JLJdtkwrJESF0Foym2/D9XMU5ciN/wJ0=
520 | github.com/zeebo/blake3 v0.2.4 h1:KYQPkhpRtcqh0ssGYcKLG1JYvddkEA8QwCM/yBqhaZI=
521 | github.com/zeebo/blake3 v0.2.4/go.mod h1:7eeQ6d2iXWRGF6npfaxl2CU+xy2Fjo2gxeyZGCRUjcE=
522 | github.com/zeebo/pcg v1.0.1 h1:lyqfGeWiv4ahac6ttHs+I5hwtH/+1mrhlCtVNQM2kHo=
523 | github.com/zeebo/pcg v1.0.1/go.mod h1:09F0S9iiKrwn9rlI5yjLkmrug154/YRW6KnnXVDM/l4=
524 | github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
525 | go.etcd.io/bbolt v1.3.9 h1:8x7aARPEXiXbHmtUwAIv7eV2fQFHrLLavdiJ3uzJXoI=
526 | go.etcd.io/bbolt v1.3.9/go.mod h1:zaO32+Ti0PK1ivdPtgMESzuzL2VPoIG1PCQNvOdo/dE=
527 | go.opencensus.io v0.18.0/go.mod h1:vKdFvxhtzZ9onBp9VKHK8z/sRpBMnKAsufL7wlDrCOA=
528 | go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
529 | go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
530 | go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0 h1:4Pp6oUg3+e/6M4C0A/3kJ2VYa++dsWVTtGgLVj5xtHg=
531 | go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.49.0/go.mod h1:Mjt1i1INqiaoZOMGR1RIUJN+i3ChKoFRqzrRQhlkbs0=
532 | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0 h1:UP6IpuHFkUgOQL9FFQFrZ+5LiwhhYRbi7VZSIx6Nj5s=
533 | go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.56.0/go.mod h1:qxuZLtbq5QDtdeSHsS7bcf6EH6uO6jUAgk764zd3rhM=
534 | go.opentelemetry.io/contrib/propagators/autoprop v0.42.0 h1:s2RzYOAqHVgG23q8fPWYChobUoZM6rJZ98EnylJr66w=
535 | go.opentelemetry.io/contrib/propagators/autoprop v0.42.0/go.mod h1:Mv/tWNtZn+NbALDb2XcItP0OM3lWWZjAfSroINxfW+Y=
536 | go.opentelemetry.io/contrib/propagators/aws v1.17.0 h1:IX8d7l2uRw61BlmZBOTQFaK+y22j6vytMVTs9wFrO+c=
537 | go.opentelemetry.io/contrib/propagators/aws v1.17.0/go.mod h1:pAlCYRWff4uGqRXOVn3WP8pDZ5E0K56bEoG7a1VSL4k=
538 | go.opentelemetry.io/contrib/propagators/b3 v1.17.0 h1:ImOVvHnku8jijXqkwCSyYKRDt2YrnGXD4BbhcpfbfJo=
539 | go.opentelemetry.io/contrib/propagators/b3 v1.17.0/go.mod h1:IkfUfMpKWmynvvE0264trz0sf32NRTZL4nuAN9AbWRc=
540 | go.opentelemetry.io/contrib/propagators/jaeger v1.17.0 h1:Zbpbmwav32Ea5jSotpmkWEl3a6Xvd4tw/3xxGO1i05Y=
541 | go.opentelemetry.io/contrib/propagators/jaeger v1.17.0/go.mod h1:tcTUAlmO8nuInPDSBVfG+CP6Mzjy5+gNV4mPxMbL0IA=
542 | go.opentelemetry.io/contrib/propagators/ot v1.17.0 h1:ufo2Vsz8l76eI47jFjuVyjyB3Ae2DmfiCV/o6Vc8ii0=
543 | go.opentelemetry.io/contrib/propagators/ot v1.17.0/go.mod h1:SbKPj5XGp8K/sGm05XblaIABgMgw2jDczP8gGeuaVLk=
544 | go.opentelemetry.io/otel v1.31.0 h1:NsJcKPIW0D0H3NgzPDHmo0WW6SptzPdqg/L1zsIm2hY=
545 | go.opentelemetry.io/otel v1.31.0/go.mod h1:O0C14Yl9FgkjqcCZAsE053C13OaddMYr/hz6clDkEJE=
546 | go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0 h1:K0XaT3DwHAcV4nKLzcQvwAgSyisUghWoY20I7huthMk=
547 | go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.31.0/go.mod h1:B5Ki776z/MBnVha1Nzwp5arlzBbE3+1jk+pGmaP5HME=
548 | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0 h1:FFeLy03iVTXP6ffeN2iXrxfGsZGCjVx0/4KlizjyBwU=
549 | go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.31.0/go.mod h1:TMu73/k1CP8nBUpDLc71Wj/Kf7ZS9FK5b53VapRsP9o=
550 | go.opentelemetry.io/otel/metric v1.31.0 h1:FSErL0ATQAmYHUIzSezZibnyVlft1ybhy4ozRPcF2fE=
551 | go.opentelemetry.io/otel/metric v1.31.0/go.mod h1:C3dEloVbLuYoX41KpmAhOqNriGbA+qqH6PQ5E5mUfnY=
552 | go.opentelemetry.io/otel/sdk v1.31.0 h1:xLY3abVHYZ5HSfOg3l2E5LUj2Cwva5Y7yGxnSW9H5Gk=
553 | go.opentelemetry.io/otel/sdk v1.31.0/go.mod h1:TfRbMdhvxIIr/B2N2LQW2S5v9m3gOQ/08KsbbO5BPT0=
554 | go.opentelemetry.io/otel/trace v1.31.0 h1:ffjsj1aRouKewfr85U2aGagJ46+MvodynlQ1HYdmJys=
555 | go.opentelemetry.io/otel/trace v1.31.0/go.mod h1:TXZkRk7SM2ZQLtR6eoAWQFIHPvzQ06FJAsO1tJg480A=
556 | go.opentelemetry.io/proto/otlp v1.3.1 h1:TrMUixzpM0yuc/znrFTP9MMRh8trP93mkCiDVeXrui0=
557 | go.opentelemetry.io/proto/otlp v1.3.1/go.mod h1:0X1WI4de4ZsLrrJNLAQbFeLCm3T7yBkR0XqQ7niQU+8=
558 | go.step.sm/cli-utils v0.9.0 h1:55jYcsQbnArNqepZyAwcato6Zy2MoZDRkWW+jF+aPfQ=
559 | go.step.sm/cli-utils v0.9.0/go.mod h1:Y/CRoWl1FVR9j+7PnAewufAwKmBOTzR6l9+7EYGAnp8=
560 | go.step.sm/crypto v0.45.0 h1:Z0WYAaaOYrJmKP9sJkPW+6wy3pgN3Ija8ek/D4serjc=
561 | go.step.sm/crypto v0.45.0/go.mod h1:6IYlT0L2jfj81nVyCPpvA5cORy0EVHPhieSgQyuwHIY=
562 | go.step.sm/linkedca v0.20.1 h1:bHDn1+UG1NgRrERkWbbCiAIvv4lD5NOFaswPDTyO5vU=
563 | go.step.sm/linkedca v0.20.1/go.mod h1:Vaq4+Umtjh7DLFI1KuIxeo598vfBzgSYZUjgVJ7Syxw=
564 | go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
565 | go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
566 | go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
567 | go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
568 | go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs=
569 | go.uber.org/automaxprocs v1.6.0/go.mod h1:ifeIMSnPZuznNm6jmdzmU3/bfk01Fe2fotchwEFJ8r8=
570 | go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto=
571 | go.uber.org/goleak v1.3.0/go.mod h1:CoHD4mav9JJNrW/WLlf7HGZPjdw8EucARQHekz1X6bE=
572 | go.uber.org/mock v0.5.0 h1:KAMbZvZPyBPWgD14IrIQ38QCyjwpvVVV6K/bHl1IwQU=
573 | go.uber.org/mock v0.5.0/go.mod h1:ge71pBPLYDk7QIi1LupWxdAykm7KIEFchiOqd6z7qMM=
574 | go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
575 | go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
576 | go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
577 | go.uber.org/multierr v1.11.0 h1:blXXJkSxSSfBVBlC76pxqeO+LN3aDfLQo+309xJstO0=
578 | go.uber.org/multierr v1.11.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y=
579 | go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
580 | go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
581 | go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
582 | go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
583 | go.uber.org/zap v1.27.0 h1:aJMhYGrd5QSmlpLMr2MftRKl7t8J8PTZPA732ud/XR8=
584 | go.uber.org/zap v1.27.0/go.mod h1:GB2qFLM7cTU87MWRP2mPIjqfIDnGu+VIO4V/SdhGo2E=
585 | go.uber.org/zap/exp v0.3.0 h1:6JYzdifzYkGmTdRR59oYH+Ng7k49H9qVpWwNSsGJj3U=
586 | go.uber.org/zap/exp v0.3.0/go.mod h1:5I384qq7XGxYyByIhHm6jg5CHkGY0nsTfbDLgDDlgJQ=
587 | go4.org v0.0.0-20180809161055-417644f6feb5/go.mod h1:MkTOUMDaeVYJUOUsaDXIhWPZYa1yOyC1qaOBpL57BhE=
588 | golang.org/x/build v0.0.0-20190111050920-041ab4dc3f9d/go.mod h1:OWs+y06UdEOHN4y+MfF/py+xQ/tYqIWW03b70/CG9Rw=
589 | golang.org/x/crypto v0.0.0-20181030102418-4d3f4d9ffa16/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
590 | golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
591 | golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
592 | golang.org/x/crypto v0.0.0-20190313024323-a1f597ede03a/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
593 | golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
594 | golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
595 | golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
596 | golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
597 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
598 | golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
599 | golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
600 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
601 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
602 | golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU=
603 | golang.org/x/crypto v0.34.0 h1:+/C6tk6rf/+t5DhUketUbD1aNGqiSX3j15Z6xuIDlBA=
604 | golang.org/x/crypto v0.34.0/go.mod h1:dy7dXNW32cAb/6/PRuTNsix8T+vJAqvuIy5Bli/x0YQ=
605 | golang.org/x/crypto/x509roots/fallback v0.0.0-20241104001025-71ed71b4faf9 h1:4cEcP5+OjGppY79LCQ5Go2B1Boix2x0v6pvA01P3FoA=
606 | golang.org/x/crypto/x509roots/fallback v0.0.0-20241104001025-71ed71b4faf9/go.mod h1:kNa9WdvYnzFwC79zRpLRMJbdEFlhyM5RPFBBZp/wWH8=
607 | golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA=
608 | golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa h1:t2QcU6V556bFjYgu4L6C+6VrCPyJZ+eyRsABUPs1mz4=
609 | golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa/go.mod h1:BHOTPb3L19zxehTsLoJXVaTktb06DFgmdW6Wb9s8jqk=
610 | golang.org/x/lint v0.0.0-20180702182130-06c8688daad7/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
611 | golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE=
612 | golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU=
613 | golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
614 | golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
615 | golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
616 | golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
617 | golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
618 | golang.org/x/mod v0.23.0 h1:Zb7khfcRGKk+kqfxFaP5tZqCnDZMjC5VtUBs87Hr6QM=
619 | golang.org/x/mod v0.23.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY=
620 | golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
621 | golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
622 | golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
623 | golang.org/x/net v0.0.0-20181029044818-c44066c5c816/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
624 | golang.org/x/net v0.0.0-20181106065722-10aee1819953/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
625 | golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
626 | golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
627 | golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
628 | golang.org/x/net v0.0.0-20190313220215-9f648a60d977/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
629 | golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
630 | golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
631 | golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
632 | golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
633 | golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
634 | golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs=
635 | golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg=
636 | golang.org/x/net v0.35.0 h1:T5GQRQb2y08kTAByq9L4/bz8cipCdA8FbRTXewonqY8=
637 | golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk=
638 | golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
639 | golang.org/x/oauth2 v0.0.0-20181017192945-9dcd33a902f4/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
640 | golang.org/x/oauth2 v0.0.0-20181203162652-d668ce993890/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
641 | golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
642 | golang.org/x/oauth2 v0.24.0 h1:KTBBxWqUa0ykRPLtV69rRto9TLXcqYkeswu48x/gvNE=
643 | golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI=
644 | golang.org/x/perf v0.0.0-20180704124530-6e6d33e29852/go.mod h1:JLpeXjPJfIyPr5TlbXLkXWLhP8nz10XfvxElABhCtcw=
645 | golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
646 | golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
647 | golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
648 | golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
649 | golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
650 | golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
651 | golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
652 | golang.org/x/sync v0.11.0 h1:GGz8+XQP4FvTTrjZPzNKTMFtSXH80RAzG+5ghFPgK9w=
653 | golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk=
654 | golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
655 | golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
656 | golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
657 | golang.org/x/sys v0.0.0-20181029174526-d69651ed3497/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
658 | golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
659 | golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
660 | golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
661 | golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
662 | golang.org/x/sys v0.0.0-20190316082340-a2f829d7f35f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
663 | golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
664 | golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
665 | golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
666 | golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
667 | golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
668 | golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
669 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
670 | golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
671 | golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
672 | golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
673 | golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
674 | golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
675 | golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
676 | golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
677 | golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
678 | golang.org/x/sys v0.0.0-20221010170243-090e33056c14/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
679 | golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
680 | golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
681 | golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
682 | golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
683 | golang.org/x/sys v0.30.0 h1:QjkSwP/36a20jFYWkSue1YwXzLmsV5Gfq7Eiy72C1uc=
684 | golang.org/x/sys v0.30.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
685 | golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
686 | golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
687 | golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
688 | golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k=
689 | golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo=
690 | golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk=
691 | golang.org/x/term v0.29.0 h1:L6pJp37ocefwRRtYPKSWOWzOtWSxVajvz2ldH/xi3iU=
692 | golang.org/x/term v0.29.0/go.mod h1:6bl4lRlvVuDgSf3179VpIxBF0o10JUpXWOnI7nErv7s=
693 | golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
694 | golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
695 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
696 | golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
697 | golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
698 | golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
699 | golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
700 | golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
701 | golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8=
702 | golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
703 | golang.org/x/text v0.22.0 h1:bofq7m3/HAFvbF51jz3Q9wLg3jkvSPuiZu/pD1XwgtM=
704 | golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY=
705 | golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
706 | golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
707 | golang.org/x/time v0.10.0 h1:3usCWA8tQn0L8+hFJQNgzpWbd89begxN66o1Ojdn5L4=
708 | golang.org/x/time v0.10.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM=
709 | golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
710 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
711 | golang.org/x/tools v0.0.0-20181030000716-a0a13e073c7b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
712 | golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
713 | golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
714 | golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
715 | golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
716 | golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
717 | golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
718 | golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
719 | golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
720 | golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
721 | golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
722 | golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
723 | golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU=
724 | golang.org/x/tools v0.30.0 h1:BgcpHewrV5AUp2G9MebG4XPFI1E2W41zU1SaqVA9vJY=
725 | golang.org/x/tools v0.30.0/go.mod h1:c347cR/OJfw5TI+GfX7RUPNMdDRRbjvYTS0jPyvsVtY=
726 | golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
727 | golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
728 | golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
729 | golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
730 | golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
731 | google.golang.org/api v0.0.0-20180910000450-7ca32eb868bf/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
732 | google.golang.org/api v0.0.0-20181030000543-1d582fd0359e/go.mod h1:4mhQ8q/RsB7i+udVvVy5NUi08OU8ZlA0gRVgrF7VFY0=
733 | google.golang.org/api v0.1.0/go.mod h1:UGEZY7KEX120AnNLIHFMKIo4obdJhkp2tPbaPlQx13Y=
734 | google.golang.org/api v0.180.0 h1:M2D87Yo0rGBPWpo1orwfCLehUUL6E7/TYe5gvMQWDh4=
735 | google.golang.org/api v0.180.0/go.mod h1:51AiyoEg1MJPSZ9zvklA8VnRILPXxn1iVen9v25XHAE=
736 | google.golang.org/appengine v1.1.0/go.mod h1:EbEs0AVv82hx2wNQdGPgUI5lhzA/G0D9YwlJXL52JkM=
737 | google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
738 | google.golang.org/appengine v1.3.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
739 | google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
740 | google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
741 | google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
742 | google.golang.org/genproto v0.0.0-20181029155118-b69ba1387ce2/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
743 | google.golang.org/genproto v0.0.0-20181202183823-bd91e49a0898/go.mod h1:7Ep/1NZk928CDR8SjdVbjWNpdIf6nzjE3BTgJDr2Atg=
744 | google.golang.org/genproto v0.0.0-20190306203927-b5d61aea6440/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE=
745 | google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda h1:wu/KJm9KJwpfHWhkkZGohVC6KRrc1oJNr4jwtQMOQXw=
746 | google.golang.org/genproto v0.0.0-20240401170217-c3f982113cda/go.mod h1:g2LLCvCeCSir/JJSWosk19BR4NVxGqHUC6rxIRsd7Aw=
747 | google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9 h1:T6rh4haD3GVYsgEfWExoCZA2o2FmbNyKpTuAxbEFPTg=
748 | google.golang.org/genproto/googleapis/api v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:wp2WsuBYj6j8wUdo3ToZsdxxixbvQNAHqVJrTgi5E5M=
749 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9 h1:QCqS/PdaHTSWGvupk2F/ehwHtGc0/GYkT+3GAcR1CCc=
750 | google.golang.org/genproto/googleapis/rpc v0.0.0-20241007155032-5fefd90f89a9/go.mod h1:GX3210XPVPUjJbTUbvwI8f2IpZDMZuPJWDzDuebbviI=
751 | google.golang.org/grpc v1.14.0/go.mod h1:yo6s7OP7yaDglbqo1J04qKzAhqBH6lvTonzMVmEdcZw=
752 | google.golang.org/grpc v1.16.0/go.mod h1:0JHn/cJsOMiMfNA9+DeHDlAU7KAAB5GDlYFpa9MZMio=
753 | google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
754 | google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
755 | google.golang.org/grpc v1.67.1 h1:zWnc1Vrcno+lHZCOofnIMvycFcc0QRGIzm9dhnDX68E=
756 | google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA=
757 | google.golang.org/protobuf v1.36.5 h1:tPhr+woSbjfYvY6/GPufUoYizxw1cF/yFoxJ2fmpwlM=
758 | google.golang.org/protobuf v1.36.5/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE=
759 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
760 | gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
761 | gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
762 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
763 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
764 | gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
765 | gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
766 | gopkg.in/inf.v0 v0.9.1/go.mod h1:cWUDdTG/fYaXco+Dcufb5Vnc6Gp2YChqWtbxRZE0mXw=
767 | gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc=
768 | gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc=
769 | gopkg.in/yaml.v1 v1.0.0-20140924161607-9f9df34309c0/go.mod h1:WDnlLJ4WF5VGsH/HVa3CI79GS0ol3YnhVnKP89i0kNg=
770 | gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
771 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
772 | gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
773 | gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
774 | gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
775 | gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
776 | grpc.go4.org v0.0.0-20170609214715-11d0a25b4919/go.mod h1:77eQGdRu53HpSqPFJFmuJdjuHRquDANNeA4x7B8WQ9o=
777 | honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
778 | honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
779 | honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
780 | honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
781 | howett.net/plist v1.0.0 h1:7CrbWYbPPO/PyNy38b2EB/+gYbjCe2DXBxgtOOZbSQM=
782 | howett.net/plist v1.0.0/go.mod h1:lqaXoTrLY4hg8tnEzNru53gicrbv7rrk+2xJA/7hw9g=
783 | sourcegraph.com/sourcegraph/go-diff v0.5.0/go.mod h1:kuch7UrkMzY0X+p9CRK03kfuPQ2zzQcaEFbx8wA8rck=
784 | sourcegraph.com/sqs/pbtypes v0.0.0-20180604144634-d3ebe8f20ae4/go.mod h1:ketZ/q3QxT9HOBeFhu6RdvsftgpsbFHBF5Cas6cDKZ0=
785 |
--------------------------------------------------------------------------------
/inspect.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2018 Kurt Jung (Gmail: kurt.w.jung)
3 | *
4 | * Permission to use, copy, modify, and distribute this software for any
5 | * purpose with or without fee is hereby granted, provided that the above
6 | * copyright notice and this permission notice appear in all copies.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | package cgi
18 |
19 | import (
20 | "bytes"
21 | "fmt"
22 | "net/http"
23 | "net/http/cgi"
24 | "os"
25 | "sort"
26 | "strings"
27 |
28 | "github.com/caddyserver/caddy/v2"
29 | )
30 |
31 | type kvType struct {
32 | key, val string
33 | }
34 |
35 | func inspect(hnd cgi.Handler, w http.ResponseWriter, req *http.Request, rep *caddy.Replacer) {
36 | var buf bytes.Buffer
37 |
38 | printf := func(format string, args ...interface{}) {
39 | fmt.Fprintf(&buf, format, args...)
40 | }
41 |
42 | kvPrint := func(indentStr, keyStr, valStr string) {
43 | dotLen := 30 - len(keyStr) - len(indentStr)
44 | if dotLen < 2 {
45 | dotLen = 2
46 | }
47 | dotStr := strings.Repeat(".", dotLen)
48 | printf("%s%s %s %s\n", indentStr, keyStr, dotStr, valStr)
49 | }
50 |
51 | printf("CGI for Caddy inspection page\n\n")
52 |
53 | kvPrint("", "Executable", hnd.Path)
54 |
55 | for j, arg := range hnd.Args {
56 | kvPrint(" ", fmt.Sprintf("Arg %d", j+1), arg)
57 | }
58 |
59 | kvSort := func(kvList []kvType) {
60 | sort.Slice(kvList, func(a, b int) bool {
61 | return kvList[a].key < kvList[b].key
62 | })
63 | }
64 |
65 | split := func(list []string) (kvList []kvType) {
66 | for _, kv := range list {
67 | pair := strings.SplitN(kv, "=", 2)
68 | if len(pair) == 2 {
69 | kvList = append(kvList, kvType{key: pair[0], val: pair[1]})
70 | }
71 | }
72 | return
73 | }
74 |
75 | osEnv := func(list []string) (kvList []kvType) {
76 | for _, key := range list {
77 | kvList = append(kvList, kvType{key: key, val: os.Getenv(key)})
78 | }
79 | return
80 | }
81 |
82 | repPrint := func(prms ...string) {
83 | printf("Placeholders\n")
84 | for _, prm := range prms {
85 | kvPrint(" ", prm, rep.ReplaceAll(prm, ""))
86 | }
87 | }
88 |
89 | kvListPrint := func(kvList []kvType, hdrStr string) {
90 | printf("%s\n", hdrStr)
91 | kvSort(kvList)
92 | for _, kv := range kvList {
93 | kvPrint(" ", kv.key, kv.val)
94 | }
95 | }
96 |
97 | kvPrint("", "Root", hnd.Root)
98 | kvPrint("", "Dir", hnd.Dir)
99 | kvListPrint(split(hnd.Env), "Environment")
100 | kvListPrint(osEnv(hnd.InheritEnv), "Inherited environment")
101 | repPrint("{path}", "{root}", "{http.request.host}", "{http.request.method}", "{http.request.uri.path}")
102 |
103 | w.Header().Set("Content-Type", "text/plain; charset=utf-8")
104 | buf.WriteTo(w)
105 | }
106 |
--------------------------------------------------------------------------------
/module.go:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2020 Andreas Schneider
3 | *
4 | * Permission to use, copy, modify, and distribute this software for any
5 | * purpose with or without fee is hereby granted, provided that the above
6 | * copyright notice and this permission notice appear in all copies.
7 | *
8 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 | */
16 |
17 | package cgi
18 |
19 | import (
20 | "github.com/caddyserver/caddy/v2"
21 | "github.com/caddyserver/caddy/v2/caddyconfig/caddyfile"
22 | "github.com/caddyserver/caddy/v2/caddyconfig/httpcaddyfile"
23 | "github.com/caddyserver/caddy/v2/modules/caddyhttp"
24 | "github.com/dustin/go-humanize"
25 | "go.uber.org/zap"
26 | )
27 |
28 | func init() {
29 | caddy.RegisterModule(CGI{})
30 | httpcaddyfile.RegisterHandlerDirective("cgi", parseCaddyfile)
31 | httpcaddyfile.RegisterDirectiveOrder("cgi", httpcaddyfile.Before, "respond")
32 | }
33 |
34 | // CGI implements a CGI handler that executes binary files following the
35 | // CGI protocol, passing parameters via environment variables and evaluating
36 | // the response as the HTTP response.
37 | type CGI struct {
38 | // Name of executable script or binary
39 | Executable string `json:"executable"`
40 | // Working directory (default, current Caddy working directory)
41 | WorkingDirectory string `json:"workingDirectory,omitempty"`
42 | // The script path of the uri.
43 | ScriptName string `json:"scriptName,omitempty"`
44 | // Arguments to submit to executable
45 | Args []string `json:"args,omitempty"`
46 | // Environment key value pairs (key=value) for this particular app
47 | Envs []string `json:"envs,omitempty"`
48 | // Environment keys to pass through for all apps
49 | PassEnvs []string `json:"passEnvs,omitempty"`
50 | // True to pass all environment variables to CGI executable
51 | PassAll bool `json:"passAllEnvs,omitempty"`
52 | // True to return inspection page rather than call CGI executable
53 | Inspect bool `json:"inspect,omitempty"`
54 | // Size of the in memory buffer to buffer chunked transfers
55 | // if this size is exceeded a temporary file is used
56 | BufferLimit int64 `json:"buffer_limit,omitempty"`
57 | // If set, output from the CGI script is immediately flushed whenever
58 | // some bytes have been read.
59 | UnbufferedOutput bool `json:"unbufferedOutput,omitempty"`
60 |
61 | logger *zap.Logger
62 | }
63 |
64 | // Interface guards
65 | var (
66 | _ caddyhttp.MiddlewareHandler = (*CGI)(nil)
67 | _ caddyfile.Unmarshaler = (*CGI)(nil)
68 | _ caddy.Provisioner = (*CGI)(nil)
69 | )
70 |
71 | func (c CGI) CaddyModule() caddy.ModuleInfo {
72 | return caddy.ModuleInfo{
73 | ID: "http.handlers.cgi",
74 | New: func() caddy.Module { return &CGI{} },
75 | }
76 | }
77 |
78 | // UnmarshalCaddyfile implements caddyfile.Unmarshaler.
79 | func (c *CGI) UnmarshalCaddyfile(d *caddyfile.Dispenser) error {
80 | // Consume 'em all. Matchers should be used to differentiate multiple instantiations.
81 | // If they are not used, we simply combine them first-to-last.
82 | for d.Next() {
83 | args := d.RemainingArgs()
84 | if len(args) < 1 {
85 | return d.Err("an executable needs to be specified")
86 | }
87 | c.Executable = args[0]
88 | c.Args = args[1:]
89 |
90 | for d.NextBlock(0) {
91 | switch d.Val() {
92 | case "dir":
93 | if !d.Args(&c.WorkingDirectory) {
94 | return d.ArgErr()
95 | }
96 | case "script_name":
97 | if !d.Args(&c.ScriptName) {
98 | return d.ArgErr()
99 | }
100 | case "env":
101 | c.Envs = d.RemainingArgs()
102 | if len(c.Envs) == 0 {
103 | return d.ArgErr()
104 | }
105 | case "pass_env":
106 | c.PassEnvs = d.RemainingArgs()
107 | if len(c.PassEnvs) == 0 {
108 | return d.ArgErr()
109 | }
110 | case "pass_all_env":
111 | c.PassAll = true
112 | case "inspect":
113 | c.Inspect = true
114 | case "buffer_limit":
115 | if !d.NextArg() {
116 | return d.ArgErr()
117 | }
118 | size, err := humanize.ParseBytes(d.Val())
119 | if err != nil {
120 | return d.Errf("invalid buffer limit '%s': %v", d.Val(), err)
121 | }
122 | c.BufferLimit = int64(size)
123 | case "unbuffered_output":
124 | c.UnbufferedOutput = true
125 | default:
126 | return d.Errf("unknown subdirective: %q", d.Val())
127 | }
128 | }
129 | }
130 | return nil
131 | }
132 |
133 | func (c *CGI) Provision(ctx caddy.Context) error {
134 | c.logger = ctx.Logger(c)
135 |
136 | if c.BufferLimit <= 0 {
137 | c.BufferLimit = 4 << 20
138 | }
139 |
140 | return nil
141 | }
142 |
143 | // parseCaddyfile unmarshals tokens from h into a new Middleware.
144 | func parseCaddyfile(h httpcaddyfile.Helper) (caddyhttp.MiddlewareHandler, error) {
145 | c := new(CGI)
146 | err := c.UnmarshalCaddyfile(h.Dispenser)
147 | return c, err
148 | }
149 |
--------------------------------------------------------------------------------
/module_test.go:
--------------------------------------------------------------------------------
1 | package cgi
2 |
3 | import (
4 | "github.com/caddyserver/caddy/v2/caddytest"
5 | "github.com/stretchr/testify/assert"
6 | "github.com/stretchr/testify/require"
7 | "net/http"
8 | "testing"
9 | )
10 |
11 | func TestCGI_CaddyModule(t *testing.T) {
12 | tester := caddytest.NewTester(t)
13 | tester.InitServer(`
14 | {
15 | admin localhost:2999
16 | http_port 9080
17 | https_port 9443
18 | }
19 | localhost:9080 {
20 | cgi /foo* ./test/example
21 | }`, "caddyfile")
22 |
23 | resp, err := tester.Client.Get("http://localhost:9080/foo/bar")
24 | require.NoError(t, err)
25 | assert.Equal(t, http.StatusOK, resp.StatusCode)
26 | assert.Equal(t, "text/plain", resp.Header.Get("Content-Type"))
27 | }
28 |
--------------------------------------------------------------------------------
/test/example:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | printf "Content-type: text/plain\n\n"
4 | printf "PATH_INFO [%s]\n" ${PATH_INFO}
5 | printf "CGI_GLOBAL [%s]\n" ${CGI_GLOBAL}
6 | printf "Arg 1 [%s]\n" ${1}
7 | printf "QUERY_STRING [%s]\n" ${QUERY_STRING}
8 | printf "REMOTE_USER [%s]\n" ${REMOTE_USER}
9 | printf "HTTP_TOKEN_CLAIM_USER [%s]\n" ${HTTP_TOKEN_CLAIM_USER}
10 | if [ -z ${CGI_LOCAL+x} ]; then
11 | printf "CGI_LOCAL is unset\n"
12 | else
13 | printf "CGI_LOCAL is set to [%s]\n" ${CGI_LOCAL}
14 | fi
15 | printf "example error message\n" > /dev/stderr
16 | exit 0
17 |
--------------------------------------------------------------------------------
/test/example.txt:
--------------------------------------------------------------------------------
1 | Example
2 |
--------------------------------------------------------------------------------
/test/example_post:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | printf "Content-type: text/plain\n\n"
4 | printf "PATH_INFO [%s]\n" ${PATH_INFO}
5 | printf "CGI_GLOBAL [%s]\n" ${CGI_GLOBAL}
6 | printf "Arg 1 [%s]\n" ${1}
7 | printf "QUERY_STRING [%s]\n" ${QUERY_STRING}
8 | printf "REMOTE_USER [%s]\n" ${REMOTE_USER}
9 | printf "HTTP_TOKEN_CLAIM_USER [%s]\n" ${HTTP_TOKEN_CLAIM_USER}
10 | if [ -z ${CGI_LOCAL+x} ]; then
11 | printf "CGI_LOCAL is unset\n"
12 | else
13 | printf "CGI_LOCAL is set to [%s]\n" ${CGI_LOCAL}
14 | fi
15 | printf '%s\n' "$( /dev/stderr
17 | exit 0
18 |
--------------------------------------------------------------------------------
/test/fullenv:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | printf "Content-type: text/plain\n\n"
4 | /usr/bin/env
5 | exit 0
6 |
--------------------------------------------------------------------------------
/test/showdir:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | printf "Content-type: text/plain\n\n"
4 | /bin/pwd
5 | exit 0
6 |
7 |
--------------------------------------------------------------------------------