flexway
FRENTalk to an expert

Transformations

Reshape a flow without touching the upstream.

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

  • BFF: adapt and aggregate several microservicesBody projection built; aggregation needs a trade-off decision; per-screen composition stays with the customer's BFFPartly · next in 1.10
  • Conformance of FHIR resources to their profilesValidation against the contract's JSON schema only; FHIR profiles: candidateTo be scheduled
Every market expectation
A policy stepA policy step
An open policy step: its CEL condition, its configuration, its deadline budget and the declared failure behaviour.Real console capture, demo data · v1.6.3

What it solves

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.

Problem 2

A costly upstream is called for nothing

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

A business rule lives elsewhere

An authorisation depends on a risk or eligibility service.

Flexway's answer: External call with a timeout budget and a declared failure behaviour.

How it works

Every step is a decision readable in the trace and in the console.

Your infrastructureflexwayAPI, AI and agent gatewayUnified Decision Chain (UDC)403decision service: 403 (deny)01 Request02 Condition03 External call04 Cache05 Response06 SimulationApplicationsPartnersServicesDecision service (called by a policy)Your infrastructureflexwayAPI, AI and agent gatewayUnified Decision Chain (UDC)40301 Requestheaders, path, parameters02 ConditionCEL compiled at load: true, the policy applies; false, it is skipped03 External calldecision service, bounded timeout; deny: 40304 Cacheread served when allowed05 Responseprojection, masking, status06 Simulationchain checked as a dry runApplicationsPartnersServicesDecision service (called by a policy)

Transformations - Domain diagram: who calls, the decision steps, what is called, and where a request is refused.

  • Applications
  • Partners
  1. Request
  2. Condition
  3. External call
  4. Cache
  5. Response
  6. Simulation
  • Services
  • Decision service (called by a policy)

decision service: 403 (deny)

Applications
The applications that call your APIs: each request goes through Flexway, which checks the contract and the identity before reaching your systems.
Partners
The partner companies that consume your APIs: identified by a client certificate or an API key, under a quota per tenant.
Request
Flexway reshapes the request: headers, path and parameters, without touching your service.
Condition
A CEL condition, compiled at load time, decides whether a policy applies; false, the policy is skipped.
External call
Flexway asks your decision service under a bounded deadline; if it refuses (deny), the caller gets 403.
Cache
A read already in cache is served if the contract allows it, isolated per tenant and per subject.
Response
Flexway reshapes the response: field projection, masking of sensitive data, status code.
Simulation
The policy chain can be checked dry: route, effective chain and verdict, without calling the upstream.
Services
Your REST and gRPC services: they receive only the requests Flexway let through, under deadline and circuit breaker.
Decision service (called by a policy)
Your decision service, called by a policy under a bounded deadline; its answer can refuse the request.
  • Line: one route
  • Interchange: shared decision
  • Request
  • Refusal
  • Your infrastructure
  1. Requestheaders, path, parameters
  2. ConditionCEL compiled at load: true, the policy applies; false, it is skipped
  3. External calldecision service, bounded timeout; deny: 403
  4. Cacheread served when allowed
  5. Responseprojection, masking, status
  6. Simulationchain checked as a dry run

In detail

The essentials of each topic, with its status in the published release; unfold a card for the full text.

Headers, path and parameters

Delivered · v0.1.0

Headers, path and query parameters are set, removed or rewritten by declaration, with nothing to program.

  • Set, remove, rename, derive
  • Path rewrite
  • Query parameters
See the detailHide the detail - Headers, path and parameters

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.

All the points

  • Set, remove, rename, derive
  • Path rewrite
  • Query parameters

Features and status

  • Request and response headers: set, remove, rename, deriveDelivered · v0.1.0
  • Path rewrite and query parametersDelivered · v0.1.0
Read in the documentation : Enriching a flow

Body and status codes

Delivered · v1.1.0

A response is projected onto a closed list of fields, its sensitive fields are masked and upstream codes are mapped for clients.

  • Projection onto a closed list of fields
  • Sensitive fields masked
  • Status codes mapped
See the detailHide the detail - Body and status codes

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.

All the points

  • Projection onto a closed list of fields
  • Sensitive fields masked
  • Status codes mapped

Features and status

  • Body field projection and filtering, schema conformance checkedDelivered · v1.1.0
  • Masking of sensitive fields in responsesDelivered · v1.1.0
  • Upstream status code mapped to a semantic codeDelivered · v1.1.0
Read in the documentation : Reshaping a response

Response cache

Delivered · v1.1.0

The cache, opt-in per operation, honours Cache-Control, ETag and Vary, and never shares an authenticated response between two callers.

  • Opt-in per operation
  • Tenant and subject key
  • Isolation tested continuously
See the detailHide the detail - Response cache

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.

All the points

  • Opt-in per operation
  • Tenant and subject key
  • Isolation tested continuously

Features and status

  • Upstream Cache-Control, ETag and Vary honouredDelivered · v1.1.0
  • Public response cache, per operationDelivered · v1.1.0
  • Authenticated cache, isolated per tenant and subjectDelivered · v1.1.0
Read in the documentation : Caching a read

Delegate a decision to a service

Delivered · v1.1.0

A decision of your system is delegated through a declared external call, with a timeout budget and a failure behaviour chosen in advance.

  • Timeout budget
  • Declared failure behaviour
See the detailHide the detail - Delegate a decision to a service

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.

All the points

  • Timeout budget
  • Declared failure behaviour

Features and status

  • External call: timeout budget and declared failure behaviourDelivered · v1.1.0
Read in the documentation : Delegating a decision to a service

Policies, conditions and simulation

In part

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.

  • Four attachment levels
  • Compiled CEL conditions
  • Dry-run simulation
See the detailHide the detail - Policies, conditions and simulation

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.

All the points

  • Four attachment levels
  • Compiled CEL conditions
  • Dry-run simulation
  • XML and SOAP decoders: coming

Features and status

  • CEL conditions compiled at load timeDelivered · v0.1.0
  • Dry-run simulation of a policy chainDelivered · v0.1.0
  • Protected elements cannot be written, refused at startDelivered · v0.1.0
  • XML, YAML, form decodersPlanned
Read in the documentation : Policies

Configuration

The transformations example, as it ships with Flexway v1.6.3.

examples/transformations/flexway.yaml
# 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
examples/response-cache/flexway.yaml
# 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 alone

Features

What is delivered in the published release v1.6.3, and what is coming; a feature is never shown as delivered before its release.

FeatureStatus
Request and response headers: set, remove, rename, deriveDelivered · v0.1.0
Path rewrite and query parametersDelivered · v0.1.0
Body field projection and filtering, schema conformance checkedDelivered · v1.1.0
Masking of sensitive fields in responsesDelivered · v1.1.0
Upstream status code mapped to a semantic codeDelivered · v1.1.0
Protected elements cannot be written, refused at startDelivered · v0.1.0
Upstream Cache-Control, ETag and Vary honouredDelivered · v1.1.0
Public response cache, per operationDelivered · v1.1.0
Authenticated cache, isolated per tenant and subjectDelivered · v1.1.0
CEL conditions compiled at load timeDelivered · v0.1.0
External call: timeout budget and declared failure behaviourDelivered · v1.1.0
Dry-run simulation of a policy chainDelivered · v0.1.0
JSON decoding and encodingPlanned
XML, YAML, form decodersPlanned
Screen to simulate a policy chainDelivered · v1.2.0
Effective policy chain per routeDelivered · v0.1.0

Every feature

The other domains

Let's talk about your gateway

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.