Sipar Gateway

Every feature of the gateway, set beside what open source already provides.

Sipar Gateway is built on Envoy Gateway and the Kubernetes Gateway API, used unmodified. Much of what it does is open source, and this page says so. For each feature it states what the open-source projects provide, what Sipar adds, where in a request it acts, what happens if it fails, and when the open-source feature is enough.

SIPAR Added by Sipar OPEN SOURCE Provided by the open-source projects
SIPAR Added by Sipar Available (with the Bahriya Kubernetes Engine from 2.7.0 onwards, and on other Kubernetes distributions through Bahriya Tersane) APPROVED (an approved design, not yet available)

Getting traffic to applications

Routing

Web traffic to an application SIPAR

Sends HTTP and HTTPS requests for a hostname to the right service in the cluster.

Open source

The Gateway API and Envoy Gateway route HTTP and HTTPS. The operator writes the listeners, the route, the redirect from HTTP to HTTPS and any policy by hand.

Sipar

One short set of values produces an application’s whole entry: an HTTPS listener per hostname in the team’s own namespace, the route, the redirect from HTTP to HTTPS, redirects from www to another hostname, and timeouts.

Where it acts
At the listener and the route, before every other step.
If it fails
A request for a hostname that no listener names is refused during the TLS handshake.
Limits
Up to 32 hostnames in one release, or 64 with the redirect from HTTP turned off. Timeouts are fixed at 60 seconds. No limit on request size is set.
When to use it
For every web application. The open-source resources remain available for anything the values do not cover.

Encrypted traffic passed through by hostname SIPAR

Serves many TLS services, such as databases with TLS, on one shared port, still encrypted from client to service.

Open source

The Gateway API’s TLS routes, served by Envoy Gateway, route by the hostname the client asks for.

Sipar

A simple way to publish each service on the shared port, and an address list for each hostname on that port.

Where it acts
At connection, before any data reaches the service.
If it fails
A hostname with no route receives no answer.
Limits
Up to 64 routes in one release, on ports the platform has opened.
When to use it
For databases and other TLS services that must stay encrypted to the service itself.

Plain TCP services SIPAR

Publishes a TCP service on its own port.

Open source

The Gateway API’s TCP routes, served by Envoy Gateway.

Sipar

One listener per port, each to one service, with an optional address list.

Where it acts
At connection.
If it fails
A connection refused by its address list is closed before the service is contacted.
Limits
Up to 64 listeners in one release, on ports the platform has opened.
When to use it
For TCP services that do not use TLS.

Encryption to the application SIPAR

Encrypts the connection from the gateway to an application that serves HTTPS itself.

Open source

Envoy Gateway can encrypt to a backend, configured by the operator.

Sipar

One setting per application, and an admission rule that lets a backend point only at a service in the cluster, never at an arbitrary address.

Where it acts
Between the gateway and the application.
If it fails
The request fails if the application does not answer over TLS.
Limits
The application’s certificate is not verified.
When to use it
When the application must receive HTTPS.

gRPC and UDP OPEN SOURCE

Routes gRPC services and UDP traffic.

Open source

The Gateway API’s gRPC and UDP routes, served by Envoy Gateway. Sipar allows teams to create them in their own namespaces.

Sipar

Nothing further. The team writes these routes itself.

Where it acts
At the listener and the route.
If it fails
As Envoy Gateway.
Limits
As Envoy Gateway.
When to use it
For gRPC and UDP services.

Encryption

TLS and certificates

TLS at the gateway SIPAR

Decrypts each connection at the gateway with the hostname’s certificate.

Open source

Envoy Gateway terminates TLS. Certificates are issued and renewed by cert-manager, a separate open-source project.

Sipar

Each hostname’s certificate is attached to its own listener from the application’s values. On BKE, certificates are issued for each route through cert-manager.

Where it acts
At the start of every HTTPS request.
If it fails
A hostname without a certificate cannot be served over TLS.
Limits
Automatic certificates on BKE come with BKE 2.7.0 onwards.
When to use it
For every public hostname.

Who may reach a service

Access control

Address lists for web traffic SIPAR

Allows or refuses requests by the client’s address, for a route or for one path.

Open source

Envoy Gateway can authorise by client address, configured by the operator.

Sipar

An allow list or a refuse list per route and per path, where the longest matching path wins. Address lists run before the firewall and the cache.

Where it acts
Before the firewall and the cache.
If it fails
A refused request receives 403.
Limits
Either an allow list or a refuse list on a route, not both. Behind a load balancer, the PROXY protocol is needed to see the client’s address.
When to use it
For administration pages, partner-only paths and internal tools.

Address lists for TCP and TLS services SIPAR

Allows or refuses connections by the client’s address, including for each hostname on a shared TLS port.

Open source

Envoy Gateway can apply address rules to a TCP route. It cannot apply them to a route passed through by hostname.

Sipar

Lists for each hostname on a shared TLS port, where a refusal always wins and several lists on one listener all apply. A refused client is closed before the TLS handshake, and the service is never contacted. A change took about one second to reach both replicas on a two-replica test cluster.

Where it acts
At connection, before the TLS handshake.
If it fails
Fails closed: an invalid list closes its own listener only. If the component is unavailable, the last configuration stays in force. Five alarms cover these cases.
Limits
Two replicas, replaced one at a time.
When to use it
For databases and other services that only known networks may reach.

Basic authentication SIPAR

Asks for a user name and password before a route or path is served.

Open source

Envoy Gateway checks basic authentication against a password file the operator writes.

Sipar

Users per route or per path. The authenticated user is passed to the application in a header that a client cannot forge, and the credentials are removed before the request reaches the application. A plain password is refused in the configuration.

Where it acts
Before the firewall and the cache.
If it fails
A request without valid credentials receives 401.
Limits
Passwords are stored as unsalted SHA-1 digests, the form Envoy Gateway accepts. This is not strong password storage.
When to use it
For simple protection of staging sites and internal tools. Use an identity provider for customer sign-in.

Protecting capacity

Rate limits

Rate limits per route SIPAR

Limits how many requests each client may make to a route, per second, minute or hour.

Open source

Envoy Gateway applies global rate limits through Envoy’s open-source rate-limit service, with counts kept in a store the operator provides.

Sipar

Limits per route and per path in any combination of second, minute and hour, counted per client address, or per user with basic authentication. One count across every gateway replica. Where the cluster enforces network policies, as BKE does, the rate-limit service is reachable only from the gateway and the cache.

Where it acts
After the cache. Each cached route chooses whether cached answers count against the limit.
If it fails
Fails open: while the counting store or service is unavailable, requests pass without a limit.
Limits
A new limit is in force within about 15 seconds. A limited client receives 429.
When to use it
To protect an application from more traffic than it can serve. For limits tied to security rules, such as login attempts from one address, use the firewall.

An alarm when rate limits are not applied SIPAR

Raises an alarm when limits are not being applied, for example while the counting store or service is unavailable.

Open source

No equivalent.

Sipar

An alarm for clusters with the Prometheus Operator, and through Netdata on BKE.

Where it acts
On the cluster.
If it fails
Not applicable.
Limits
Requests still pass without a limit while the alarm is raised.
When to use it
Always, where rate limits are used.

Answering without the application

Response cache

Shared response cache SIPAR

Stores responses and serves them again without reaching the application.

Open source

Envoy Gateway has no shared response cache.

Sipar

Caching per route, with entries kept apart for each route so two applications never share one. A store of Memcached or Valkey that every gateway replica uses. Each route chooses whether cached answers count against its rate limit.

Where it acts
After the firewall and before the rate limit.
If it fails
Fails open: if the cache or its store is unavailable, or a lookup takes longer than 150 milliseconds, the request goes to the application uncached. An alarm is raised when no cache replica is available.
Limits
Two replicas on separate nodes, replaced one at a time, so the cluster needs at least two schedulable nodes. The cache never delays or changes a response.
When to use it
For responses that many clients request and that change rarely.

Each application’s own cache store SIPAR

Lets each application use its own Memcached store, sized separately.

Open source

No equivalent.

Sipar

A store in the application’s own namespace, which no setting can point at another namespace. Entries of up to 128 MB, with a limit per route and per store. A store that is down affects only its own routes. Four alarms cover the cache.

Where it acts
As the shared cache.
If it fails
Fails open for that application’s routes only. Over the memory budget, a response is served uncached, never refused.
Limits
Up to 500 open stores per cache replica. A 128 MB entry takes up to about 15 seconds to store, after the response has been sent.
When to use it
When applications need cache sizes and costs kept apart.

Tracing and evidence

Request identifiers and logs

A request identifier on every response SIPAR

Gives each request an identifier that appears on the response and in the log.

Open source

Envoy generates a request identifier by default. Returning it on responses is configured by the operator.

Sipar

One setting for the whole gateway. By default a new identifier replaces any value the client sent. It is returned on every response, including the gateway’s own refusals and cached answers.

Where it acts
On every request and response.
If it fails
Not applicable.
Limits
It must be the gateway’s only client traffic policy, because Envoy Gateway does not merge two.
When to use it
Always: it lets a customer’s report be traced to the service that answered.

One structured log line per request SIPAR

Writes one log line in a documented JSON format for every request.

Open source

Envoy Gateway writes access logs in a format the operator chooses.

Sipar

A documented format with the request identifier, route, response time and cache result. No Authorization, Cookie or proxy credential header is ever logged, and query strings are not logged.

Where it acts
After the response.
If it fails
Not applicable.
Limits
Replacing the gateway’s telemetry settings removes this format.
When to use it
Always.

The client’s real address behind a load balancer SIPAR

Reads the client’s address from the PROXY protocol header a load balancer adds.

Open source

Envoy Gateway supports the PROXY protocol, configured by the operator.

Sipar

One switch for the whole gateway, with the safety notes documented.

Where it acts
At connection.
If it fails
With it on, a connection without the header is refused, health checks included.
Limits
Off by default.
When to use it
When a load balancer in front of the cluster hides client addresses.

Running it safely

Operation

Separation between teams SIPAR

Lets many teams share one gateway without affecting each other.

Open source

The Gateway API lets a gateway admit listeners from other namespaces.

Sipar

Each application’s listeners live in its own namespace. Teams may create routes but not gateways or gateway policies. Cache and TCP access policies act only on their own namespace. One team’s invalid route or policy affects only that team.

Where it acts
In the control plane.
If it fails
An invalid resource is refused or reported for its own namespace only.
Limits
Admitting a namespace does not give it ownership of a hostname.
When to use it
On every shared cluster.

Checks at installation and on every change SIPAR

Refuses an installation or a setting that would not work or would be unsafe.

Open source

Envoy Gateway’s own chart does not make these checks.

Sipar

The installation is refused without the required Gateway API and Envoy Gateway resources. Unsafe settings are refused when the chart is rendered. Admission rules refuse a backend that points at an arbitrary address, and refuse if they cannot be evaluated.

Where it acts
At installation and when a resource is applied.
If it fails
Fails closed.
Limits
Some mistakes can be found only when the gateway loads them. These are reported on the resource, and the working configuration stays in force.
When to use it
Always.

Regular expression guard SIPAR

Refuses route regular expressions outside the allowed form on a shared gateway.

Open source

Envoy Gateway accepts them. An expression the proxy cannot use stops new routes on that gateway from being served.

Sipar

Such a route is refused when it is written, with a message giving the reason. The character-prefix form that sipar-route writes is always allowed.

Where it acts
When a route is applied.
If it fails
A refused route is not created, and the routes already in force are unaffected.
Limits
A cluster administrator may widen the allowed form.
When to use it
Always, on a shared gateway.

Hardened containers, with a test SIPAR

Runs every component with the least privilege it needs, and checks it.

Open source

Envoy Gateway’s defaults.

Sipar

Every Sipar container, the controller and the rate-limit service run as non-root, with no added privileges and a read-only filesystem. A built-in test checks every running component and the access rules.

Where it acts
On the cluster.
If it fails
The test reports any component that does not meet the rule.
Limits
Envoy’s own proxy containers need a writable filesystem by design. The test allows only those.
When to use it
Always.

High availability SIPAR

Keeps traffic flowing through node failures and maintenance.

Open source

Envoy Gateway’s chart defaults.

Sipar

Two gateway proxies, on separate nodes where the cluster has them. Two cache replicas, always on separate nodes. Each is replaced one at a time, and maintenance waits for a replacement.

Where it acts
On the cluster.
If it fails
The loss of one node does not stop traffic where the cluster has more than one.
Limits
On a single-node cluster, the proxies share the node.
When to use it
Always.

Metrics and alarms SIPAR

Reports the health of every Sipar component.

Open source

Envoy’s and Envoy Gateway’s own metrics.

Sipar

Metrics from each Sipar component, and alarms for clusters with the Prometheus Operator. On BKE, alarms are delivered through Netdata.

Where it acts
On the cluster.
If it fails
Not applicable.
Limits
The alarm for rate limits not being applied is listed under Rate limits.
When to use it
Always.

Supply SIPAR

Ensures every image the gateway runs is a known, pinned copy.

Open source

Upstream images from public registries.

Sipar

Every image, including Envoy Gateway’s, is a copy pinned by digest in Mamluk’s registry, pulled with the licence’s credentials. Known vulnerabilities in the rate-limit service are listed with their exposure.

Where it acts
At installation.
If it fails
Not applicable.
Limits
Sipar’s own images are private.
When to use it
Always.

Security rules

Web application firewall

Sipar Firewall SIPAR APPROVED

Checks every request against security rules before it reaches the cache or the application.

Open source

No equivalent in Envoy Gateway.

Sipar

Subashi Pro’s rules at the gateway, with country and network blocking from local data. Described on its own page. The firewall in detail

Where it acts
After access control, before the cache.
If it fails
Routes keep serving by default if the firewall is unavailable, with an alarm.
Limits
Included with every BKE licence.
When to use it
See the firewall page.

Open source as it is

What Sipar does not add

These are available from Envoy Gateway’s own policies, written by the operator.

  • Authentication with JSON Web Tokens, OpenID Connect or API keys.
  • Request-size limits, retries, circuit breaking and cross-origin resource sharing.
  • Helpers for gRPC and UDP routes beyond what the Gateway API itself provides.

Licensing and support

Included with every BKE licence.

On the Bahriya Kubernetes Engine

From 2.7.0 onwards, included with every licence at no extra price, and installed and upgraded with the cluster.

On other Kubernetes distributions

Part of the Bahriya Tersane licence, installed from the Tersane catalogue, with ticketed support from within the GCC.

Sipar is a product of Mamluk. Envoy, Istio and cert-manager are projects of the Cloud Native Computing Foundation. OWASP is a trademark of the OWASP Foundation, which does not endorse Sipar.

Sipar, pronounced si-par, is the Persian word for a shield.