Skip to content

Commit 1af29f9

Browse files
authored
feat(http): add skip-secret-file field (#5522)
* feat(http): add `BypassSecretFile` field Signed-off-by: Dwi Siswanto <[email protected]> * feat(http): conditionally apply auth strategies Signed-off-by: Dwi Siswanto <[email protected]> * refactor(http): rename `BypassSecretFile` field to `SkipSecretFile` Signed-off-by: Dwi Siswanto <[email protected]> --------- Signed-off-by: Dwi Siswanto <[email protected]>
1 parent 1293a34 commit 1af29f9

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pkg/protocols/http/http.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ type Request struct {
147147
// - "AWS"
148148
Signature SignatureTypeHolder `yaml:"signature,omitempty" json:"signature,omitempty" jsonschema:"title=signature is the http request signature method,description=Signature is the HTTP Request signature Method,enum=AWS"`
149149

150+
// description: |
151+
// SkipSecretFile skips the authentication or authorization configured in the secret file.
152+
SkipSecretFile bool `yaml:"skip-secret-file,omitempty" json:"skip-secret-file,omitempty" jsonschema:"title=bypass secret file,description=Skips the authentication or authorization configured in the secret file"`
153+
150154
// description: |
151155
// CookieReuse is an optional setting that enables cookie reuse for
152156
// all requests defined in raw section.

pkg/protocols/http/request.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ func (request *Request) executeRequest(input *contextargs.Context, generatedRequ
689689
}
690690

691691
// === apply auth strategies ===
692-
if generatedRequest.request != nil {
692+
if generatedRequest.request != nil && !request.SkipSecretFile {
693693
generatedRequest.ApplyAuth(request.options.AuthProvider)
694694
}
695695

0 commit comments

Comments
 (0)