Intelligent Route Projected Credentials
Starts with an empty credential table and injects a provider credential that is resolved on demand from a projected Kubernetes Secret mount
Versions marked “overview” do not contain this page. Selecting one opens that version’s documentation overview.
Category: Setup-dependent integration
Task: Starts with an empty credential table and injects a provider credential that is resolved on demand from a projected Kubernetes Secret mount
Prerequisites: The external service, credentials, or certificates referenced by this configuration.
Run it: Use ghcr.io/praxis-proxy/ai:0.8.0 and follow the container quickstart to mount and start the configuration.
This configuration comes from the selected release. The example has not been run here; external services are not bundled.
Download the source file.
# Intelligent Route: Projected Credential Mount
#
# Starts with an empty credential table and injects a provider credential
# that is resolved on demand from a projected Kubernetes Secret mount.
#
# This is the "no-route startup" path: the proxy can come up before any route
# that needs a credential exists. `intelligent_route` later selects a candidate
# whose `credential.secretRef` names a Secret that was NOT present in the
# `credential_inject` startup table. Because `projected_credential_mount_base`
# is configured, the filter resolves the selected reference from
# `{base}/{namespace}/{name}/{key}` on demand and injects it. Including the
# namespace keeps same-name Secrets in different namespaces distinct.
#
# The mount is read live with a short (250 ms) cache, so a Secret rotated or
# newly mounted after startup is picked up without a pod or config reload. An
# absent, unsafe, or invalid projected file fails closed with HTTP 503: a
# selected credential-bearing route is never forwarded without injection.
#
# DANGER: overlay digest and scope validation do NOT authenticate the
# publisher. Use this mode only with a trusted routing-overlay publisher, mount
# only Secrets this gateway is authorized to inject, and keep the mount
# read-only to untrusted processes.
#
listeners:
- name: proxy
address: "0.0.0.0:8080"
filter_chains:
- main
filter_chains:
- name: main
filters:
# Promote the JSON body's `model` field into X-Model and strip any
# client-supplied X-Model so the routed model cannot be spoofed.
- filter: model_to_header
header: X-Model
# Route to the cluster that serves the requested model and attach the
# final-hop credential reference the downstream filter must inject.
- filter: intelligent_route
local_site: site-a
model_header: X-Model
candidates:
- kind: inference_model
name: granite-3.3-8b
site: site-a
cluster: granite-local
fresh: true
credential:
strategy: bearer_token
secretRef:
name: granite-provider
namespace: grid-demo
key: token
# Inject the selected credential. The startup table is empty: every
# credential is resolved on demand from the projected Secret mount.
- filter: credential_inject
credentials: []
projected_credential_mount_base: /run/secrets/projected-credentials
# Forward to whichever cluster intelligent_route selected.
- filter: load_balancer
clusters:
- name: granite-local
endpoints:
- "127.0.0.1:8001"
admin:
address: "127.0.0.1:9901"
shutdown_timeout_secs: 5
insecure_options:
allow_private_endpoints: true # example proxies to local backends