yeke.io · docs

yeke-proxy

Open the web UI of a Service inside the cluster in a new tab under YEKE's own address, without a port-forward.

What it does

The browser counterpart of a port-forward.

yeke-proxy opens the web UI of a Service inside the cluster (Grafana, Kibana, the RabbitMQ management UI and the like) in a new tab under YEKE's own address, without opening a local port. Access works with your YEKE session and your Kubernetes permissions; every session is written to the audit trail. It ships in Community. In the default mode only the Service ports an administrator has allowed one by one open; the allowlist starts empty (The allowlist).

Because the opened application runs at the same address as YEKE, this carries a cost that is accepted on purpose: The same-address risk. Allow only services you trust.

How to open it

From a Service's port links.

  • The Ports strip in the Service detail. Every eligible port is a link that opens in a new tab.
  • The Port(s) column of the Service list and the Service rows in a workload detail's Network tab carry the same links.
  • One yeke-proxy item in the Service row menu, telling you the one step you can take right now: “Open in browser”; when no port can be opened, an administrator gets “Allow…” (no entry) or “Approve again…” (the entry dropped), both open the permission dialog. Anyone who is not an administrator sees a disabled “Open in browser” with the reason. With more than one port, you pick a port first. The top menu of the Service detail works the same way.
  • A port that cannot be opened says why: a non-TCP port, an ExternalName Service, a Service without a selector. If your Kubernetes permissions do not include services/proxy, the link is disabled; if yeke-proxy is off it says “yeke-proxy is off”.
  • A port without a permission is disabled too: “An administrator hasn't opened this port for yeke-proxy.” If the Service changed after it was allowed: “The service changed after it was allowed; an administrator has to approve it again.” An address typed by hand lands on the “This service isn't open for yeke-proxy” page.
  • The yeke-proxy table on the cluster home lists open sessions (opened by, service, pod, started, last activity, requests, WebSockets). An administrator sees everyone's in the cluster, others see their own.

Terminate closes the session and its open WebSocket connections; it does not remove access: as long as the permission stands, the next request opens a new session. To stop access, remove the permission (permission group or RBAC).

The allowlist

An administrator decides which Service ports open.

Allowing and removing

  • An administrator (the admin role) gives the permission in the Ports strip of the Service detail: “Allow”, “Remove permission” or “Approve again” on the port row. On a Service with more than one eligible port, “Allow every eligible port” writes a separate entry for each port.
  • The approval dialog (“Allow for yeke-proxy?”) shows the risk and what the permission binds to: the Service ID, the selector and the port. If the Service changes while the dialog is open, the approval is refused (“The Service changed while you were looking”).
  • Each permission is a single port: cluster, namespace, Service and port. There is no namespace-level or “all ports” entry. At most 500 entries per cluster.
  • The “yeke-proxy permissions” list on the cluster home shows an administrator the allowed ports, their state (Active or Dropped, with the time it dropped), who approved them and when; “Remove” works there too. The list refreshes every 20 seconds while the tab is visible.
  • Removing a permission closes the open sessions to that port right away. In a multi-replica installation, the time it takes to reach the other replicas has not been measured on a real installation.

What a permission is bound to, and when it drops

  • A permission is bound to the Service's identity: its UID, its selector and that port's definition. If the Service is deleted and created again under the same name, or the selector or port definition changes, the permission drops and needs an administrator's approval again. It does not come back by itself; ordinary changes such as Helm recreating the Service also need a new approval.
  • A new session reads the Service every time; a change is caught at that moment. An open session reads the Service again every 30 seconds and closes when it sees the change. Within that window, requests can still be served.
  • Without traffic, a dropped permission shows as “Active” in the list until an administrator opens the Service detail or someone tries to connect; either one drops it at once.
  • If the Service is deleted, open sessions close but the permission entry does not drop; if the Service is created again under the same name, the UID difference drops it.

Mode

The installation owner picks the mode under Administration → System → System settings → Sessions & access → yeke-proxy:

  • “Only allowed services” (allowlisted, the default): only the ports on the allowlist open.
  • “Every service” (all): the allowlist is not consulted; every Service the user has Kubernetes permission for can open. The UI makes you confirm the risk text when switching to this mode. Going back from it to “Only allowed services” closes the open sessions that have no permission entry.
  • “Off” (off): /proxy/* returns PROXY_DISABLED, the Service port links close and open sessions end (HTTP at once, an open WebSocket within 5 seconds).

The mode can also be given with the YEKE_PROXY_MODE environment variable (allowlisted, all or off); when given, the field is locked. The same-origin value from before 0.87.0 is gone: with that value or an unrecognized one in the environment variable, core does not start. An old value written to System settings is deleted on upgrade and the mode falls back to the default.

Address format

Cluster, namespace, service and port.

https://<yeke>/proxy/<clusterId>/<namespace>/<service>-<port>/…

example: /proxy/c-9/data/kibana-5601/
  • The port is required (decimal, 1–65535) and the address splits at the last -. Because a Service name is DNS-1035, kibana-5601-80 is port 80 of the Service kibana-5601.
  • The cluster segment is the cluster's id, not its name.
  • If the prefix does not end in / it is added with a 301; the rest of the path and the query are forwarded as they are. A WebSocket upgrade works at the same address.
  • The scheme comes from the Service: HTTPS if appProtocol: https or the port name is https/https-*, otherwise HTTP. An HTTPS upstream's certificate is not verified.

Permission and audit

In order: the YEKE session, the mode, Kubernetes RBAC, the allowlist.

Who can open it

  • Full sessions only. read and plan tokens and MCP cannot use yeke-proxy.
  • services/proxy on the Service, for the main identity. The HTTP method maps to a verb: GET/HEAD/OPTIONS get, POST create, PUT update, PATCH patch, DELETE delete. A role that grants only get closes the writing methods. Reaching the service also needs pods/portforward get.
  • One capability in a permission group: yeke-proxy (exec.proxy) gives both. It is separate from the port-forward capability (exec.portforward): a group that has only one of the two cannot do the other. Of the ready-made templates, Namespace owner and SRE / on-call carry it (Permission groups).
  • For identities outside a group (a personal binding, a customer's own RBAC) these are needed: services/proxy on the Service, reading Services (services get), discovery.k8s.io endpointslices get, list and pods/portforward get. An admin is cluster-admin, so it has all of them.
  • The permission is re-checked every 5 minutes; if it is withdrawn, the session closes.
  • The allowlist is asked after RBAC, the same way for HTTP and WebSocket. For a port without a permission, 403 PROXY_NOT_ALLOWED comes back before a single byte reaches the application.
  • There is no approval card or plan; policies (CEL) do not see this path.

Audit trail

Session events are written to the cluster's audit trail per session (not per request: the path and query can carry secrets):

  • proxy.session_opened — namespace, service, port, target port, pod, scheme; whether the session was admitted by a permission entry (allowlist) or in the “Every service” mode (all), and the entry's ID.
  • proxy.session_closed — reason for closing, duration, request count and the count of requests that changed something (POST, PUT, PATCH, DELETE), the count of WebSockets actually established, bytes transferred, upstream errors.
  • proxy.denied — reason (mode-off, rbac, transport-rbac, cross-site, unsupported-target, not-allowlisted, allowlist-changed); the Kubernetes user and groups once the identity is resolved. One row per 5 minutes for the same session, target and reason.

Allowlist events are in the security class and send no notification:

  • proxy.allowlist_added — the approving administrator, Service, port, Service ID and the bound selector and port definition.
  • proxy.allowlist_removed — the administrator who removed it and the number of sessions closed.
  • proxy.allowlist_invalidated — why the permission dropped, the approved and the observed Service ID, and the user who noticed the change.

A session closes after 30 minutes idle or when it reaches 4 hours; also when the permission is withdrawn, when yeke-proxy is turned off, when its allowlist permission is removed or drops (allowlist-revoked) and when the target Service is deleted (service-not-found). When an open WebSocket closes, the browser does not see the reason (the connection drops); the reason is in the audit trail.

Sub-path setting in the application

The proxy cannot make an application's sub-path setting unnecessary.

The default mode is strip: the application receives / plus the remaining path; the prefix is added with the X-Forwarded-Prefix and X-Script-Name headers, and Host is YEKE's external host. If the Service carries the annotation below (exactly this value), preserve mode applies: the application receives the full prefixed path and those two headers are not sent.

yeke.nairotech.com/proxy-path: preserve

<prefix> = /proxy/<clusterId>/<namespace>/<service>-<port>   (no trailing /)
ApplicationSettingMode
nginx (static)No setting.strip
RabbitMQ management UINo setting (relative API paths).strip
GrafanaGF_SERVER_ROOT_URL=https://<yeke><prefix>/
GF_SERVER_SERVE_FROM_SUB_PATH=false
The Origin of the Live WebSocket must be the root_url host.
strip
KibanaSERVER_BASEPATH=<prefix>
SERVER_REWRITEBASEPATH=false
SERVER_PUBLICBASEURL=https://<yeke><prefix>
None of the three has a trailing /.
strip
pgAdmin 4Works under the sub-path with the X-Script-Name header YEKE sends. Measured in the demo environment with these two settings (not measured without them):
PGADMIN_CONFIG_PROXY_X_PROTO_COUNT=1
PGADMIN_CONFIG_PROXY_X_HOST_COUNT=1
strip
RedisInsightRI_PROXY_PATH=<prefix> (RIPROXYPATH in older versions) and proxy-path: preserve on the Service.preserve

The ones that work without a setting use relative URLs. For an application with no sub-path setting, root paths in HTML and CSS (such as /assets/app.css) and the root-path requests JavaScript builds later are turned into paths under the service prefix; an application with a client-side router may still need its sub-path setting. These six applications were tried through yeke-proxy in YEKE's own demo environment; for a new application or another version, confirm the setting name in the application's own documentation.

The same-address risk

A cost the allowlist narrows but does not close.

The opened application runs at the same address as YEKE, that is, in the same origin. So the application's code in the browser can act with all of the YEKE permissions of the user who opened the link; no server-side control can separate the two. For example: someone who can deploy workloads deploys a malicious HTTP service into their own namespace and asks an administrator to look at it; the service's code can build and apply a plan with the administrator's permissions.

The allowlist stops a service that has not been allowed from opening this way: the response of a service without a permission is not served at YEKE's address. It does not stop:

  • A hole in an allowed application. An XSS, or features of the application that can serve content of their own, run at the same address. An allowed application that is itself malicious is not stopped by the permission either.
  • Someone who can change the workload. Someone who can change the workload behind an allowed Service (image, pod template, commands inside a pod), or create a pod with labels that match the selector, can serve their own code at that address. These do not change the Service's identity, so the permission does not drop.
  • A shared browser store. Allowed applications share the same localStorage/sessionStorage with YEKE and with each other. A record one application keeps in the browser (measured in the RabbitMQ management UI) can be read from another application's code; the same application in different clusters sees the same record.

Allow only services whose code, and everyone who can change workloads in that namespace, you trust. The “Every service” mode turns the allowlist off and extends all of these limits to every service; where there are interfaces you do not trust, turn yeke-proxy off. A link that comes from outside YEKE, when the browser reports it, lands on an “Open this service?” interstitial. The way to close these risks is opening applications at a separate address (a separate origin); this version does not have that, it is the next step.

Front door and CDN

If there is an identity proxy or a cache in front of YEKE.

  • Credentials do not go to the application. The cookies and identity headers of Cloudflare Access, oauth2-proxy, Pomerium, Authelia, traefik-forward-auth, AWS ALB OIDC and Google IAP are dropped. If your front door is outside these, YEKE_PROXY_STRIP_HEADERS and YEKE_PROXY_STRIP_COOKIES (comma-separated) add to the list. The application's own Authorization header passes.
  • For a CDN, a cache-bypass rule for /proxy/* is recommended (in Cloudflare, Cache Rule → Bypass cache). The proxy writes private and CDN-Cache-Control: no-store on responses, but that cannot override a CDN's own configuration.
  • Client address: X-Forwarded-For can resolve the client address only with YEKE_TRUSTED_PROXIES; when it is off, the application sees the tunnel side's address.
  • Some front doors replace a 502/504 body with their own page; the application's XHR can then see HTML instead of JSON.
  • If the response header does not arrive in 60 seconds a 502 is returned (YEKE_PROXY_RESPONSE_TIMEOUT_MS); responses whose header arrives and whose body keeps going (SSE) are not affected.

Limits and what isn't measured

What yeke-proxy does not cover.

  • TCP only; only Services with a selector and pod targets. A named port is not in the address.
  • HTTP/1.1 upstream; no h2c or gRPC. Upstream TLS is not verified.
  • No service worker registration. The script gets 403; PWA and offline mode do not work under the proxy.
  • No read-only proxy. A WebSocket upgrade always maps to the get verb and is bidirectional; there are applications that cause side effects with GET too. The real “read only” boundary is the application's own permission.
  • Ceilings: 8 upstream connections per service session (the excess queues), 64 per user, 256 per cluster (429 beyond that); 16 WebSockets and 32 sessions per user; a 512 MiB request body.
  • In HA, the session list and Terminate are replica-local. Who terminated a session is not in the event.
  • The first request after more than a second of idle opens a new port-forward stream.
  • Someone who can write an EndpointSlice can set up a route to any pod:port in the namespace; the permission boundary is pods/portforward get on that pod. In the “Only allowed services” mode, only EndpointSlices tied to the Service by an owner reference are picked; that filters out stale and ownerless slices, not one that writes the owner reference on purpose.
  • Limits of the root-path translation: pages larger than 2 MiB or not finished within a second (streamed, slow) are not rewritten; requests without a Referer, navigation through location.href, a nonce or strict-dynamic CSP and a WebSocket inside a Web Worker are not covered. The translation is not a security boundary: the application is still on the same address as YEKE.
  • If the agent is old (PROXY_AGENT_TOO_OLD), update it from the cluster page.
  • In HA, upgrade every replica together: after 0.87.0's migration, a replica still running the old version falls back to its own default, the mode that does not consult the allowlist.
  • Not measured: upload speed (it may be limited by the tunnel's stream window), the per-connection setup time on a real tunnel, how long removing a permission takes to reach the other replicas in a multi-replica installation, and the allowlist on OpenShift (OKD).

Decide who can open it

Access is decided together by the yeke-proxy capability in a permission group, the cluster's own RBAC and the administrator's allowlist.