Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug bounty test - PLEASE DO NOT APPROVE. vgopvg #2

Merged
merged 146 commits into from
Nov 6, 2024
Merged

Conversation

pastramahodu
Copy link
Mannequin

@pastramahodu pastramahodu mannequin commented May 13, 2023

Bug bounty test - PLEASE DO NOT APPROVE. vgopvg

taik0 and others added 30 commits February 13, 2023 17:48
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Resolved issues in proxy/shadow.go via DeepSource Autofix
…gure an specific timeout.

Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.4.0 to 0.7.0.
- [Release notes](https://github.com/golang/net/releases)
- [Commits](golang/net@v0.4.0...v0.7.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
…ttern.

Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Add a setter to the sequentialParamsPattern
….org/x/net-0.7.0

Bump golang.org/x/net from 0.4.0 to 0.7.0
Set the timeout in the context sent to the shadow proxy request
Signed-off-by: kpacha <dlopez@krakend.io>
Signed-off-by: Moritz Ploss <moritz.ploss@gmail.com>
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.0.0-20211215153901-e495a2d5b3d3 to 0.1.0.
- [Release notes](https://github.com/golang/crypto/releases)
- [Commits](https://github.com/golang/crypto/commits/v0.1.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: kpacha <dlopez@krakend.io>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Resolved issues in proxy/plugin.go with DeepSource Autofix
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Check function provided by request response modifier plugin is not nil
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
dhontecillas and others added 29 commits October 1, 2023 19:12
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
…(also for backend headers)

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Signed-off-by: kpacha <dlopez@krakend.io>
…other partes (fixed)

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
….0.0).

Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Allow to configure the listen address of the service
init.

If we initialize h2c using gin router it will use h2c handler
to wrap handler with all routes registered on gin router.
The problem is that it is possible to construct router factory
with RunServer function which will wrap h2c handler with additional
handler. Any logic in this handler will not be able to understand
http2 cleartext requests.

We have this example in krakend-ce repository where CORS support
is added through RunServer function. Then we have CORS handler ->
h2c handler -> Gin router.

Simplest fix is to move h2c support to server initialization
and add h2c handler as the outermost layer.

Signed-off-by: Antonije Ivanovic <aivanovic@squarespace.com>
Signed-off-by: Antonije Ivanovic <aivanovic@squarespace.com>
Signed-off-by: Antonije Ivanovic <aivanovic@squarespace.com>
Signed-off-by: Antonije Ivanovic <aivanovic@squarespace.com>
Signed-off-by: Antonije Ivanovic <aivanovic@squarespace.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Name explicitly the client certificate and private key
In my [#694](luraproject/lura#694) I fixed
issued with h2c support and CORS. There was small bug which slipped
through code review. New config field does not use correct struct tag.

Changed `json` to `mapstructure`.

Signed-off-by: Antonije Ivanovic <aivanovic@squarespace.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
…_config

fix missing h2c flag from parser to config
* Bump golang.org/x/crypto from 0.14.0 to 0.17.0

Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.14.0 to 0.17.0.
- [Commits](golang/crypto@v0.14.0...v0.17.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* add ParentEndpoint to Backend config structure and info to the backend
logs.

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>

* Do not abort the loading of handler plugins when one of them fails to load. Adjust log levels.

Signed-off-by: Daniel Ortiz <dortiz@krakend.io>

* Fix typo

Fix typo in "Response" word.

Signed-off-by: Javier Vázquez Romera <javier.vazquez.romera@gmail.com>

* Add the encoding to the HTTPResponseError so, when returning an error from the backend, the content-type matches. This change only applies when using "return_error_code" or "return_error_details".

Signed-off-by: Daniel Ortiz <dortiz@krakend.io>

* Fix tests and add mux support.

Signed-off-by: Daniel Ortiz <dortiz@krakend.io>

* Remove mux support since we can't write headers after the first write.

Signed-off-by: Daniel Ortiz <dortiz@krakend.io>

* refactor: autofix issues in 1 file

Resolved issues in transport/http/client/status_test.go with DeepSource Autofix

* Remove unused code.

Signed-off-by: Daniel Ortiz <dortiz@krakend.io>

* add parent endpoint method to backend logs to better indetify the parent endpoint

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>

* Pass the application context to the request and response modifiers. Also extend the structs passed to the modifier functions so it can retrieve the execution Context. Reponse modifers now have access to the Request. Updated examples to show the new features.

Signed-off-by: Daniel Ortiz <dortiz@krakend.io>

* refactor: autofix issues in 1 file

Resolved issues in proxy/plugin/modifier_test.go with DeepSource Autofix

* do not export a function returning an unexported type

Signed-off-by: kpacha <dlopez@krakend.io>

* set the timeouts for the internal endpoint and backend(s)

Signed-off-by: kpacha <dlopez@krakend.io>

* build the final string directly

Signed-off-by: kpacha <dlopez@krakend.io>

* remove unrequired request clone

Signed-off-by: kpacha <dlopez@krakend.io>

* fix log messages

Signed-off-by: kpacha <dlopez@krakend.io>

* simplify the timeout assignation

Signed-off-by: kpacha <dlopez@krakend.io>

* feat: add overwrite functionality for invalid Pattern

Signed-off-by: Emin Aktas <eminaktas34@gmail.com>

* Bump google.golang.org/protobuf from 1.30.0 to 1.33.0

Bumps google.golang.org/protobuf from 1.30.0 to 1.33.0.

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* requests should be cloned at the split/merge and concurrent mw only

Signed-off-by: kpacha <dlopez@krakend.io>

* do not use log.Fatal

Signed-off-by: kpacha <dlopez@krakend.io>

* set the max header bytes param configurable

Signed-off-by: kpacha <dlopez@krakend.io>

* fix the hash of the new config test

Signed-off-by: kpacha <dlopez@krakend.io>

* clone the body if there are one or more unsafe backends

Signed-off-by: kpacha <dlopez@krakend.io>

* Bump golang.org/x/net from 0.17.0 to 0.23.0

Bumps [golang.org/x/net](https://github.com/golang/net) from 0.17.0 to 0.23.0.
- [Commits](golang/net@v0.17.0...v0.23.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* add config field to serve tls using multiple key pairs

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>

* use list of certificates for serving TLS

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>

* test serving multiple certificates

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>

* fix style issues in certs tests

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>

* add config option to tweak the DNS cache TTL

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>

* get go version from runtime

Signed-off-by: David Hontecillas <dhontecillas@gmail.com>

* Correct typo in plugin registration log

Signed-off-by: Albert Lombarte <albert@krakend.io>

* h2c disabled by default

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: David Hontecillas <dhontecillas@gmail.com>
Signed-off-by: Daniel Ortiz <dortiz@krakend.io>
Signed-off-by: Javier Vázquez Romera <javier.vazquez.romera@gmail.com>
Signed-off-by: kpacha <dlopez@krakend.io>
Signed-off-by: Emin Aktas <eminaktas34@gmail.com>
Signed-off-by: Albert Lombarte <albert@krakend.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: David Hontecillas <dhontecillas@gmail.com>
Co-authored-by: Daniel Ortiz <dortiz@krakend.io>
Co-authored-by: Javier Vázquez Romera <javier.vazquez.romera@gmail.com>
Co-authored-by: A. Lombarte <alombarte@users.noreply.github.com>
Co-authored-by: deepsource-autofix[bot] <62050782+deepsource-autofix[bot]@users.noreply.github.com>
Co-authored-by: Daniel López <dlopez@krakend.io>
Co-authored-by: Emin Aktas <eminaktas34@gmail.com>
Co-authored-by: Albert Lombarte <albert@krakend.io>
@jayanth-tatina-groww jayanth-tatina-groww merged commit 0b75ada into master Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants