Credential Injection
Injects per-cluster API credentials into upstream requests
Category: Setup-dependent integration
Task: Injects per-cluster API credentials into upstream requests
Prerequisites: The external service, credentials, or certificates referenced by this configuration.
Run it: Use ghcr.io/praxis-proxy/praxis:0.7.2 and follow the first reverse-proxy tutorial 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.
# Credential Injection
#
# Injects per-cluster API credentials into upstream
# requests. The router selects a cluster, then this
# filter replaces (or injects) the configured header
# with the server-side credential. Client-provided
# values for the header are overwritten.
#
listeners:
- name: default
address: "127.0.0.1:8080"
filter_chains:
- main
filter_chains:
- name: main
filters:
- filter: router
routes:
- path_prefix: "/v1/"
cluster: provider-a
- path_prefix: "/internal/"
cluster: internal
- path_prefix: "/"
cluster: default-backend
- filter: credential_injection
clusters:
- name: provider-a
header: Authorization
value: "example-api-key"
header_prefix: "Bearer "
- name: internal
header: x-api-key
value: "internal-secret-token"
- filter: load_balancer
clusters:
- name: provider-a
endpoints:
- "127.0.0.1:3001"
- name: internal
endpoints:
- "127.0.0.1:3002"
- name: default-backend
endpoints:
- "127.0.0.1:3000"
insecure_options:
allow_private_endpoints: true # example proxies to local backends