Problem 1
Every client wants a different shape
The upstream returns too many fields, or fields some clients must not see.
Flexway's answer: Projection and masking declared in the contract; schema conformance checked.
Transformations
Headers, path, parameters, body and status codes transformed declaratively, responses cached, a decision delegated to a service: each policy attaches at the right level and is simulated before it applies.
14 of the 16 shown delivered · since v0.1.0
What you expect from this domain


Problem 1
The upstream returns too many fields, or fields some clients must not see.
Flexway's answer: Projection and masking declared in the contract; schema conformance checked.
Problem 2
The same read goes back upstream on every request.
Flexway's answer: Response cache opt-in per operation, isolated per tenant and subject, tested continuously.
Problem 3
An authorisation depends on a risk or eligibility service.
Flexway's answer: External call with a timeout budget and a declared failure behaviour.
Every step is a decision readable in the trace and in the console.
Transformations - Domain diagram: who calls, the decision steps, what is called, and where a request is refused.
decision service: 403 (deny)
The applications that call your APIs: each request goes through Flexway, which checks the contract and the identity before reaching your systems.
Routes through here
The partner companies that consume your APIs: identified by a client certificate or an API key, under a quota per tenant.
Routes through here
Flexway reshapes the request: headers, path and parameters, without touching your service.
Routes through here
A CEL condition, compiled at load time, decides whether a policy applies; false, the policy is skipped.
Routes through here
Flexway asks your decision service under a bounded deadline; if it refuses (deny), the caller gets 403.
Routes through here
A read already in cache is served if the contract allows it, isolated per tenant and per subject.
Routes through here
Flexway reshapes the response: field projection, masking of sensitive data, status code.
Routes through here
The policy chain can be checked dry: route, effective chain and verdict, without calling the upstream.
Routes through here
Your REST and gRPC services: they receive only the requests Flexway let through, under deadline and circuit breaker.
Routes through here
Your decision service, called by a policy under a bounded deadline; its answer can refuse the request.
The essentials of each topic, with its status in the published release; unfold a card for the full text.
Headers, path and query parameters are set, removed or rewritten by declaration, with nothing to program.
Request and response headers are set, removed, renamed or derived; the path is rewritten, query parameters added or removed. Everything is declared, nothing is programmed.
A response is projected onto a closed list of fields, its sensitive fields are masked and upstream codes are mapped for clients.
A response can be projected onto a closed list of fields, and conformance to the contract's schema is checked. Sensitive fields are masked before leaving the gateway. An upstream status code is mapped to a semantic code for clients.
The cache, opt-in per operation, honours Cache-Control, ETag and Vary, and never shares an authenticated response between two callers.
The cache honours the upstream's Cache-Control, ETag and Vary. It is opt-in per operation: a public response is shared, an authenticated response is cached under the tenant and subject key, never shared between two callers.
Isolation between tenants is tested continuously: it is a prerequisite of any authenticated caching.
A decision of your system is delegated through a declared external call, with a timeout budget and a failure behaviour chosen in advance.
A decision that belongs to your system - risk, eligibility, business rights - is delegated through a declared external call, with a timeout budget and a failure behaviour chosen in advance: refuse or let through, never at random.
Policies attach at four levels, their CEL conditions are compiled at load time and a chain is simulated as a dry run without calling the upstream.
Policies attach at four levels, from the whole gateway to the operation, the most precise winning. Their CEL conditions are compiled at load time: an invalid condition is refused before serving; at run time, a false condition skips the policy. A chain is simulated as a dry run, without calling the upstream.
Protected elements cannot be rewritten, and a configuration that tries is refused at start. JSON, XML and SOAP decoders are coming.
The transformations example, as it ships with Flexway v1.6.3.
# Enriching a flow without touching the upstream: named policies, a CEL condition, composed
# global -> host -> routes -> operation, the most precise wins, `!name` removes.
version: 1
contracts:
openapi: ./openapi.yaml
upstreams:
default:
url: http://orders.internal:8080
auth:
issuers:
- name: customers
discovery: https://login.example.net/.well-known/openid-configuration
audience: api
policies:
definitions:
plan-header:
type: header-inject
when: "has(auth.subject)" # CEL: authenticated callers only
config:
set: { x-plan: "{{ auth.claims.plan }}", x-operation: "{{ route.operation_id }}" }
on_missing: skip # skip | empty | fail - required for an expression
strip-server:
type: header-remove
phase: response # on what the upstream answers
config: { names: [server, x-powered-by] }
v2-path:
type: rewrite-path # the upstream's path, never the served one
config: { to: "/v2/orders/{id}" }
channel:
type: query-inject
config: { set: { channel: gateway } }
chains:
global: [strip-server]
routes:
"/orders/*": [v2-path, channel] # * one segment, ** any number# Responses kept by the gateway (1.2.0): opt-in, per operation in the contract
# (x-flexway-cache) or by a cache policy over routes - the operation's own wins. Public by default: an
# identified caller is never served from, nor stored into, a public entry; per tenant and subject only
# when the operation declares it. The upstream's Cache-Control only shortens the ttl; no-store,
# private, Set-Cookie and streams are never kept.
version: 1
contracts:
openapi: ./openapi.yaml
upstreams:
default:
url: http://catalog.internal:8080
server:
cache:
max_bytes: 64MiB # per replica; past it, the least recently used goes
max_entry_bytes: 512KiB # a larger response is relayed, never kept
auth:
issuers:
- name: customers
discovery: https://login.example.com/.well-known/openid-configuration
audience: api
tenant_claim: org # a cache per subject keys by tenant and subject
policies:
definitions:
catalog-cache:
type: cache
config: { ttl: 5m } # public, always: a policy never caches per subject
chains:
routes:
"/products/**": [catalog-cache] # the reads under it; the writes are left aloneWhat is delivered in the published release v1.6.3, and what is coming; a feature is never shown as delivered before its release.
| Feature | Status |
|---|---|
| Request and response headers: set, remove, rename, derive | Delivered · v0.1.0 |
| Path rewrite and query parameters | Delivered · v0.1.0 |
| Body field projection and filtering, schema conformance checked | Delivered · v1.1.0 |
| Masking of sensitive fields in responses | Delivered · v1.1.0 |
| Upstream status code mapped to a semantic code | Delivered · v1.1.0 |
| Protected elements cannot be written, refused at start | Delivered · v0.1.0 |
| Upstream Cache-Control, ETag and Vary honoured | Delivered · v1.1.0 |
| Public response cache, per operation | Delivered · v1.1.0 |
| Authenticated cache, isolated per tenant and subject | Delivered · v1.1.0 |
| CEL conditions compiled at load time | Delivered · v0.1.0 |
| External call: timeout budget and declared failure behaviour | Delivered · v1.1.0 |
| Dry-run simulation of a policy chain | Delivered · v0.1.0 |
| JSON decoding and encoding | Planned |
| XML, YAML, form decoders | Planned |
| Screen to simulate a policy chain | Delivered · v1.2.0 |
| Effective policy chain per route | Delivered · v0.1.0 |
Flexwiz is a young company: you talk directly with the person who founds it. Tell us what you want to run through Flexway. We talk about your infrastructure and your digital sovereignty requirements.
Online booking is coming soon; until then, an e-mail is enough.