v1.9.0
1.9.0
Couper 1.9 is a feature release bringing more comfort and enhanced stability to the Couper configuration. It also improves the permission handling and provides a couple of bug fixes. For a complete list of changes see below.
As of release 1.9 it is possible to split a Couper configuration into multiple .hcl
-files. You can now, for example, use different configuration files for your api
, files
and definitions
blocks, or keep your development, testing and production setups separated. All the configuration files given at startup will be merged together.
The new block beta_health
(beta) allows you to configure recurring health check requests for a backend. By default, Couper won't request backends considered unhealthy which might help them recover due to the reduced amount of requests. The current health state of a backend can be accessed by variable. Changes in healthiness will be logged and exported as metrics.
To make permission handling easier to grasp we've dropped the term scope
and accordingly changed the names of the beta_scope
, beta_scope_claim
and beta_scope_map
attributes to beta_required_permission
, beta_permissions_claim
and beta_permissions_map
, respectively. Furthermore, beta_required_permission
(formerly beta_scope
) can now be an HCL expression. If beta_required_permission
is specified in both an endpoint
and its parent api
block, the former overrides the latter. Our permission handling examples illustrate some common use cases: basic example, roles example, map example
Along with this release goes the latest extension for VSCode which now indicates misplaced blocks and attributes, missing block labels and so on. We've also updated the completion suggestions and fixed a couple of syntax highlighting issues.
-
Added
- Couper now reads and merges multiple configuration files (#437, #515)
beta_health
-block tobackend
-block to enable continuous health-checks for defined backends (#313)backends.<name>.health
variable to access the current health-check state (subject to change)
- Log malformed duration settings (#487)
url
attribute could make use of our wildcard pattern/**
and relative urls in combination with a backend reference (#480)jwks_max_stale
injwt
block (#502)jwks_ttl
,jwks_max_stale
andconfiguration_max_stale
inoidc
block (#502)- Error handling for
backend
,backend_openapi_validation
andbackend_timeout
error types (#490) response.bytes
log-field to backend logs if read from body, fallback is theContent-Length
header (#494)- Error types
endpoint
andaccess_control
(#500)
-
Changed
- Permission handling: (#477, #504)
- renamed
beta_scope
attribute forapi
andendpoint
blocks tobeta_required_permission
;beta_required_permission
inendpoint
now overridingbeta_required_permission
in containingapi
block; allowing an expression as attribute value - renamed
beta_scope_claim
andbeta_scope_map
attributes forjwt
block tobeta_permissions_claim
andbeta_permissions_map
- removed
beta_operation_denied
andbeta_scope
error types - renamed
beta_insufficient_scope
error type tobeta_insufficient_permissions
- added
request.context.beta_required_permission
andrequest.context.beta_granted_permissions
request variables
- renamed
- Clarified the type of various attributes/variables (#485)
spa
block can be defined multiple times now (#510)files
block can be defined multiple times now (#513)
- Permission handling: (#477, #504)
-
Fixed
- Keys in object type attribute values are only handled case-insensitively if reasonable (e.g. they represent HTTP methods or header field values) (#461)
- Multiple labels for
error_handler
blocks (#462) error_handler
blocks for an error type defined in bothendpoint
andapi
(#469)- Request methods are treated case-insensitively when comparing them to methods in the
allowed_methods
attribute ofapi
orendpoint
blocks (#478) - Do not allow multiple
backend
blocks inproxy
andrequest
blocks (#483) - Panic if an
error_handler
block following anothererror_handler
block has no label (#486) - Spurious
duplicate endpoint /**
error for APIs sharing the same base path (#507) - Invalid (by OpenAPI validation) backend response missing in
backend_responses
(#501) - Ignore the
expected_status
check for a request configured via aproxy
orrequest
block if abackend
error occured (#505) merge()
function removes key withnull
value. (#518)
-
Removed
- support for
beta_oidc
block (useoidc
block instead) (#475) - support for
beta_oauth_authorization_url
andbeta_oauth_verifier
functions (useoauth2_authorization_url
andoauth2_verifier
functions instead) (#475) path
attribute fromendpoint
(andproxy
) block; usepath
attribute inbackend
block instead (#516)
- support for