flexway
FRENTalk to an expert

Enrich a flow without touching the upstream

Reshape a flow without touching the service.

A named, conditional policy attached to a host or an operation adds a header, masks a field, caches a response or consults a decision service. The service behind does not change.

The path

  1. NameA policy declared once, reused
  2. ConditionA CEL condition, compiled at load: false, the policy is skipped
  3. AttachTo the gateway, a host, a route or an operation
  4. SimulateThe chain checked as a dry run before serving

An invalid condition or a rewritten protected element is refused at load: the error shows before production. At run time, a false condition skips the policy; a decision service that answers deny gives a 403.

Open this template in the editor

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

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 Cache-Control, ETag and Vary honouredDelivered · v1.1.0
Public response cache, per operationDelivered · v1.1.0
External call: timeout budget and declared failure behaviourDelivered · v1.1.0
Dry-run simulation of a policy chainDelivered · v0.1.0

Going further

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.