Skip to content

Commit

Permalink
Merge branch 'master' into token-introspection
Browse files Browse the repository at this point in the history
  • Loading branch information
johakoch authored Feb 10, 2023
2 parents 7e389f0 + ddf4489 commit 40dbc04
Show file tree
Hide file tree
Showing 943 changed files with 60,399 additions and 43,591 deletions.
139 changes: 88 additions & 51 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,16 @@ on:
types: [ published ]
workflow_dispatch:
inputs:
docker_tag:
description: 'value to use for override the image tag; <tag> will still be used for checkout'
required: false
tag:
description: 'git tag'
description: 'git tag to checkout'
required: true
# default: ''
jobs:
build:
name: Test and build container image
name: build and test container image
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
Expand All @@ -39,24 +42,6 @@ jobs:
with:
ref: ${{ github.event.inputs.tag }}

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: avenga/couper
tags: |
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=semver,pattern={{major}}.{{minor}}
type=edge,event=branch
type=raw,enable=${{ github.event_name == 'workflow_dispatch' }},value=${{ github.event.inputs.tag }}
- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v1

Expand All @@ -68,48 +53,100 @@ jobs:
uses: docker/build-push-action@v2
with:
context: .
labels: ${{ steps.meta.outputs.labels }}
load: true
tags: 'couper-test-${{ github.ref }}'

- name: Test container serves index.html # run for edge and release images
- name: Test container serves index.html
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch' || (github.ref == 'refs/heads/master' && github.event_name == 'push')
run: |
docker run -d --rm -p 8080:8080 'couper-test-${{ github.ref }}'
[[ $(curl --head --location --connect-timeout 5 --write-out %{http_code} --silent --output /dev/null http://localhost:8080/) == 200 ]]
- name: Build and push docker image with edge tag
if: github.ref == 'refs/heads/master' && github.event_name == 'push' # due to release branch, pin to master
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
push: ${{ GitHub.event_name != 'pull_request' }}
publish:
needs: build
name: build and publish container image
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
matrix:
include:
- image: 'coupergateway/couper'
username_key: DOCKER_COUPER_GATEWAY_USERNAME
password_key: DOCKER_COUPER_GATEWAY_PASSWORD
- image: 'avenga/couper'
username_key: DOCKER_USERNAME
password_key: DOCKER_PASSWORD
steps:
- name: checkout
uses: actions/checkout@v2
if: github.event_name != 'workflow_dispatch'

- name: checkout given tag
uses: actions/checkout@v2
if: github.event_name == 'workflow_dispatch'
with:
ref: 'refs/tags/${{ github.event.inputs.tag }}'

- name: Docker meta
id: meta
uses: docker/metadata-action@v3
with:
images: |
${{ matrix.image }}
tags: |
type=semver,pattern={{major}}.{{minor}}.{{patch}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}.{{minor}}.{{patch}},value=${{ github.event.inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.docker_tag == '' }}
type=semver,pattern={{major}}.{{minor}},value=${{ github.event.inputs.tag }},enable=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.docker_tag == '' }}
type=edge,branch=master,event=branch,enable=${{ github.event_name != 'workflow_dispatch' }}
type=raw,enable=${{ github.event_name == 'workflow_dispatch' && github.event.inputs.docker_tag != '' }},value=${{ github.event.inputs.docker_tag }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v1

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
#registry: ...
username: ${{ secrets[matrix.username_key] }}
password: ${{ secrets[matrix.password_key] }}

- name: Build & push image with edge tag
if: github.ref == 'refs/heads/master' && github.event_name == 'push' # due to release branch, pin to master
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
push: ${{ GitHub.event_name != 'pull_request' }}

- name: Build & push image with specific tag
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
push: ${{ GitHub.event_name != 'pull_request' }}

- name: Docker Hub Description
if: github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.docker_tag == '')
uses: peter-evans/dockerhub-description@v2
with:
readme-filepath: './DOCKER.md'
username: ${{ secrets[matrix.username_key] }}
password: ${{ secrets[matrix.password_key] }}
repository: ${{ matrix.image }}

- name: Build and push docker image with specific tag
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
uses: docker/build-push-action@v2
with:
context: .
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
push: ${{ GitHub.event_name != 'pull_request' }}

- name: Docker Hub Description
if: github.event_name == 'release'
uses: peter-evans/dockerhub-description@v2
with:
readme-filepath: './DOCKER.md'
username: '${{ secrets.DOCKER_USERNAME }}'
password: '${{ secrets.DOCKER_PASSWORD }}'
repository: avenga/couper
oidc:
name: trigger couper-oidc-gateway edge build
needs:
- build
needs: publish
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
steps:
Expand Down
50 changes: 43 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,52 @@
# Couper Changelog

## [Unreleased](https://github.com/avenga/couper/compare/v1.11.0...master)
## [Unreleased](https://github.com/avenga/couper/compare/v1.12.0...master)

Unreleased changes are available as `avenga/couper:edge` container.

* **Added**
* [`can()` function](https://docs.couper.io/configuration/functions) ([#699](https://github.com/avenga/couper/pull/699))

* **Fixed**
* Erroneously sending an empty [`Server-Timing` header](https://docs.couper.io/configuration/command-line#oberservation-options) ([#700](https://github.com/avenga/couper/pull/700))

---

## [1.12.0](https://github.com/avenga/couper/releases/tag/v1.12.0)

* **Added**
* [`beta_job`](https://docs.couper.io/configuration/block/job) block to describe one or more job `definitions` for simple recurring http tasks ([#610](https://github.com/avenga/couper/pull/610))
* [`server_timing_header`](https://docs.couper.io/configuration/block/settings) setting, that allows Couper to include an additional `Server-Timing` HTTP response header field detailing connection and transport relevant metrics for each backend request. ([#657](https://github.com/avenga/couper/pull/657))

* **Changed**
* Use nested `jwt_signing_profile` block in [`oauth2` block](https://docs.couper.io/configuration/block/oauth2) for `grant_type` `"urn:ietf:params:oauth:grant-type:jwt-bearer"` in absence of `assertion` attribute ([#619](https://github.com/avenga/couper/pull/619))
* Improved the way an SPA `bootstrap_file` gets cached and served in combination with `bootstrap_data` ([#656](https://github.com/avenga/couper/pull/656))
* Harmonized and improved logged error information for references to undefined blocks ([#651](https://github.com/avenga/couper/pull/651))
* Unbeta permission features: ([#673](https://github.com/avenga/couper/pull/673))
* `beta_required_permission` attribute for [`api`](https://docs.couper.io/configuration/block/api#attribute-beta_required_permission) and [`endpoint`](https://docs.couper.io/configuration/block/endpoint#attribute-beta_required_permission) blocks,
* `beta_granted_permissions` and `beta_required_permission` [request context variables](https://docs.couper.io/configuration/variables#request),
* `beta_insufficient_permissions` [error type](https://docs.couper.io/configuration/error-handling/#api-error-types),
* `beta_permissions_claim`, `beta_permissions_map`, `beta_permissions_map_file`, `beta_roles_claim`, `beta_roles_map` and `beta_roles_map_file` attributes for [`jwt` block](https://docs.couper.io/configuration/block/jwt#attributes).

* **Fixed**
* Use of [backend-related variables](https://docs.couper.io/configuration/variables#backend) in [`custom_log_fields`](https://docs.couper.io/observation/logging#custom-logging) within a [`backend` block](https://docs.couper.io/configuration/block/backend) ([#658](https://github.com/avenga/couper/pull/658))
* Loop with evaluation error in [`custom_log_fields`](https://docs.couper.io/observation/logging#custom-logging) if log level is `"debug"` ([#659](https://github.com/avenga/couper/pull/659))
* Removed error message with `couper help` [command](https://docs.couper.io/configuration/command-line) ([#678](https://github.com/avenga/couper/pull/678))

## [1.11.2](https://github.com/avenga/couper/releases/tag/v1.11.2)

* **Fixed**
* Requests to wildcard (`**`) [endpoints](https://docs.couper.io/configuration/block/endpoint) using backends with a wildcard [`path` attribue](https://docs.couper.io/configuration/block/backend#attributes), where the wildcard matches the empty string (regression; since v1.11.0) ([#655](https://github.com/avenga/couper/pull/655))
* [internal alloc] stop creating request context based jwt, oauth2 and saml (hcl) functions without related definitions ([#666](https://github.com/avenga/couper/pull/666))
* [internal alloc] reduced allocation amount while proxying requests ([#666](https://github.com/avenga/couper/pull/666))
* Removing websockets related headers while the proxy `websockets` option is `false` (or no block definition exist) ([#666](https://github.com/avenga/couper/pull/666))

## [1.11.1](https://github.com/avenga/couper/releases/tag/v1.11.1)

* **Fixed**
* [Endpoint sequences](https://docs.couper.io/configuration/block/endpoint#endpoint-sequence) not being terminated by errors (e.g. `unexpected_status`) (regression; since v1.11.0) ([#648](https://github.com/avenga/couper/pull/648))
* [Health route](https://docs.couper.io/observation/health) affected by [access control](https://docs.couper.io/configuration/access-control) (regression; since v1.11.0) ([#654](https://github.com/avenga/couper/pull/654))

---

## [1.11.0](https://github.com/avenga/couper/releases/tag/v1.11.0)

Expand Down Expand Up @@ -47,7 +83,7 @@ Unreleased changes are available as `avenga/couper:edge` container.

Couper 1.10 is a feature release comprising new features for a more flexible and cleaner configuration. It also comes with some bug fixes and some smaller improvements. See below for a complete list of changes.

The new [`environment` block](https://docs.couper.io/configuration/block/environment) along with its corresponding [setting](https://docs.couper.io/configuration/block/settings) and the [`-e` command line option](https://docs.couper.io/configuration/command-line#global-options) allows for a cleaner and safer configuration if Couper is to be deployed in different environments. Read more about that feature in our [example](https://github.com/avenga/couper-examples/tree/master/environment).
The new [`environment` block](https://docs.couper.io/configuration/block/environment) along with its corresponding [setting](https://docs.couper.io/configuration/block/settings) and the [`-e` command line option](https://docs.couper.io/configuration/command-line#basic-options) allows for a cleaner and safer configuration if Couper is to be deployed in different environments. Read more about that feature in our [example](https://github.com/avenga/couper-examples/tree/master/environment).

Labeled, reusable [`proxy` blocks](https://docs.couper.io/configuration/block/proxy) provide means for a leaner and less repetitive configuration.

Expand All @@ -67,7 +103,7 @@ We have launched our [documentation website](https://docs.couper.io/) to find bl
* reusable [`proxy` block](https://docs.couper.io/configuration/block/proxy) ([#561](https://github.com/avenga/couper/pull/561))

* **Changed**
* Renamed `-debug` to `-pprof` and made debug port configurable via `-pprof-port`. Both [command line options](https://docs.couper.io/configuration/command-line#run-options) can also be specified via the respective [`settings`](https://docs.couper.io/configuration/block/settings). ([#577](https://github.com/avenga/couper/pull/577))
* Renamed `-debug` to `-pprof` and made debug port configurable via `-pprof-port`. Both [command line options](https://docs.couper.io/configuration/command-line#profiling-options) can also be specified via the respective [`settings`](https://docs.couper.io/configuration/block/settings). ([#577](https://github.com/avenga/couper/pull/577))

* **Fixed**
* [`form_body`, `headers` and `cookies`](https://docs.couper.io/configuration/block/request#attributes) can now be properly [custom-logged](https://docs.couper.io/observation/logging#custom-logging) ([#535](https://github.com/avenga/couper/pull/535))
Expand Down Expand Up @@ -132,7 +168,7 @@ We've also updated the completion suggestions and fixed a couple of syntax highl
issues.

* **Added**
* Couper now [reads and merges multiple configuration files](./docs/CLI.md#global-options) ([#437](https://github.com/avenga/couper/pull/437), [#515](https://github.com/avenga/couper/pull/515))
* Couper now [reads and merges multiple configuration files](https://docs.couper.io/configuration/multiple-files) ([#437](https://github.com/avenga/couper/pull/437), [#515](https://github.com/avenga/couper/pull/515))
* `beta_health`-block to `backend`-block to enable continuous health-checks for defined backends ([#313](https://github.com/avenga/couper/pull/313))
* `backends.<name>.health` variable to access the current health-check state _(subject to change)_
* Log malformed duration settings ([#487](https://github.com/avenga/couper/pull/487))
Expand Down Expand Up @@ -163,7 +199,7 @@ issues.
* Panic if an [`error_handler` block](./docs/REFERENCE.md#error-handler-block) following another `error_handler` block has no label ([#486](https://github.com/avenga/couper/pull/486))
* Spurious `duplicate endpoint /**` error for APIs sharing the same base path ([#507](https://github.com/avenga/couper/pull/507))
* Invalid (by [OpenAPI validation](./docs/REFERENCE.md#openapi-block)) backend response missing in [`backend_responses`](./docs/REFERENCE.md#backend_responses) ([#501](https://github.com/avenga/couper/pull/501))
* Ignore the `expected_status` check for a request configured via a [`proxy`](./docs/REFERENCE.md#proxy-block) or [`request`](./docs/REFERENCE.md#request-block) block if a [`backend` error](./docs/ERRORS.md#endpoint-error-types) occured ([#505](https://github.com/avenga/couper/pull/505))
* Ignore the `expected_status` check for a request configured via a [`proxy`](./docs/REFERENCE.md#proxy-block) or [`request`](./docs/REFERENCE.md#request-block) block if a [`backend` error](./docs/ERRORS.md#endpoint-error-types) occurred ([#505](https://github.com/avenga/couper/pull/505))
* `merge()` function removes key with `null` value. ([#518](https://github.com/avenga/couper/pull/518))

* **Removed**
Expand Down Expand Up @@ -335,7 +371,7 @@ If your applications are running in multiple setups, like testing and production
* [`https-dev-proxy` option](./docs/REFERENCE.md#settings-block) creates a TLS server listing on the given TLS port. Requests are forwarded to the given `server` port. The certificate is generated on-the-fly. This function is intended for local development setups to support browser features requiring HTTPS connections, such as secure cookies. ([#281](https://github.com/avenga/couper/pull/281))
* [`websockets`](docs/REFERENCE.md#websockets-block) option in `proxy` block enables transparent websocket support when proxying to upstream backends ([#198](https://github.com/avenga/couper/issues/198))
* Client request [variables](./docs/REFERENCE.md#request) `request.url`, `request.origin`, `request.protocol`, `request.host` and `request.port` ([#255](https://github.com/avenga/couper/pull/255))
* [Run option](./docs/CLI.md#run-options) `-accept-forwarded-url` and [setting](./docs/REFERENCE.md#settings-block) `accept_forwarded_url` to accept `proto`, `host`, or `port` from `X-Forwarded-Proto`, `X-Forwarded-Host` or `X-Forwarded-Port` request headers ([#255](https://github.com/avenga/couper/pull/255))
* [Command-line option](https://docs.couper.io/configuration/command-line#surrounding-architecture-options) `-accept-forwarded-url` and [setting](https://docs.couper.io/configuration/block/settings) `accept_forwarded_url` to accept `proto`, `host`, or `port` from `X-Forwarded-Proto`, `X-Forwarded-Host` or `X-Forwarded-Port` request headers ([#255](https://github.com/avenga/couper/pull/255))
* Couper sends its request ID as `Couper-Request-Id` HTTP header in backend requests and client responses. This can be configured with the `request_id_backend_header` and `request_id_client_header` [settings](./docs/REFERENCE.md#settings-block) ([#268](https://github.com/avenga/couper/pull/268))
* [`request_id_accept_from_header` setting](./docs/REFERENCE.md#settings-block) configures Couper to use a downstream request ID instead of generating its own in order to help correlating log events across services ([#268](https://github.com/avenga/couper/pull/268))
* [`couper.version` variable](docs/REFERENCE.md#couper) ([#274](https://github.com/avenga/couper/pull/274))
Expand Down
Loading

0 comments on commit 40dbc04

Please sign in to comment.