Commit graph

648 commits

Author SHA1 Message Date
Boris Kreitchman
d1dc3e827f
Config/Annotations: Add proxy-busy-buffers-size. (#12433) 2024-12-05 18:10:00 +00:00
chriss-de
698960e9b7
Config/Annotations: Add relative-redirects. (#12161) 2024-11-13 21:02:48 +00:00
Ricardo Katz
7356c4f40f
Lua: Extract external auth into file. (#12250)
Co-authored-by: Marco Ebert <marco_ebert@icloud.com>
2024-10-29 13:22:54 +00:00
Ricardo Katz
6510535ae0
NGINX: Remove inline Lua from template. (#11806) 2024-09-08 18:48:12 -03:00
Nathan Baulch
4f23049374
Fix minor typos (#11935) 2024-09-06 15:59:43 +01:00
Ricardo Katz
21cd966d1c
Remove global-rate-limit feature (#11851) 2024-08-25 21:03:29 +01:00
Ricardo Katz
3bec99ecfc
Remove 3rd party lua plugin support (#11821) 2024-08-21 14:54:29 +01:00
Anddd7
d0e9934789
feat: Add grpc timeouts annotations (#11258)
*  feat: add grpc timeouts with proxy settings if backend is grpc

* 📝  docs: Documentation only changes

* 🐛 fix: uppercase for protocol

* 📝 docs: grpc timeouts example

* 📝 docs: add links and default values for proxy timeout

* 🧪 test: add e2e test for timeout

* 🐛 fix: upgrade to 1.0.6 to fix nil pointer

* 🐛 fix: lint

* 🧪 test: trigger ci
2024-05-26 09:37:11 -07:00
Christian Groschupp
1f4ee0e235
feat: add annotation to allow to add custom response headers (#9742)
* add custom headers

Signed-off-by: Christian Groschupp <christian@groschupp.org>

* add tests

Signed-off-by: Christian Groschupp <christian@groschupp.org>

* add docs

* update copyright

* change comments

* add e2e test customheaders

* add custom headers validation

* remove escapeLiteralDollar filter

* validate value in custom headers

* add regex for header value

* fix annotation test

* Revert "remove escapeLiteralDollar filter"

This reverts commit ab48392b60dee4ce146a4c17e046849f9633c7fb.

* add annotationConfig

* fix test

* fix golangci-lint findings

* fix: add missung exp module

---------

Signed-off-by: Christian Groschupp <christian@groschupp.org>
2024-04-09 03:25:22 -07:00
Marco Ebert
bf3fa53167
Owners: Promote Gacko to ingress-nginx-maintainers & ingress-nginx-reviewers. (#11165)
* Owners: Sort `ingress-nginx-maintainers` & `ingress-nginx-reviewers`.

* Owners: Update URL in aliases.

* Images: Remove owners as it's identical to global owners.

* Images: Remove global owners from `kube-webhook-certgen` owners.

* Owners: Remove members from aliases covered by other aliases.

ingress-nginx-helm-maintainers:
- cpanato: Covered by ingress-nginx-maintainers
- strongjz: Covered by ingress-nginx-maintainers

ingress-nginx-helm-reviewers:
- cpanato: Covered by ingress-nginx-reviewers
- strongjz: Covered by ingress-nginx-reviewers

ingress-nginx-docs-maintainers:
- tao12345666333: Covered by ingress-nginx-maintainers

* Owners: Promote myself to `ingress-nginx-maintainers` & `ingress-nginx-reviewers`.
2024-04-04 08:01:10 -07:00
Marco Ebert
365d886c1d
Chores: Remove recently added whitespaces. (#11156) 2024-03-24 17:44:36 -07:00
Ramon Borges
c0b3294bf4
Add GRPC Buffer Size to the Configmap (#11155)
* feat: add grpc buffer size in the nginx template

* feat: add grpc buffer size in the configmap struct

* feat: add test for GRCP buffer size configuration in the configmap

* chore: add documentation for the grcp buffer size configuration

* fix: fix the copyright year of the test

* fix: fix import order

* fix: fix ignore for the linter - reason was missing

* chore: seems like we don't need to ignore the error handling
2024-03-24 15:07:28 -07:00
Matheus Fidelis
3c4e78e6b7
feature(geoip2_autoreload): Enable GeoIP2 auto_reload config (#11079)
* feature(geoip2_autoreload): GeoIP Autoreload

feature(geoip2_autoreload): fix lint

feature(geoip2_autoreload): changing flag interval

feature(geoip2_autoreload): tests - up and running

feature(geoip2_autoreload): tests - up and running

feature(geoip2): testing

feature(geoip2): remove typo

feature(geoip2_autoreload): fixing tests

* feature(geoip2_autoreload): working

* feature(geoip2_autoreload): including tests on geoip2 test file
2024-03-19 07:32:15 -07:00
bossm8
9c384c7eb8
Undo #11062 since it breaks the nginx config (#11082)
* [mTLS] Fix acme verfication when mTLS and Client CN verification is enabled

* revert mTLS location excluding acme-challenge since each location will match ultimately resulting in 404 for all request paths
2024-03-08 16:06:47 -08:00
bossm8
7d12628208
[mTLS] Fix acme verfication when mTLS and Client CN verification is enabled (#11062) 2024-03-08 12:32:40 -08:00
Artur Juraszek
3a887f28e8
Properly support a TLS-wrapped OCSP responder (#10164)
Current implementation of OCSP stapling makes use of the DNS caching machinery[^1],
which results in resty.http not seeing the actual host name of the OCSP responder.
On HTTP level, this is already mitigated via overriding the Host header, but
if a given responder operates on a HTTPS endpoint (a setup which, admittedly, isn't
very popular due to its chicken-and-egg caveats involved but is nonetheless legal[^2])
the connection will fail to be established. A relevant (and a bit redacted) excerpt from logs:

  2023/07/02 18:13:23 [info] 112#112: *29039 [lua] dns.lua:32: cache_set(): cache set for 'my.ocsp.responder' with value of [10.1.2.3, 10.4.5.6, 10.7.8.9] and ttl of 30., context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:442
  2023/07/02 18:13:23 [error] 112#112: *29039 lua ssl certificate does not match host "10.1.2.3", context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:442
  2023/07/02 18:13:23 [error] 112#112: *29039 [lua] certificate.lua:143: fetch_and_cache_ocsp_response(): could not get OCSP response: certificate host mismatch, context: ngx.timer, client: 127.0.0.1, server: 0.0.0.0:442

[^1]: https://github.com/kubernetes/ingress-nginx/blob/ebb6314/rootfs/etc/nginx/lua/certificate.lua#L81
[^2]: https://datatracker.ietf.org/doc/html/rfc2560#appendix-A.1.1
2024-02-27 05:56:40 -08:00
Ricardo Katz
02e6ebc95a
Add OTEL build test and for NGINX v1.25 (#10889)
* Add OTEL build test

* Simplify otel compilation

* Remove http2 deprecated arg

* Move image build to CI

* Turn image from scratch to optimize usage

* rollback image from scratch

* Final reviews on nginx v1.25 image

* Remove s390x from final image
2024-01-27 07:33:50 -08:00
chriss-de
ad406b64d8
Add override for proxy_intercept_errors when using Custom HTTP Errors (#9497)
* added proxy-intercept-errors config option

* fixed error when comparing locations

* fixed missing location config from annotation
added e2e test

* reversed logic for proxy-intercept-errors to disable-proxy-intercept-errors

* reversed logic to disable-proxy-intercept-errors

* reversed logic

* default has to be false

* put comment in same line as return

* run gofmt

* fixing wrong Boilerplate header

* updated code to new IngressAnnotation interface

* fixes to satisfy PR comments

* synced with upstream; fixed typo

* gofumpt disableproxyintercepterrors.go

* gofumpt
2023-11-17 05:43:54 +01:00
Ricardo Katz
30820a5acc
Deprecate opentracing (#10615) 2023-11-05 01:58:35 +01:00
Ricardo Katz
9ed0d7f7af
Separate third party NGINX configuration (#10470)
* Document container separation

* Separate configurations
2023-11-03 14:46:32 +01:00
Ricardo Katz
cbed4c6831
Remove legacy GeoIP from controller (#10495) 2023-10-11 08:53:55 +02:00
Chen Chen
d96b3f0082
Add a flag to enable or disable aio_write (#10394)
* Add a flag to enable or disable aio_write

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix e2e test for aio_write

Signed-off-by: z1cheng <imchench@gmail.com>

* Remove redundant spaces to fix the 2e test

Signed-off-by: z1cheng <imchench@gmail.com>

---------

Signed-off-by: z1cheng <imchench@gmail.com>
2023-09-11 05:56:12 -07:00
Chen Chen
b3060bfbd0
Fix golangci-lint errors (#10196)
* Fix golangci-lint errors

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix dupl errors

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix comments

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix errcheck lint errors

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix assert in e2e test

Signed-off-by: z1cheng <imchench@gmail.com>

* Not interrupt the waitForPodsReady

Signed-off-by: z1cheng <imchench@gmail.com>

* Replace string with constant

Signed-off-by: z1cheng <imchench@gmail.com>

* Fix comments

Signed-off-by: z1cheng <imchench@gmail.com>

* Revert write file permision

Signed-off-by: z1cheng <imchench@gmail.com>

---------

Signed-off-by: z1cheng <imchench@gmail.com>
2023-08-31 00:36:48 -07:00
Marcelo Cyreno
93f9ac2521
Making auth access logs optional (#10335) 2023-08-28 07:37:44 -07:00
Mark Ley
8a578c9f4a
Disable Modsecurity from internal processing which affects large ingresses (#10316)
* Disable Modsecurity from interanl processing

* Fix modsecurity check logic
2023-08-14 10:35:21 -07:00
Gabor Lekeny
5d8185c9d7
Handle request_id variable correctly in auth requests (#9219)
* Handle $request_id variable correctly in auth requests

* Make share_all_vars configurable

* Fix test name
2023-08-07 06:16:32 -07:00
Ricardo Katz
c5f348ea2e
Implement annotation validation (#9673)
* Add validation to all annotations

* Add annotation validation for fcgi

* Fix reviews and fcgi e2e

* Add flag to disable cross namespace validation

* Add risk, flag for validation, tests

* Add missing formating

* Enable validation by default on tests

* Test validation flag

* remove ajp from list

* Finalize validation changes

* Add validations to CI

* Update helm docs

* Fix code review

* Use a better name for annotation risk
2023-07-21 20:32:07 -07:00
lijie
0cd1f16c47
Scanning port 10247 lead to tcp connection 502 error (#9815)
* fix tcp 502 error

* fix tcp 502 error for parse tcp  backend data

* fix tcp 502 error for parse tcp  backend data
2023-07-16 13:45:06 -07:00
Lázár György
c8f7cb052a
Exposed continent data as variable in the case of Maxmind city files (#10157) 2023-07-06 16:39:04 -07:00
Ricardo Katz
ebb6314494
Deprecate and remove AJP support (#10158) 2023-07-02 02:26:49 -07:00
Junrui Chen
a21b5218a5
Set grpc :authority header from request header (#8912)
This is to fix that the `:authority` header is  set to `upstream_balancer`
2023-06-26 23:30:30 -07:00
Brendan Kamp
30de5999c1
fix: obsolete warnings (#10029)
Signed-off-by: Spazzy <brendankamp757@gmail.com>
2023-06-18 12:16:21 -07:00
Jintao Zhang
cccba35005
Revert "Remove fastcgi feature" (#10081)
* Revert "Remove fastcgi feature (#9864)"

This reverts commit 90ed0ccdbe.

* revert fastcgi* annotations warning

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>

---------

Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
2023-06-13 12:55:59 -07:00
Ricardo Katz
90ed0ccdbe
Remove fastcgi feature (#9864) 2023-06-11 13:33:47 -07:00
Alexander Stanko
2794129e92
Add geoname id value into $geoip2_*_geoname_id variables (#9527) 2023-05-08 15:42:52 -07:00
Ricardo Katz
297036e169
Deprecate and remove influxdb feature (#9861) 2023-04-16 17:26:43 -07:00
Ehsan Saei
c8cb9167d3
feat: OpenTelemetry module integration (#9062)
* OpenTelemetry module integration

* e2e test

* e2e test fix

* default OpentelemetryConfig

* e2e values

* mount otel module for otel test only

* propagate IS_CHROOT

* propagate IS_CHROOT e2e test

* code doc

* comments

* golint

* opentelemetry doc

* zipkin

* zipkin

* typo

* update e2e test OpenTelemetry value

* use opentelemetry value

* revert merge conflict

* fix

* format

* review comments

* clean
2023-03-22 11:58:22 -07:00
Harpreet singh
d1af3b5cca
Add CORS template check inside location for externalAuth.SignURL (#8814)
* Add CORS template check inside location for externalAuth.SignURL

* Add testcase for CORS header for auth-signin redirect with CORS enabled.
2023-01-19 06:58:36 -08:00
Samuel Vaillant
e6dcd6845e
feat(configmap): expose gzip-disable (#9505)
* docs(configmap): add link for gzip-min-length

* feat(configmap): expose gzip-disable

* test(e2e): cover gzip settings

* docs(configmap): simplify description with NGINX link

* refactor(configmap): simplify condition
2023-01-16 17:08:32 -08:00
Jack Ivanov
275d5e15e7
Add buildResolvers to the stream module (#9184) 2023-01-09 03:01:29 -08:00
Johannes Würbach
424cc8671b
fix: disable auth access logs (#9049) 2023-01-08 14:49:27 -08:00
Phil Nichol
8ed3a27e25
Adding ipdenylist annotation (#8795)
* feat: Add support for IP Deny List

* fixed gomod

* Update package

* go mod tidy

* Revert "go mod tidy"

This reverts commit e6a837e1e7.

* update ginko version

* Updates e2e tests

* fix test typo
2023-01-08 14:43:28 -08:00
Johannes Würbach
3aa53aaf5b
fix: missing CORS headers when auth fails (#9251) 2022-12-04 17:49:01 -08:00
Johannes Würbach
6aac00648b
fix: handle 401 and 403 by external auth (#9131) 2022-10-12 15:41:04 -07:00
Nate Campbell
7cb91ef9c1
Support none keyword in log-format escape (#8692)
* Support none keyword in log-format escape


## What this PR does / why we need it:
ingress-nginx does not support disabling escaping of special characters in the nginx log. This PR exposes the setting to support that functionality.

## Types of changes
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
- [ ] Documentation only

## Which issue/s this PR fixes
<!--
(optional, in `fixes #<issue number>` format, will close that issue when PR gets merged):

fixes #
-->

## How Has This Been Tested?
Followed the [getting-started](96b6228a6b/docs/developer-guide/getting-started.md) guide. Used ppa:longsleep/golang-backports on WSL Ubuntu to establish a golang-1.18 environment with latest docker and recommended kind. Built the dev-env successfully; had issues with make test, but they are entirely unrelated to anything I touched. Ultimate test was
```
FOCUS=log-format make kind-e2e-test
...
Ginkgo ran 1 suite in 6m29.7437865s
Test Suite Passed
```

## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [x] My change requires a change to the documentation.
- [x] I have updated the documentation accordingly.
- [x] I've read the [CONTRIBUTION](https://github.com/kubernetes/ingress-nginx/blob/main/CONTRIBUTING.md) guide
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.

I did not update docs/e2e-tests.md.

* gofmt -s ./internal/ingress/controller/config/config.go
2022-09-30 08:00:29 -07:00
Matthias Neugebauer
26fe69cb47
Add annotation for setting sticky cookie domain (#9088)
This adds the new annotation `nginx.ingress.kubernetes.io/session-cookie-domain`
for setting the cookie `Domain` attribute of the sticky cookie.

Signed-off-by: Matthias Neugebauer <mtneug@mailbox.org>

Signed-off-by: Matthias Neugebauer <mtneug@mailbox.org>
2022-09-28 07:28:37 -07:00
Kir Shatrov
0f5bf530ae
Add missing space to error message (#9069) 2022-09-20 04:03:21 -07:00
Christian
fe09f6d096
Don't error log when no OCSP responder URL exists (#8881) 2022-08-22 15:38:09 -07:00
Markus Engel
5e6093cf59
add X-Forwarded-For in custom error template (#7892) 2022-07-28 03:23:10 -07:00
Dmitry Bashkatov
f85c3866d8
add new summary metric: ingress_header_seconds (#8726) 2022-06-22 12:59:43 -07:00